#ifndef hal_hle_ipmbox_h #define hal_hle_ipmbox_h /* Cesar project {{{ * * Copyright (C) 2007 Spidcom * * <<>> * * }}} */ /** * \file hal/hle/ipmbox.h * \brief HAL HLE public interface. * \ingroup hal_hle */ #include "hal/hle/forward.h" // for 'ipmbox_t' /** * RX DSR callback function. * \param user_data user data * \param first_msg pointer to the first received message header * \param length total length (in word) of received messages */ typedef void (*ipmbox_rx_cb_t) (void *user_data, u32 *first_msg, uint length); BEGIN_DECLS /** * Initialise the HAL HLE. * \param user_data user data passed to any callback * \param rx_cb RX DSR callback, callback used when an Ethernet packet is received * \return the newly created context */ ipmbox_t * ipmbox_init (void *user_data, ipmbox_rx_cb_t rx_cb); /** * Activate ipmbox interruptions. * \param ctx ipmbox context * \param activation indicates if interruptions are activated or deactivated */ void ipmbox_activate (ipmbox_t *ctx, bool activation); /** * Uninitialise the HAL HLE. * \param ctx ipmbox context */ void ipmbox_uninit (ipmbox_t *ctx); /** * Transmit an Ethernet packet. * \param ctx ipmbox context * \param first_msg pointer to the first received message header * \param length total length (in word) of messages to transmit */ void ipmbox_tx (ipmbox_t *ctx, u32 *first_msg, uint length); END_DECLS #endif /* hal_hle_ipmbox_h */