Knock

TO DO. More...

Protected Attributes

Type

Name

AnalogIn

Ticker

Thread *

knock_stage_t

Callback< void(void)>

Public Functions

Type

Name

Knock (PinName acc_sda, PinName acc_scl, PinName mic)

void

void

stop ()

int

read_raw_acc (float * val)

int

read_raw_mic (float * val)

int

set_acc_calibration (float offset, float coef)

int

set_mic_calibration (float offset, float coef)

void

attach_knock_detection (void(*)(void) function)

void

attach_knock_detection (T * object, void(T::*)(void) member)

Protected Functions

Type

Name

float

find_maximum (float * array)

Detailed Description

description TO DO.

Protected Attributes Documentation

variable _acc

MPU9150 Knock::_acc;

variable _mic

AnalogIn Knock::_mic;

variable _tick

Ticker Knock::_tick;

variable _thread

Thread* Knock::_thread;

variable _acc_window

float Knock::_acc_window[NUMBER_OF_SAMPLES];

variable _mic_window

float Knock::_mic_window[NUMBER_OF_SAMPLES];

variable _state_mic

bool Knock::_state_mic;

variable _state_acc

bool Knock::_state_acc;

variable _state_both

bool Knock::_state_both;

variable _stage

knock_stage_t Knock::_stage;

variable _offset_acc

float Knock::_offset_acc;

variable _offset_mic

float Knock::_offset_mic;

variable _coef_acc

float Knock::_coef_acc;

variable _coef_mic

float Knock::_coef_mic;

Callback<void(void)> Knock::_knock_callback;

Public Functions Documentation

function Knock

Knock::Knock (
    PinName acc_sda,
    PinName acc_scl,
    PinName mic
)

function ~Knock

Knock::~Knock ()

function start

void Knock::start ()

function stop

void Knock::stop ()

function read_raw_acc

int Knock::read_raw_acc (
    float * val
)

function read_raw_mic

int Knock::read_raw_mic (
    float * val
)

int Knock::set_acc_calibration (
    float offset,
    float coef
)

int Knock::set_mic_calibration (
    float offset,
    float coef
)

void Knock::attach_knock_detection (
    void(*)(void) function
)

void Knock::attach_knock_detection (
    T * object,
    void(T::*)(void) member
)

Protected Functions Documentation

function thread_func

void Knock::thread_func ()

function find_maximum

float Knock::find_maximum (
    float * array
)

The documentation for this class was generated from the following file: D:/w/hw-libs/\_libs\_/libraries/Knock.h

Last updated