usart_serial.c
Go to the documentation of this file.
1 
35 /*
36  * Support and FAQ: visit <a href="https://www.microchip.com/support/">Microchip Support</a>
37  */
38 #include "serial.h"
39 
49  size_t len)
50 {
51  while (len) {
52  usart_serial_putchar(usart, *data);
53  len--;
54  data++;
55  }
56  return STATUS_OK;
57 }
58 
59 
69  size_t len)
70 {
71  while (len) {
72  usart_serial_getchar(usart, data);
73  len--;
74  data++;
75  }
76  return STATUS_OK;
77 }
status_code_t usart_serial_read_packet(usart_if usart, uint8_t *data, size_t len)
Receive a sequence of bytes from USART device.
Definition: usart_serial.c:68
status_code_t usart_serial_write_packet(usart_if usart, const uint8_t *data, size_t len)
Send a sequence of bytes to USART device.
Definition: usart_serial.c:48
Serial Mode management.
Success.
Definition: status_codes.h:66
Usart hardware registers.
static int usart_serial_putchar(usart_if p_usart, const uint8_t c)
Sends a character with the USART.
Definition: uart_serial.h:376
static void usart_serial_getchar(usart_if p_usart, uint8_t *data)
Waits until a character is received, and returns it.
Definition: uart_serial.h:476
USBInterfaceDescriptor data
enum status_code status_code_t
Definition: status_codes.h:97


inertial_sense_ros
Author(s):
autogenerated on Sat Sep 19 2020 03:19:05