event.h
1 /*
2  * Copyright (C) 2022 HAW Hamburg
3  *
4  * This file is subject to the terms and conditions of the GNU Lesser General
5  * Public License v2.1. See the file LICENSE in the top level directory for more
6  * details.
7  */
8 
9 #pragma once
10 
21 #include "bhp.h"
22 #include <event.h>
23 
24 #ifdef __cplusplus
25 extern "C" {
26 #endif
27 
31 typedef struct {
35 } bhp_event_t;
36 
45 void bhp_event_init(bhp_event_t *bhp_ev, event_queue_t *evq, bhp_cb_t cb, void *ctx);
46 
54 void bhp_event_isr_cb(void *bhp_event_ctx);
55 
56 #ifdef __cplusplus
57 }
58 #endif
59 
void bhp_event_init(bhp_event_t *bhp_ev, event_queue_t *evq, bhp_cb_t cb, void *ctx)
Init a Bottom Half Processor to be used with events.
void bhp_event_isr_cb(void *bhp_event_ctx)
Event based Bottom Half Processor ISR callback To be called from ISR in order to trigger the Bottom H...
void(* bhp_cb_t)(void *arg)
A Bottom Half Processor callback.
Definition: bhp.h:45
Asynchronous sock using Event Queue definitions.
event queue structure
Definition: event.h:153
Event based Bottom Half Processor descriptor.
Definition: event.h:31
bhp_t bhp
Bottom Half Processor descriptor.
Definition: event.h:32
event_queue_t * evq
Pointer to the event queue.
Definition: event.h:33
event_t ev
Event holding the Bottom Half Processor handler.
Definition: event.h:34
Bottom Half Processor descriptor.
Definition: bhp.h:50
event structure
Definition: event.h:145