tdc2 2.1.0.0
|
TDC 2 Click example. More...
Functions | |
void | dev_generate_stop (tdc2_t *ctx) |
Dev generate stop signal function. | |
void | application_init (void) |
void | application_task (void) |
int | main (void) |
TDC 2 Click example.
This library contains API for TDC 2 Click driver. The library initializes and defines the SPI bus drivers to write and read data from registers, as well as the default configuration for a reading time between two STOP signals.
The demo application is composed of two sections :
Initializes the driver after that resets the device and performs default configuration and sets the device in read mode.
This example demonstrates the use of the TDC 2 Click board by measuring the time between two STOP signals. This example is set up to generate stop signals until FIFO fil's up which is indicated by interrupt pin going to low state. After that FIFO buffer is completely emptied by reading, and that data is used to calculate the time between STOP signals.
void application_init | ( | void | ) |
< Logger config object.
< Click config object.
Logger initialization. Default baud rate: 115200 Default log level: LOG_LEVEL_DEBUG
void application_task | ( | void | ) |
void dev_generate_stop | ( | tdc2_t * | ctx | ) |
Dev generate stop signal function.
This function generates the stop signal by toggling DIS pin.
[out] | cfg | : Click configuration structure. See tdc2_cfg_t object definition for detailed explanation. |
int main | ( | void | ) |