-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathserial.tbh
31 lines (25 loc) · 1.15 KB
/
serial.tbh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#if PLATFORM_ID = TPP3WG2
const SER0_HDFD = 32 'HIGH for full-duplex, LOW for half-duplex
const SER0_RSMD = 33 'HIGH for RS422/485, LOW for RS232
const SER1_HDFD = 34
const SER1_RSMD = 35
const SER2_HDFD = 36
const SER2_RSMD = 37
const SER3_HDFD = 38
const SER3_RSMD = 39
#elif PLATFORM_ID = TPP2WG2
const SER0_HDFD = PL_IO_NUM_11_TX1 'HIGH for full-duplex, LOW for half-duplex
const SER0_RSMD = PL_IO_NUM_10_RX1 'HIGH for RS422/485, LOW for RS232
const SER2_HDFD = PL_IO_NUM_15_TX3
const SER2_RSMD = PL_IO_NUM_14_RX3
#endif
const BASE_OF_INT_LINES=PL_IO_NUM_16_INT0
const SER0_CTS_INT=PL_INT_NUM_0 'must be from pl_int_num range (NOT pl_io_num)
const SER0_RTS=PL_IO_NUM_0 'must be from pl_io_num range
const SER1_CTS_INT=PL_INT_NUM_1 'must be from pl_int_num range (NOT pl_io_num)
const SER1_RTS=PL_IO_NUM_1 'must be from pl_io_num range
const SER2_CTS_INT=PL_INT_NUM_2 'must be from pl_int_num range (NOT pl_io_num)
const SER2_RTS=PL_IO_NUM_2 'must be from pl_io_num range
const SER3_CTS_INT=PL_INT_NUM_3 'must be from pl_int_num range (NOT pl_io_num)
const SER3_RTS=PL_IO_NUM_3 'must be from pl_io_num range
declare sub setup_serial()