summaryrefslogtreecommitdiff
path: root/cesar/interface/fcall/inc/context.h
blob: 7d5656a5033fcb837e02169b97d2c0dcbd6a15d2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#ifndef interface_fcall_inc_context_h
#define interface_fcall_inc_context_h
/* Cesar project {{{
 *
 * Copyright (C) 2008 Spidcom
 *
 * <<<Licence>>>
 *
 * }}} */
/**
 * \file    interface/fcall/inc/context.h
 * \brief   Context of the interface fcall module.
 * \ingroup interface/fcall 
 *
 */
#include "interface/forward.h"
#include "host/sci/sci.h"

typedef u8* (*interface_buffer_work_get_cb_t) (interface_t *ctx);
typedef void (*interface_fcall_send_message_cb_t) (void *user_data, u8 *message, uint length);

typedef struct interface_fcall_t
{
    sci_ctx_t *sci_ctx; /** pointer to the SCI context */
    interface_buffer_work_get_cb_t buffer_cb; /** get buffer function */
    interface_fcall_send_message_cb_t send_cb; /** callback function to call when the interface fcall module needs to send a message */
    void *user_data; /** data to provide on callback function */
} interface_fcall_t;

#endif /* interface_fcall_inc_context_h */