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
36
extern
"C"
{
37
#endif
/* __cplusplus */
38
40
#define BUTTON_SHORT_CLICK_MSEC 500
41
43
#define BUTTON_LONG_CLICK_MSEC 2000
44
48
typedef
enum
{
49
BUTTON_CLICK_SHORT
= 0,
50
BUTTON_CLICK_LONG
,
51
}
button_click_t
;
52
60
typedef
void (*
button_click_handler_t
)(
button_click_t
click);
61
67
int
button_init
(
void
);
68
76
void
button_reg_click_handler
(
button_click_handler_t
click_handler);
77
78
#ifdef __cplusplus
79
}
80
#endif
/* __cplusplus */
81
82
#endif
/* __BUTTON_H__ */
83
common.h
button_init
int button_init(void)
Initialize the button module and its GPIO ISR.
button_click_handler_t
void(* button_click_handler_t)(button_click_t click)
Button click handler type.
Definition
button.h:60
button_click_t
button_click_t
Detected button click type.
Definition
button.h:48
BUTTON_CLICK_LONG
@ BUTTON_CLICK_LONG
Definition
button.h:50
BUTTON_CLICK_SHORT
@ BUTTON_CLICK_SHORT
Definition
button.h:49
button_reg_click_handler
void button_reg_click_handler(button_click_handler_t click_handler)
Register a click handler.
applications
gesture_recognition
src
hw_modules
button
button.h
Generated on Thu Jul 9 2026 11:59:51 for Edge AI Add-on API by
1.12.0