llcspi 2.0.0.0
|
The LLC SPI click is a very useful Click boardâ„¢ which can be utilized as the level converter for logic signals.
We provide a library for the llcspi Click as well as a demo application (example), developed using MikroElektronika compilers. The demo can run on all the main MikroElektronika development boards.
Package can be downloaded/installed directly form compilers IDE(recommended way), or downloaded from our LibStock, or found on mikroE github account.
This library contains API for llcspi Click driver.
- Initialization function.void llcspi_cfg_setup ( llcspi_cfg_t *cfg );
LLCSPI_RETVAL llcspi_init ( llcspi_t *ctx, llcspi_cfg_t *cfg );
- LLC SPI readvoid llcspi_generic_write ( llcspi_t *ctx, uint8_t *p_buf, uint16_t n_bytes );
void llcspi_generic_read ( llcspi_t *ctx, uint8_t *p_buf, uint16_t n_bytes );
void llcspi_generic_transfer ( llcspi_t *ctx, uint8_t *wr_buf, uint16_t wr_len, uint8_t *rd_buf, uint16_t rd_len );
This application is converter for logic signals.
The demo application is composed of two sections :
Initialization device init
Counter passes through the loop and logs the value of the counter on the bargraph display
Connection between BarGraph and LLC-SPI is made through SPI interface. You can connect a BarGraph click to LLC-SPI click with the wires to make connection between click boards. We use the BarGraph click to demonstrate the functions of the LLC-SPI click.
The full application code, and ready to use projects can be installed directly form compilers IDE(recommneded) or found on LibStock page or mikroE GitHub accaunt.
Other mikroE Libraries used in the example:
Additional notes and informations
Depending on the development board you are using, you may need USB UART click, USB UART 2 Click or RS232 Click to connect to your PC, for development systems with no UART to USB interface available on the board. The terminal available in all Mikroelektronika compilers, or any other terminal application of your choice, can be used to read the message.