Edge AI Add-on API 2.2.0
Loading...
Searching...
No Matches
button.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2026 Nordic Semiconductor ASA
3 *
4 * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
5 */
6
30#ifndef __BUTTON_H__
31#define __BUTTON_H__
32
33#include "../common.h"
34
35#ifdef __cplusplus
36extern "C" {
37#endif /* __cplusplus */
38
40#define BUTTON_SHORT_CLICK_MSEC 500
41
43#define BUTTON_LONG_CLICK_MSEC 2000
44
52
61
67int button_init(void);
68
77
78#ifdef __cplusplus
79}
80#endif /* __cplusplus */
81
82#endif /* __BUTTON_H__ */
83
int button_init(void)
Initialize the button module and its GPIO ISR.
void(* button_click_handler_t)(button_click_t click)
Button click handler type.
Definition button.h:60
button_click_t
Detected button click type.
Definition button.h:48
@ BUTTON_CLICK_LONG
Definition button.h:50
@ BUTTON_CLICK_SHORT
Definition button.h:49
void button_reg_click_handler(button_click_handler_t click_handler)
Register a click handler.