www.beck-ipc.com

@CHIP-RTOS C Library V2.06 - Fossil API Structures


Fossil User CallBack Event data structure

Fossil User CallBack Event

typedef struct
{
    int size;  
    int port;  
    int event;  
    void far *data;  
    unsigned data_length;  
} fossil_event_t ;

Members

size

Size of this struct (sizeof(fossil_event_t))

port

Serial port:
    FOSSIL_EXT = 0 for EXT port
    FOSSIL_COM = 1 for COM port
    FOSSIL_SER2 = 2 for SER2 port (SC1x3 only)
    FOSSIL_SER3 = 3 for SER3 port (SC1x3 only)

event

Possible events

data

Data pointer

data_length

Data length

Comments

The fossil_event_struct contains the event which has occured. Following events are possible:
FE_DATA_AVAIL   0x01 : New Data Received (in the data field)
FE_READY_FOR_SEND   0x02 : (not supported at time)
FE_ERROR_DETECTED   0x10 : (not supported at time)

Also the callback function could return a fossil_event_struct. Then the returned struct contains an action event which the caller of the callback (the fossil interface) has to do. Following events are possible:
FE_IGNORE_DATA   0x01 : do not copy the reveived data in the Receive Queue
FE_DATA_TO_SEND   0x02 : (not supported at time)

If the callback does not return any event, the return value must be a null pointer (=0L).

See Also


This API List
List of C Libraries
@CHIP-RTOS Main Index


End of document