Debug output driver for AT91 On-Chip UART. More...
 
 | 
Functions | |
| uint32_t | At91BaudRateDiv (uint32_t baud) | 
| Calculate divisor for a given baud rate.   | |
| int | At91DevDebugIOCtl (NUTDEVICE *dev, int req, void *conf) | 
| Handle I/O controls for debug device 2.   | |
| int | At91DevDebugWrite (NUTFILE *fp, CONST void *buffer, int len) | 
| Send characters to debug device 0.   | |
| NUTFILE * | At91DevDebugOpen (NUTDEVICE *dev, CONST char *name, int mode, int acc) | 
| Open debug device.   | |
| int | At91DevDebugClose (NUTFILE *fp) | 
| Close debug device.   | |
Debug output driver for AT91 On-Chip UART.
This stream device driver writes data to the internal UART. The output is unbuffered and uses polling. Therefore it can be used for standard I/O output even within interrupt routines.
Calculate divisor for a given baud rate.
| baud | Baud rate. | 
Definition at line 64 of file debug_at91.c.
References NUT_HWCLK_PERIPHERAL, and NutClockGet.
Referenced by At91DevDebugIOCtl().
| int At91DevDebugIOCtl | ( | NUTDEVICE * | dev, | 
| int | req, | ||
| void * | conf | ||
| ) | 
Handle I/O controls for debug device 2.
The debug device supports UART_SETSPEED only.
Definition at line 76 of file debug_at91.c.
References At91BaudRateDiv(), _NUTDEVICE::dev_base, outr, UART_SETSPEED, and US_BRGR_OFF.

| int At91DevDebugWrite | ( | NUTFILE * | fp, | 
| CONST void * | buffer, | ||
| int | len | ||
| ) | 
Send characters to debug device 0.
A newline character will be automatically prepended by a carriage return.
Definition at line 109 of file debug_at91.c.
References CONST, and _NUTFILE::nf_dev.
Open debug device.
Definition at line 195 of file debug_at91.c.
References _NUTDEVICE::dev_dcb, _NUTFILE::nf_dev, _NUTFILE::nf_fcb, and _NUTFILE::nf_next.
| int At91DevDebugClose | ( | NUTFILE * | fp | ) |