Microchip® Advanced Software Framework

print_funcs.h File Reference
#include <avr32/io.h>
#include "board.h"

Macros

USART Settings for the Debug Module
#define DBG_USART   (&AVR32_USART0)
 
#define DBG_USART_RX_PIN   AVR32_USART0_RXD_0_0_PIN
 
#define DBG_USART_RX_FUNCTION   AVR32_USART0_RXD_0_0_FUNCTION
 
#define DBG_USART_TX_PIN   AVR32_USART0_TXD_0_0_PIN
 
#define DBG_USART_TX_FUNCTION   AVR32_USART0_TXD_0_0_FUNCTION
 
#define DBG_USART_IRQ   AVR32_USART0_IRQ
 
#define DBG_USART_BAUDRATE   57600
 
VT100 Common Commands
#define CLEARSCR   "\x1B[2J\x1B[;H"
 Clear screen. More...
 
#define CLEAREOL   "\x1B[K"
 Clear end of line. More...
 
#define CLEAREOS   "\x1B[J"
 Clear end of screen. More...
 
#define CLEARLCR   "\x1B[0K"
 Clear line cursor right. More...
 
#define CLEARLCL   "\x1B[1K"
 Clear line cursor left. More...
 
#define CLEARELN   "\x1B[2K"
 Clear entire line. More...
 
#define CLEARCDW   "\x1B[0J"
 Clear cursor down. More...
 
#define CLEARCUP   "\x1B[1J"
 Clear cursor up. More...
 
#define GOTOYX   "\x1B[%.2d;%.2dH"
 Set cursor to (y, x). More...
 
#define INSERTMOD   "\x1B[4h"
 Insert mode. More...
 
#define OVERWRITEMOD   "\x1B[4l"
 Overwrite mode. More...
 
#define DELAFCURSOR   "\x1B[K"
 Erase from cursor to end of line. More...
 
#define CRLF   "\r\n"
 Carriage Return + Line Feed. More...
 
VT100 Cursor Commands
#define CURSON   "\x1B[?25h"
 Show cursor. More...
 
#define CURSOFF   "\x1B[?25l"
 Hide cursor. More...
 
VT100 Character Commands
#define NORMAL   "\x1B[0m"
 Normal. More...
 
#define BOLD   "\x1B[1m"
 Bold. More...
 
#define UNDERLINE   "\x1B[4m"
 Underline. More...
 
#define BLINKING   "\x1B[5m"
 Blink. More...
 
#define INVVIDEO   "\x1B[7m"
 Inverse video. More...
 
VT100 Color Commands
#define CL_BLACK   "\033[22;30m"
 Black. More...
 
#define CL_RED   "\033[22;31m"
 Red. More...
 
#define CL_GREEN   "\033[22;32m"
 Green. More...
 
#define CL_BROWN   "\033[22;33m"
 Brown. More...
 
#define CL_BLUE   "\033[22;34m"
 Blue. More...
 
#define CL_MAGENTA   "\033[22;35m"
 Magenta. More...
 
#define CL_CYAN   "\033[22;36m"
 Cyan. More...
 
#define CL_GRAY   "\033[22;37m"
 Gray. More...
 
#define CL_DARKGRAY   "\033[01;30m"
 Dark gray. More...
 
#define CL_LIGHTRED   "\033[01;31m"
 Light red. More...
 
#define CL_LIGHTGREEN   "\033[01;32m"
 Light green. More...
 
#define CL_YELLOW   "\033[01;33m"
 Yellow. More...
 
#define CL_LIGHTBLUE   "\033[01;34m"
 Light blue. More...
 
#define CL_LIGHTMAGENTA   "\033[01;35m"
 Light magenta. More...
 
#define CL_LIGHTCYAN   "\033[01;36m"
 Light cyan. More...
 
#define CL_WHITE   "\033[01;37m"
 White. More...
 

Functions

void init_dbg_rs232 (long pba_hz)
 Sets up DBG_USART with 8N1 at DBG_USART_BAUDRATE. More...
 
void init_dbg_rs232_ex (unsigned long baudrate, long pba_hz)
 Sets up DBG_USART with 8N1 at a given baud rate. More...
 
void print (volatile avr32_usart_t *usart, const char *str)
 Prints a string of characters to a given USART. More...
 
void print_char (volatile avr32_usart_t *usart, int c)
 Prints a character to a given USART. More...
 
void print_char_hex (volatile avr32_usart_t *usart, unsigned char n)
 Prints a char to a given USART in an hexadecimal representation. More...
 
void print_dbg (const char *str)
 Prints a string of characters to DBG_USART. More...
 
void print_dbg_char (int c)
 Prints a character to DBG_USART. More...
 
void print_dbg_char_hex (unsigned char n)
 Prints a char to DBG_USART in an hexadecimal representation. More...
 
void print_dbg_hex (unsigned long n)
 Prints an integer to DBG_USART in an hexadecimal representation. More...
 
void print_dbg_short_hex (unsigned short n)
 Prints a short integer to DBG_USART in an hexadecimal representation. More...
 
void print_dbg_ulong (unsigned long n)
 Prints an integer to DBG_USART in a decimal representation. More...
 
void print_hex (volatile avr32_usart_t *usart, unsigned long n)
 Prints an integer to a given USART in an hexadecimal representation. More...
 
void print_short_hex (volatile avr32_usart_t *usart, unsigned short n)
 Prints a short integer to a given USART in an hexadecimal representation. More...
 
void print_ulong (volatile avr32_usart_t *usart, unsigned long n)
 Prints an integer to a given USART in a decimal representation. More...