MAX32665 SDK Documentation
0.2
Software Development Kit Overview and API Documentation
pb.h
1
5
/* ****************************************************************************
6
* Copyright (C) 2016 Maxim Integrated Products, Inc., All Rights Reserved.
7
*
8
* Permission is hereby granted, free of charge, to any person obtaining a
9
* copy of this software and associated documentation files (the "Software"),
10
* to deal in the Software without restriction, including without limitation
11
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
12
* and/or sell copies of the Software, and to permit persons to whom the
13
* Software is furnished to do so, subject to the following conditions:
14
*
15
* The above copyright notice and this permission notice shall be included
16
* in all copies or substantial portions of the Software.
17
*
18
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
19
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
20
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
21
* IN NO EVENT SHALL MAXIM INTEGRATED BE LIABLE FOR ANY CLAIM, DAMAGES
22
* OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
23
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
24
* OTHER DEALINGS IN THE SOFTWARE.
25
*
26
* Except as contained in this notice, the name of Maxim Integrated
27
* Products, Inc. shall not be used except as stated in the Maxim Integrated
28
* Products, Inc. Branding Policy.
29
*
30
* The mere transfer of this software does not imply any licenses
31
* of trade secrets, proprietary technology, copyrights, patents,
32
* trademarks, maskwork rights, or any other form of intellectual
33
* property whatsoever. Maxim Integrated Products, Inc. retains all
34
* ownership rights.
35
*
36
* $Date: 2019-04-09 10:18:33 -0500 (Tue, 09 Apr 2019) $
37
* $Revision: 42264 $
38
*
39
*************************************************************************** */
40
41
#ifndef _PB_H_
42
#define _PB_H_
43
44
#include "gpio.h"
45
46
#ifdef __cplusplus
47
extern
"C"
{
48
#endif
49
54
/* **** Global Variables **** */
55
extern
const
gpio_cfg_t
pb_pin[];
56
extern
const
unsigned
int
num_pbs;
57
58
/* **** Function Prototypes **** */
59
66
int
PB_Init
(
void
);
67
79
typedef
void (*
pb_callback
)(
void
*pb);
80
95
int
PB_RegisterCallback
(
unsigned
int
pb,
pb_callback
callback);
96
111
int
PB_RegisterRiseFallCallback
(
unsigned
int
pb,
pb_callback
callback);
112
118
void
PB_IntEnable
(
unsigned
int
pb);
119
124
void
PB_IntDisable
(
unsigned
int
pb);
125
130
void
PB_IntClear
(
unsigned
int
pb);
131
138
int
PB_Get
(
unsigned
int
pb);
140
#ifdef __cplusplus
141
}
142
#endif
143
144
#endif
/* _PB_H_ */
gpio_cfg_t
Structure type for configuring a GPIO port.
Definition:
gpio.h:138
PB_IntClear
void PB_IntClear(unsigned int pb)
Clear a callback interrupt.
PB_Init
int PB_Init(void)
Initialize all push buttons.
PB_RegisterCallback
int PB_RegisterCallback(unsigned int pb, pb_callback callback)
Register or Unregister a callback handler for events on the pb push button.
PB_RegisterRiseFallCallback
int PB_RegisterRiseFallCallback(unsigned int pb, pb_callback callback)
Register or Unregister a callback handler for rising and falling events on the pb push button...
PB_IntEnable
void PB_IntEnable(unsigned int pb)
Enable a callback interrupt.
PB_IntDisable
void PB_IntDisable(unsigned int pb)
Disable a callback interrupt.
pb_callback
void(* pb_callback)(void *pb)
Type alias pb_callback for the push button callback.
Definition:
pb.h:79
PB_Get
int PB_Get(unsigned int pb)
Get the current state of the push button.
Firmware
Libraries
Boards
Include
pb.h
0.2