![]() |
NANO103 BSP V3.02.000
The Board Support Package for Nano103 Series
|
Nano 103 retarget source file. More...
Go to the source code of this file.
Data Structures | |
struct | __FILE |
Macros | |
#define | DEBUG_PORT UART0 |
#define | BUF_SIZE 512 |
#define | __WEAK __attribute__((weak)) |
Routine to send a char. More... | |
Enumerations | |
enum | { r0 , r1 , r2 , r3 , r12 , lr , pc , psr } |
Functions | |
int | kbhit (void) |
Check any char input from UART. More... | |
int | IsDebugFifoEmpty (void) |
Check if debug message finished. More... | |
void | _ttywrch (int ch) |
C library retargetting. More... | |
int | fputc (int ch, FILE *stream) |
Write character to stream. More... | |
char | GetChar (void) |
Routine to get a char. More... | |
void | SendChar_ToUART (int ch) |
Routine to send a char. More... | |
void | SendChar (int ch) |
static void | DumpStack (uint32_t stack[]) |
Helper function to dump register while hard fault occurred. More... | |
int32_t | SH_Return (int32_t n32In_R0, int32_t n32In_R1, int32_t *pn32Out_R0) |
__attribute__ ((weak)) | |
A callback called by library while smartcard request for a time extension. More... | |
int | fgetc (FILE *stream) |
Get character from UART debug port or semihosting input. More... | |
int | ferror (FILE *stream) |
Check error indicator. More... | |
Variables | |
FILE | __stdout |
FILE | __stdin |
static volatile int32_t | g_ICE_Conneced = 1 |
Nano 103 retarget source file.
Definition in file retarget.c.
#define __WEAK __attribute__((weak)) |
Routine to send a char.
[in] | ch | : A character data writes to debug port |
Send a target char to UART debug port or semihost.
Definition at line 350 of file retarget.c.
#define BUF_SIZE 512 |
Definition at line 30 of file retarget.c.
#define DEBUG_PORT UART0 |
Definition at line 28 of file retarget.c.
anonymous enum |
Enumerator | |
---|---|
r0 | |
r1 | |
r2 | |
r3 | |
r12 | |
lr | |
pc | |
psr |
Definition at line 94 of file retarget.c.
void _ttywrch | ( | int | ch | ) |
C library retargetting.
[in] | ch | Write a character data |
Check if message finished (FIFO empty of debug port)
Definition at line 503 of file retarget.c.
|
static |
Helper function to dump register while hard fault occurred.
[in] | stack | pointer points to the dumped registers in SRAM |
This function is implement to print r0, r1, r2, r3, r12, lr, pc, psr
Definition at line 103 of file retarget.c.
int ferror | ( | FILE * | stream | ) |
Check error indicator.
[in] | stream | Pointer to a FILE object that identifies the stream. |
Checks if the error indicator associated with stream is set, returning a value different from zero if it is. This indicator is generally set by a previous operation on the stream that failed.
Definition at line 603 of file retarget.c.
int fgetc | ( | FILE * | stream | ) |
Get character from UART debug port or semihosting input.
[in] | stream | Pointer to a FILE object that identifies the stream on which the operation is to be performed. |
For get message from debug port or semihosting.
Definition at line 583 of file retarget.c.
int fputc | ( | int | ch, |
FILE * | stream | ||
) |
Write character to stream.
[in] | ch | Character to be written. The character is passed as its int promotion. |
[in] | stream | Pointer to a FILE object that identifies the stream where the character is to be written. |
Writes a character to the stream and advances the position indicator.
The character is written at the current position of the stream as indicated
by the internal position indicator, which is then advanced one character.
Definition at line 527 of file retarget.c.
char GetChar | ( | void | ) |
Routine to get a char.
None |
Wait UART debug port or semihost to input a char.
Definition at line 399 of file retarget.c.
int IsDebugFifoEmpty | ( | void | ) |
Check if debug message finished.
None |
1 | Message is finished |
0 | Message is transmitting. |
Check if message finished (FIFO empty of debug port)
Definition at line 488 of file retarget.c.
int kbhit | ( | void | ) |
Check any char input from UART.
None |
1 | No any char input |
0 | Have some char input |
Check UART RSR RX EMPTY or not to determine if any char input from UART
Definition at line 472 of file retarget.c.
__WEAK void SendChar | ( | int | ch | ) |
Definition at line 352 of file retarget.c.
void SendChar_ToUART | ( | int | ch | ) |
Routine to send a char.
[in] | ch | A character data writes to debug port |
Send a target char to UART debug port .
Definition at line 261 of file retarget.c.
int32_t SH_Return | ( | int32_t | n32In_R0, |
int32_t | n32In_R1, | ||
int32_t * | pn32Out_R0 | ||
) |
Definition at line 175 of file retarget.c.
FILE __stdin |
Definition at line 58 of file retarget.c.
FILE __stdout |
Definition at line 57 of file retarget.c.
|
static |
Definition at line 93 of file retarget.c.