Board Specific Support Functions: Definitions and Prototypes More...
Macros | |
#define | COMMON_CODE_SECTION ".commontext" |
#define | CHIP_DM642 |
#define | INC_CPRINTF |
#define | INC_COMMON |
#define | INC_UART |
#define | INC_TIMER |
#define | CPRINTF_CCS_AVAILABLE 1 |
#define | CPRINTF_UART_AVAILABLE 1 |
#define | USE_UART_CONTROL 1 |
#define | CPRINTF_DEFAULT_OUTPUT CPRINTF_UART_OUTPUT /* UART outputs */ |
#define | TIMER_HANDLER_FUNCTION eventTimerHandler |
#define | SYSTEM_TIMER TIMER_DEVANY |
#define | AckTimerInterrupt() |
#define | SYSTEM_TIMER_INT 10 |
#define | TIMER_HANDLER_INTERRUPT interrupt void TIMER_HANDLER_FUNCTION(void) |
#define | BLANK_REV CPuts(" | |\r\n"); |
#define | START_UP_MESSAGE(rev) |
#define | tpOutputFunc tpOutputFunc |
#define | FTP_BUFFER_SIZE 0x20000 /* used in FTP client and server */ |
#define | TCP_TX_PACKETS 64 |
#define | TCP_SEND_BUFFER_SIZE (TCP_MAX_PACKET_SIZE * TCP_TX_PACKETS) |
#define | KA_TIMEOUT(x) ((x)*UINT32_C(120000)) |
#define | FTP_SERVER_TIMEOUT UINT32_C(50000000) /* used in FTP server */ |
#define | CONNECT_TIMEOUT UINT32_C(1000000) /* used in FTP client */ |
#define | SMTP_CONNECT_TIMEOUT UINT32_C(50000) /* used in SMTP */ |
#define | SHUTDOWN_TIMEOUT UINT32_C(10000) /* used in SMTP */ |
#define | GET_CLOCK DM2_dspGetClock() |
#define | ANIMATE_SYMBOLS_COUNT 4 |
#define | ASSERT_UART() if (h_Uart == NULL) prg_exit ("No UART handle error") |
Typedefs | |
typedef int(* | tpOutputFunc) (const char *format,...) |
Functions | |
void | BoardAppInit (uint32_t dsp_clock) |
board specific initialization More... | |
void | BoardPeripheralInit (void) |
board specific peripheral initialization More... | |
void | BoardPeripheralClose (void) |
close board specific peripherals More... | |
void | BoardInitializeInterrupts (void) |
initialize interrupts More... | |
void | BoardEnableInterrupts (void) |
global enable interrupts More... | |
void | BoardDisableInterrupts (void) |
void | BoardDisableEDMA (void) |
void | link_status (uint8_t mode) |
link status change callback function More... | |
uint16_t | monitor_link_status (tpOutputFunc pLog) |
monitor link status change More... | |
uint16_t | monitor_ip_address (tpOutputFunc pLog) |
monitor IP assignment More... | |
int | InitializeNetwork (uint16_t icmp_size) |
Initialize MAC, sockets and protocols. More... | |
int | BoardUartInit (void) |
Initialize UART. More... | |
void | BoardUartWriteString (const char *str) |
write string over UART More... | |
int | BoardUartWriteFormattedString (const char *format,...) |
write formatted string over UART More... | |
int32_t | BoardUartWriteChar (char c) |
write one character via the UART More... | |
int32_t | BoardUartReadChar (char *c) |
read one character from the UART More... | |
char * | BoardUartReadString (char *dst, size_t maxlen, uint32_t timeout, int32_t echo) |
read String from UART More... | |
int | BoardInitializeTimer (uint32_t timer_clock, int port, uint32_t utime) |
Initialize timer. More... | |
void | BoardPlugTimerHandler (int32_t cpuint, int port, void(*eventTimerHandler)(void)) |
install timer interrupt handler More... | |
void | BoardStartTimer (int port) |
start timer More... | |
void | BoardStopTimer (int port) |
stop timer More... | |
void | LED_init () |
void | LED_off (unsigned int ledNum) |
void | LED_on (unsigned int ledNum) |
void | LED_toggle (unsigned int ledNum) |
uint16_t | LED_state (void) |
void | KEY_init (void) |
int | KEY_pressed (unsigned int keyNum) |
Variables | |
Uint16 | SystemTimerDev |
uint32_t | DspClock |
uint32_t | TimerClock |
char | module_str [] |
char | sym_animate [] |
T_Handle | h_Uart |
char * | printf_uart_str |
_ _ _ __| | ___(_) ____ _ __ | |_ / _` | / __| |/ _` | '_ \| __| | (_| | _ \__ \ | (_| | | | | |_ \__,_|(_) ___/_|\__, |_| |_|\__| Signalprocessing |___/ Technology
#define COMMON_CODE_SECTION ".commontext" |
#define CHIP_DM642 |
#define INC_CPRINTF |
define available peripheralsinclude CPrintf defines: cprintf.h
#define INC_COMMON |
include Common functions: Common.h
#define INC_UART |
include UART IO support: uartio.h
#define INC_TIMER |
include timer module: timer.h
#define CPRINTF_CCS_AVAILABLE 1 |
enable available CPrintf Outputs
#define CPRINTF_UART_AVAILABLE 1 |
#define USE_UART_CONTROL 1 |
#define CPRINTF_DEFAULT_OUTPUT CPRINTF_UART_OUTPUT /* UART outputs */ |
#define TIMER_HANDLER_FUNCTION eventTimerHandler |
Timer handler function prototype for timer.c
#define SYSTEM_TIMER TIMER_DEVANY |
Timer port assignment available ports: 0 and 1 -1: let the CSL select the next free timer define TIMER_DEVANY (-1) define TIMER_DEV0 (0) define TIMER_DEV1 (1)
#define AckTimerInterrupt | ( | ) |
#define SYSTEM_TIMER_INT 10 |
Timer CPU interrupt
#define TIMER_HANDLER_INTERRUPT interrupt void TIMER_HANDLER_FUNCTION(void) |
#define BLANK_REV CPuts(" | |\r\n"); |
start-up message
#define START_UP_MESSAGE | ( | rev | ) |
#define tpOutputFunc tpOutputFunc |
#define FTP_BUFFER_SIZE 0x20000 /* used in FTP client and server */ |
#define TCP_TX_PACKETS 64 |
#define TCP_SEND_BUFFER_SIZE (TCP_MAX_PACKET_SIZE * TCP_TX_PACKETS) |
#define KA_TIMEOUT | ( | x | ) | ((x)*UINT32_C(120000)) |
#define FTP_SERVER_TIMEOUT UINT32_C(50000000) /* used in FTP server */ |
#define CONNECT_TIMEOUT UINT32_C(1000000) /* used in FTP client */ |
#define GET_CLOCK DM2_dspGetClock() |
#define ANIMATE_SYMBOLS_COUNT 4 |
UART check
typedef int(* tpOutputFunc) (const char *format,...) |
Message log function. E.g. printf() or CPrintf() Use with net_print_stat()
void BoardAppInit | ( | uint32_t | dsp_clock | ) |
dsp_clock | [Hz] |
Make board specific settings. Store or determine configured clocks. Call further board specific initialization functions for e.g PLL, EMIF, XINTF and prepare interrupts.
void BoardPeripheralInit | ( | void | ) |
- |
void BoardPeripheralClose | ( | void | ) |
- |
void BoardInitializeInterrupts | ( | void | ) |
void BoardEnableInterrupts | ( | void | ) |
- |
void BoardDisableInterrupts | ( | void | ) |
void BoardDisableEDMA | ( | void | ) |
int InitializeNetwork | ( | uint16_t | icmp_size | ) |
icmp_size | - space for ICMP (ping)) |
int BoardUartInit | ( | void | ) |
void BoardUartWriteString | ( | const char * | str | ) |
int BoardUartWriteFormattedString | ( | const char * | format, |
... | |||
) |
int32_t BoardUartWriteChar | ( | char | c | ) |
c | - character to write |
int32_t BoardUartReadChar | ( | char * | c | ) |
c | - pointer to character storage |
dst | - pointer to destination buffer |
maxlen | - maximum string length (size of destination buffer) in bytes |
timeout | - number of retries until data is received, 0 = no timeout |
echo | - echo received characters |
timer_clock | - PLL configured clock speed (in MHz) |
port | - timer port |
utime | - desired timer frequency in u-seconds |
void BoardPlugTimerHandler | ( | int32_t | cpuint, |
int | port, | ||
void(*)(void) | eventTimerHandler | ||
) |
cpuint | - CPU interrupt |
port | - timer port |
eventTimerHandler | - timer interrupt handler |
void BoardStartTimer | ( | int | port | ) |
void BoardStopTimer | ( | int | port | ) |
void LED_init | ( | ) |
void LED_off | ( | unsigned int | ledNum | ) |
Function LED_off
Parameter Returns Calls
void LED_on | ( | unsigned int | ledNum | ) |
Function LED_on
Parameter Returns Calls
void LED_toggle | ( | unsigned int | ledNum | ) |
uint16_t LED_state | ( | void | ) |
void KEY_init | ( | void | ) |
int KEY_pressed | ( | unsigned int | keyNum | ) |
Uint16 SystemTimerDev |
uint32_t DspClock |
uint32_t TimerClock |
char module_str[] |
char sym_animate[] |
T_Handle h_Uart |
char* printf_uart_str |