logging functions
Functions | |
uint8_t | convert_nibble_to_hexascii (uint8_t nibble) |
This function converts a nibble to Hex-ASCII. More... | |
void | display_status (uint8_t device_present_mask, uint8_t sha204_revision) |
This function displays information using LEDs about the SHA204 devices on the Security Xplained board. More... | |
void | led_display_number (uint8_t value) |
This function displays a byte value using the Xplained LEDs. More... | |
void | log_init (void) |
This function initializes the logging hardware. More... | |
void | log_sha204 (uint8_t length, uint8_t *buffer, bool is_rx) |
This function logs rx or tx data as hex-ascii. More... | |
void | log_sha204_title (char *title) |
This function logs the title of a SHA204 transaction. More... | |
void | usart_send (uint8_t length, uint8_t *buffer) |
uint8_t convert_nibble_to_hexascii | ( | uint8_t | nibble | ) |
This function converts a nibble to Hex-ASCII.
[in] | nibble | nibble value to be converted |
Referenced by log_sha204().
void display_status | ( | uint8_t | device_present_mask, |
uint8_t | sha204_revision | ||
) |
This function displays information using LEDs about the SHA204 devices on the Security Xplained board.
[in] | device_present_mask | The high nibble represents the four SHA204 devices. |
[in] | sha204_revision | revision of the SHA204 devices |
References led_display_number(), SHA204_DEVICE_COUNT, and sha204h_delay_ms().
void led_display_number | ( | uint8_t | value | ) |
void log_init | ( | void | ) |
This function initializes the logging hardware.
References usart_rs232_options::baudrate, usart_serial_init(), USART_SHA204, USART_SHA204_BAUDRATE, USART_SHA204_CHAR_LENGTH, USART_SHA204_PARITY, and USART_SHA204_STOP_BIT.
Referenced by main().
void log_sha204 | ( | uint8_t | length, |
uint8_t * | buffer, | ||
bool | is_rx | ||
) |
This function logs rx or tx data as hex-ascii.
[in] | length | number of characters |
[in] | buffer | pointer to data |
[in] | is_rx | true if rx buffer, false if tx_buffer is logged |
References convert_nibble_to_hexascii(), usart_putchar(), usart_serial_write_packet(), USART_SHA204, and usart_write_crlf().
Referenced by main().
void log_sha204_title | ( | char * | title | ) |
This function logs the title of a SHA204 transaction.
[in] | title | pointer to title string |
References usart_serial_write_packet(), USART_SHA204, and usart_write_crlf().
Referenced by main().
void usart_send | ( | uint8_t | length, |
uint8_t * | buffer | ||
) |