NetBurner 3.5.6
PDF Version
same70_serial.h
1#ifndef __SERIAL_H
2#define __SERIAL_H
3
4#include <stdint.h>
5
6#define USART_DMA_RX_BUF_LEN 256
7#define UART_DMA_RX_BUF_LEN 256
8
9#define DMA_RX_MAX_LATENCY_MS 14
10
11// Do not configure this particular pin. Typically used for signals that can
12// come out in multiple locations that need to be specified by the developer
13#define SER_IO_NO_CONF 0xFF
14
15struct configMap {
16 enum mode_t {
17 MODE_A = 0,
18 MODE_B = 1,
19 MODE_C = 2,
20 MODE_D = 3,
21 MODE_GPIO = 4
22 };
23 uint8_t pio; // pinio module index
24 uint8_t io; // pinio number
25 mode_t mode; // peripheral function, A, B, C, D, GPIO
26 uint8_t out; // set to 1 if signal is an output
27};
28
29
30void ser_putchar(char c);
31char ser_getchar();
32void ser_putstring(char *s);
33void ser_putbyte(uint8_t b);
34void ser_putshort(uint16_t hw);
35void ser_putword(uint32_t w);
36void ser_dump(uint32_t *p, int n);
37
38#endif /* ----- #ifndef __SERIAL_H ----- */