Loading...
Searching...
No Matches
bhp.h
1/*
2 * SPDX-FileCopyrightText: 2022 HAW Hamburg
3 * SPDX-License-Identifier: LGPL-2.1-only
4 */
5
6#pragma once
7
27
28#ifdef __cplusplus
29extern "C" {
30#endif
31
35typedef struct bhp bhp_t;
36
42typedef void (*bhp_cb_t)(void *arg);
43
47struct bhp {
49 void *ctx;
50};
51
60static inline void bhp_irq_handler(bhp_t *bhp)
61{
63}
64
75static inline void bhp_set_cb(bhp_t *bhp, bhp_cb_t cb, void *ctx)
76{
77 bhp->irq_handler = cb;
78 bhp->ctx = ctx;
79}
80
81#ifdef __cplusplus
82}
83#endif
84
static void bhp_irq_handler(bhp_t *bhp)
Call the IRQ handler associated to a Bottom Half Processor descriptor.
Definition bhp.h:60
struct bhp bhp_t
Forward declaration of the Bottom Half Processor descriptor.
Definition bhp.h:35
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:75
void(* bhp_cb_t)(void *arg)
A Bottom Half Processor callback.
Definition bhp.h:42
Bottom Half Processor descriptor.
Definition bhp.h:47
void * ctx
Context of the IRQ handler.
Definition bhp.h:49
bhp_cb_t irq_handler
Bottom Half Processor IRQ handler.
Definition bhp.h:48