IPC@CHIP® RTOS-PPC – API Documentation

Header image

Main page

void fossil_user_callback ( int  port,

Install a fossil user callback function for the specified serial port. The user callback function will be called when a fossil event occurs.

The callback function must be very short! Long fossil callback functions could lead to character losing. The DMA mode must be disabled in order to use a fossil callback function (see fossil_initmode()).

The callback function must be declared like the function below:
     int my_fossil_callback(fossil_event_t *e)

Note that only one user callback function can be installed per port. To uninstall a user callback function, simply call this function again with a NULL pointer.

The callback function has the possibility to modifiy the event field with a response code.

CAUTION: These callback functions are called in supervisor mode, so be careful when coding the handler functions. The callback is executed directly from the internal serial port interrupt handler and executes with interrupts disabled.

port port number index: 0=UART1 ... 5=UART6, see FOSSIL_PORT
pfFossUCB Pointer to fossil user callback function
This API works slightly different than the SC1x, SC2x and SC1x3 C-Library. The fossil callback prototype differs. The fossil callback function does no longer return an event structure. Instead the response can be directly set in the given event structure pointer.
SC2x3 V1.02 - CLIB V1.02

Top of page | Main page

Copyright © 2018 Beck IPC GmbH
Generated on Thu Nov 1 13:20:15 2018 by Doxygen 1.6.1