TWI bus explorer.
More...
#include <neorv32.h>
#include <string.h>
TWI bus explorer.
- Author
- Stephan Nolting
◆ BAUD_RATE
◆ hexstr_to_uint()
uint32_t hexstr_to_uint |
( |
char * | buffer, |
|
|
uint8_t | length ) |
Helper function to convert N hex chars string into uint32_t
- Parameters
-
[in,out] | buffer | Pointer to array of chars to convert into number. |
[in,out] | length | Length of the conversion string. |
- Returns
- Converted number.
◆ main()
This program provides an interactive console to communicate with TWI devices.
- Note
- This program requires the UART to be synthesized.
- Returns
- 0 if execution was successful
◆ print_hex_byte()
void print_hex_byte |
( |
uint8_t | data | ) |
|
Print byte as hex chars via UART0.
- Parameters
-
data | 8-bit data to be printed as two hex chars. |
◆ scan_twi()
Scan 7-bit TWI address space and print results
◆ send_twi()
Read/write menu to transfer 1 byte from/to bus
◆ set_clock()