Event mechanism.
Copyright (c) 2018 Microchip Technology Inc. and its subsidiaries.
#include <stdint.h>
#include <stdbool.h>
#include "string.h"
#include "memory.h"
#include "event_mem.h"
#include "bm_application_mode.h"
Functions | |
event_status_t | ble_event_get (event_t *event_param) |
bool | event_fifo_empty (void) |
bool | event_fifo_full (void) |
bool | event_fifo_init (event_t *event_mem, uint16_t event_mem_size) |
event_status_t | event_fifo_read (event_t *event) |
event_status_t | event_fifo_write (event_t *event) |
event_status_t | interface_event_get (void) |
Variables | |
static event_fifo_t | event_fifo |
event_status_t ble_event_get | ( | event_t * | event_param | ) |
References BLE_EVENT_Q_EMPTY, BLE_EVENT_SUCCESS, BM_Application_EventParser(), event_msg_t::data, event_msg_t::data_len, event, event_fifo_read(), event_t::event_id, event_t::event_msg, interface_event_get(), and mem_free().
Referenced by ble_gatt_service_read(), and ble_mgr_get_event().
bool event_fifo_empty | ( | void | ) |
References _event_fifo_t::head, _event_fifo_t::tail, and _event_fifo_t::wrap_flag.
Referenced by event_fifo_read().
bool event_fifo_full | ( | void | ) |
References _event_fifo_t::head, _event_fifo_t::tail, and _event_fifo_t::wrap_flag.
Referenced by event_fifo_write().
References _event_fifo_t::buffer, event_mem, _event_fifo_t::head, NULL, _event_fifo_t::size, _event_fifo_t::tail, and _event_fifo_t::wrap_flag.
Referenced by interface_init().
event_status_t event_fifo_read | ( | event_t * | event | ) |
References BLE_EVENT_Q_EMPTY, BLE_EVENT_SUCCESS, _event_fifo_t::buffer, event_fifo_empty(), _event_fifo_t::size, _event_fifo_t::tail, and _event_fifo_t::wrap_flag.
Referenced by ble_event_get().
event_status_t event_fifo_write | ( | event_t * | event | ) |
References BLE_EVENT_Q_INSUFFICIENT_MEMORY, BLE_EVENT_Q_OVERFLOW, BLE_EVENT_SUCCESS, _event_fifo_t::buffer, event_msg_t::data, event_msg_t::data_len, event_fifo_full(), event_t::event_msg, _event_fifo_t::head, mem_alloc(), NULL, _event_fifo_t::size, and _event_fifo_t::wrap_flag.
Referenced by interface_event_get(), and interface_event_process().
event_status_t interface_event_get | ( | void | ) |
|
static |