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. |
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.
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.
References _NUTFILE::nf_dev.
Open debug device.
References _NUTDEVICE::dev_dcb, _NUTFILE::nf_dev, _NUTFILE::nf_fcb, and _NUTFILE::nf_next.
| int At91DevDebugClose | ( | NUTFILE * | fp | ) |
Close debug device.