The XMODEM transfer protocol service provides function to receive/send a file from USART/UART using XMODEM protocol.
Functions | |
uint32_t | xmodem_receive_file (usart_if usart, int8_t *p_buffer) |
Receive the files through XMODEM protocol. More... | |
void | xmodem_send_file (usart_if usart, int8_t *p_buffer, uint32_t ul_length) |
Send the files through XMODEM protocol. More... | |
uint32_t xmodem_receive_file | ( | usart_if | usart, |
int8_t * | p_buffer | ||
) |
Receive the files through XMODEM protocol.
usart | Base address of the USART instance. |
p_buffer | Pointer to receive buffer |
References PKTLEN_128, sysclk_get_peripheral_hz(), usart_serial_getchar(), usart_serial_is_rx_ready(), usart_serial_putchar(), XMDM_ACK, XMDM_CAN, XMDM_EOT, XMDM_ESC, XMDM_SOH, and xmodem_get_packet().
Referenced by main().
void xmodem_send_file | ( | usart_if | usart, |
int8_t * | p_buffer, | ||
uint32_t | ul_length | ||
) |
Send the files through XMODEM protocol.
usart | Base address of the USART instance. |
p_buffer | Pointer to send buffer |
ul_length | transfer file size |
References PKTLEN_128, sysclk_get_peripheral_hz(), usart_serial_getchar(), usart_serial_putchar(), XMDM_ACK, XMDM_CAN, XMDM_EOT, XMDM_NAK, and xmodem_send_packet().