Loading...
Searching...
No Matches
bhp.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
29#ifndef BHP_H
30#define BHP_H
31
32#ifdef __cplusplus
33extern "C" {
34#endif
35
39typedef struct bhp bhp_t;
40
46typedef void (*bhp_cb_t)(void *arg);
47
51struct bhp {
53 void *ctx;
54};
55
64static inline void bhp_irq_handler(bhp_t *bhp)
65{
67}
68
79static inline void bhp_set_cb(bhp_t *bhp, bhp_cb_t cb, void *ctx)
80{
81 bhp->irq_handler = cb;
82 bhp->ctx = ctx;
83}
84
85#ifdef __cplusplus
86}
87#endif
88
89#endif /* BHP_H */
static void bhp_irq_handler(bhp_t *bhp)
Call the IRQ handler associated to a Bottom Half Processor descriptor.
Definition bhp.h:64
static void bhp_set_cb(bhp_t *bhp, bhp_cb_t cb, void *ctx)
Set the callback for a Bottom Half Processor.
Definition bhp.h:79
void(* bhp_cb_t)(void *arg)
A Bottom Half Processor callback.
Definition bhp.h:46
Bottom Half Processor descriptor.
Definition bhp.h:51
void * ctx
Context of the IRQ handler.
Definition bhp.h:53
bhp_cb_t irq_handler
Bottom Half Processor IRQ handler.
Definition bhp.h:52