Contiki-NG
Toggle main menu visibility
Loading...
Searching...
No Matches
buttons.c
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2026, RISE Research Institutes of Sweden AB
3
* All rights reserved.
4
*
5
* Redistribution and use in source and binary forms, with or without
6
* modification, are permitted provided that the following conditions
7
* are met:
8
*
9
* 1. Redistributions of source code must retain the above copyright
10
* notice, this list of conditions and the following disclaimer.
11
*
12
* 2. Redistributions in binary form must reproduce the above copyright
13
* notice, this list of conditions and the following disclaimer in the
14
* documentation and/or other materials provided with the distribution.
15
*
16
* 3. Neither the name of the copyright holder nor the names of its
17
* contributors may be used to endorse or promote products derived
18
* from this software without specific prior written permission.
19
*
20
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
21
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
23
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
24
* COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
25
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
26
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
27
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
29
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
30
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
31
* OF THE POSSIBILITY OF SUCH DAMAGE.
32
*/
33
34
/**
35
* \file
36
* Button HAL definitions for MSP-EXP430FR5969 LaunchPad
37
*
38
* S1 -> P4.5, S2 -> P1.1. Both buttons short to ground when
39
* pressed and rely on the MCU's internal pull-up.
40
*/
41
42
#include "contiki.h"
43
#include "
dev/button-hal.h
"
44
45
BUTTON_HAL_BUTTON(button_s1,
"Button S1"
,
46
BUTTON_S1_PORT, BUTTON_S1_PIN,
47
GPIO_HAL_PIN_CFG_PULL_UP,
48
BUTTON_HAL_ID_BUTTON_ZERO
,
true
);
49
50
BUTTON_HAL_BUTTON(button_s2,
"Button S2"
,
51
BUTTON_S2_PORT, BUTTON_S2_PIN,
52
GPIO_HAL_PIN_CFG_PULL_UP,
53
BUTTON_HAL_ID_BUTTON_ONE,
true
);
54
55
BUTTON_HAL_BUTTONS(&button_s1, &button_s2);
button-hal.h
Header file for the button HAL.
BUTTON_HAL_ID_BUTTON_ZERO
#define BUTTON_HAL_ID_BUTTON_ZERO
Optional button IDs.
Definition
button-hal.h:134
arch
platform
msp-exp430fr5969
dev
buttons.c
Generated on
for Contiki-NG by
1.17.0