Keil™, An ARM® Company

ULINK®2 User's Guide

API Functions

The Real-Time Agent API (Application Program Interface) is defined in C:\KEIL\ARM\RT AGENT\TEMPLATE\RT_AGENT.H. It contains routines that initialize the Real-Time Agent and that send user-defined messages back to µVision. Some routines are reserved for future use.

The following API routines are available:

Real-Time Agent API

RoutineDescription
RTA_InitInitialise Real-Time Agent.
This routine must be called before any other RTA routine. Memory read and writes will executing will not be available until this function has been called on the target.
RTA_MsgSend a message to the host via Real-Time Agent.
This routine is reserved for future use.
RTA_TermIsKeyCheck is there is a character available in the terminal emulator buffer.
This routine is non-blocking.
RTA_TermGetCharGet a character from the RTA terminal (RTA Terminal Window).
This routine blocks until a character is available.
RTA_TermPutCharWrite a character to the RTA terminal (RTA Terminal Window).
This routine blocks until buffer space is available if and only if 'Block on Write' is enabled in the Configuation Wizard, otherwise it discards the character.
RTA_printfPrint a formatted string to the RTA terminal (RTA Terminal Window).
This routine's parameters are the same as those for printf(). I/O Retargeting must be enabled to use this macro.
RTA_scanfScan a formatted string from the RTA terminal (RTA Terminal Window).
This routine's parameters are the same as those for scanf(). I/O Retargeting must be enabled to use this macro.

Real-Time Agent Extended API (for Polled Mode and ATMEL AT91SAM7Sx only)

RoutineDescription
RTA_tx_word_extTransmits Real-Time Agent data.
Must be called periodically from an interrupt in Polled Mode, or in the system interrupt handler for the ATMEL AT91SAM7Sx (refer to Configuring the Real-Time Agent).
RTA_rx_word_extReceives Real-Time Agent data.
Must be called periodically from an interrupt in Polled Mode, or in the system interrupt handler for the ATMEL AT91SAM7Sx (refer to Configuring the Real-Time Agent).

Real-Time Agent Extended API (for Polled Mode only)

RoutineDescription
RTA_irq_enable_extThis function must enable the periodic interrupt that calls RTA_tx_word_ext() and RTA_rx_word_ext().
Must be implemented in Polled Mode.
RTA_irq_disable_extThis function must disable the periodic interrupt that calls RTA_tx_word_ext() and RTA_rx_word_ext().
Must be implemented in Polled Mode.