spiextend 2.0.0.0
|
SPIExtend Click example. More...
Functions | |
void | spiextend_accel14_get_axis (uint8_t axis_out_reg) |
SPI Extend reading axis function. | |
void | spiextend_display_status (uint8_t check_status) |
SPI Extend check display status function. | |
void | application_init (void) |
void | application_task (void) |
int | main (void) |
Variables | |
spiextend_status_data_t | spiextend_status |
SPIExtend Click example.
In this example, if the connection is established, we read Accel axis of the connected Accel 14 Click boards to the SPI Extend Click ( Remote Mode ) which is connected by a LAN cable to SPI Extend Click ( Local Mode ) placed in the mikroBUS 1. Results are being sent to the Usart Terminal where you can track their changes. All data logs write on USB uart changes for every 1 sec.
The demo application is composed of two sections :
Initializes SPI, sets INT pin as input and AN, RST, CS nad PWM pins as outputs and begins to write log. Also, initialization driver enables - SPI, set default configuration of the Accel 14 Click connected to the SPI Extend Click ( Remote Mode ).
If the click is connected properly then the status becomes active and the X-axis coordinate is printed first on the UART terminal, then Y and finally Z. After 1s the process is repeated. In case an error has occurred, printed "LINK is not established" on UART Terminal.
Additional Functions :
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 | ) |
int main | ( | void | ) |
void spiextend_accel14_get_axis | ( | uint8_t | axis_out_reg | ) |
SPI Extend reading axis function.
This function is used for reading axis.
[in] | axis_out_reg | : Data from the register. |
void spiextend_display_status | ( | uint8_t | check_status | ) |
SPI Extend check display status function.
This function is used for check display status.
[in] | check_status | : Display data. |
spiextend_status_data_t spiextend_status |