Functions to control UART modes.
More...
Detailed Description
Functions to control UART modes.
Define Documentation
#define SER0_RS232_MODE |
( |
| ) |
(PORTB |= _BV(0)) |
Configure Ser 0 to operate in RS232 mode.
In RS232 mode receiption from SUB-D connector J9 is enabled and the receiver on connector J6-2/3 is disabled.
Definition at line 131 of file xnut.h.
#define SER0_RS485_MODE |
( |
| ) |
(PORTB &= ~_BV(0)) |
Configure Ser 0 to operate in RS485 mode.
In RS485 mode receiption from connector J6-2/3 is enabled and the receiver on SUB-D connector J9 is disabled.
Definition at line 139 of file xnut.h.
#define SER0_RS485_DRV_ON |
( |
| ) |
(PORTB |= _BV(1)) |
Switches the RS485 line driver of Ser 0 on.
RS485 is a half-duplex link and the line driver must be switched off to allow receiption of data.
Definition at line 147 of file xnut.h.
#define SER0_RS485_DRV_OFF |
( |
| ) |
(PORTB &= ~_BV(1)) |
Switches the RS485 line driver of Ser 0 off.
Definition at line 152 of file xnut.h.
#define SER1_RS232_MODE |
( |
| ) |
(PORTB |= _BV(2)) |
Configure Ser 1 to operate in RS232 mode.
In RS232 mode receiption from SUB-D connector J7 is enabled and the receiver on connector J6-5/6 is disabled.
Definition at line 160 of file xnut.h.
#define SER1_RS485_MODE |
( |
| ) |
(PORTB &= ~_BV(2)) |
Configure Ser 1 to operate in RS485 mode.
In RS485 mode receiption from connector J6-5/6 is enabled and the receiver on SUB-D connector J7 is disabled.
Definition at line 168 of file xnut.h.
#define SER1_RS485_DRV_ON |
( |
| ) |
(PORTB |= _BV(3)) |
Switches the RS485 line driver of Ser 1 on.
RS485 is a half-duplex link and the line driver must be switched off to allow receiption of data.
Definition at line 176 of file xnut.h.
#define SER1_RS485_DRV_OFF |
( |
| ) |
(PORTB &= ~_BV(3)) |
Switches the RS485 line driver of Ser 1 off.
Definition at line 181 of file xnut.h.
#define SER0_GET_CD |
( |
| ) |
bit_is_set(PINB, 6) |
Returns the status of the RS232 CD signal input of Ser 0 on SUB-D connector J9
- Returns:
- 1 if CD is asserted
Definition at line 189 of file xnut.h.
#define SER0_GET_RI |
( |
| ) |
bit_is_clear(PINB, 7) |
Returns the status of the RS232 RI signal input of Ser 0 on SUB-D connector J9
- Returns:
- 1 if RI is asserted
Definition at line 197 of file xnut.h.
#define SER0_GET_CTS |
( |
| ) |
bit_is_clear(PINE, 6) |
Returns the status of the RS232 CTS signal input of Ser 0 on SUB-D connector J9
- Returns:
- 1 if CTS is asserted
Definition at line 205 of file xnut.h.
#define SER0_GET_DSR |
( |
| ) |
bit_is_clear(PINE, 4) |
Returns the status of the RS232 DSR signal input of Ser 0 on SUB-D connector J9
- Note:
- Feature only available for devices with serial number 224 upwards (since PCB Revision C)
- Returns:
- 1 if DSR is asserted
Definition at line 215 of file xnut.h.
#define SER0_SET_RTS |
( |
| ) |
(PORTB &= ~_BV(4)) |
Asserts the RS232 RTS signal output of Ser 0 on SUB-D connector J9
Definition at line 221 of file xnut.h.
#define SER0_CLR_RTS |
( |
| ) |
(PORTB |= _BV(4)) |
Clears the RS232 RTS signal output of Ser 0 on SUB-D connector J9
Definition at line 226 of file xnut.h.
#define SER0_SET_DTR |
( |
| ) |
(PORTB &= ~_BV(5)) |
Asserts the RS232 DTR signal output of Ser 0 on SUB-D connector J9
- Note:
- Feature only available for devices with serial number 224 upwards (since PCB Revision C)
Definition at line 235 of file xnut.h.
#define SER0_CLR_DTR |
( |
| ) |
(PORTB |= _BV(5)) |
Clears the RS232 DTR signal output of Ser 0 on SUB-D connector J9
- Note:
- Feature only available for devices with serial number 224 upwards (since PCB Revision C)
Definition at line 244 of file xnut.h.