pins.h
Go to the documentation of this file.
1 /*
2  * KubOS HAL
3  * Copyright (C) 2016 Kubos Corporation
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  */
31 #ifndef KUBOS_HAL_MSP430F5529_PINS_H
32 #define KUBOS_HAL_MSP430F5529_PINS_H
33 
34 
35 #include <stdint.h>
36 
37 #define K_LED_0 P10
38 #define K_LED_RED P10
39 
40 #define K_LED_1 P47
41 #define K_LED_GREEN P47
42 
43 #define K_LED_COUNT 2
44 
45 #define K_BUTTON_0 P21
46 
47 
51 typedef struct {
53  volatile uint8_t * dir_pin;
55  volatile uint8_t * out_pin;
57  volatile uint8_t * in_pin;
59  volatile uint8_t * pull_pin;
60  uint8_t bit;
61 } KPinDesc;
62 
69 typedef enum {
70  P10 = 0, P11, P12, P13, P14, P15, P16,
71  P20, P21, P22, P23, P24, P25, P26, P27,
72  P30, P31, P32, P33, P34, P35, P36, P37,
73  P40, P41, P42, P43, P44, P45, P47,
74  P60, P61, P62, P63, P64, P65, P66,
75  P70, P74,
77 } KPin;
78 
79 #endif
Definition: pins.h:73
Definition: pins.h:73
Definition: pins.h:70
Definition: pins.h:73
Definition: pins.h:72
Definition: pins.h:70
Definition: pins.h:72
Definition: pins.h:72
Definition: pins.h:70
Definition: pins.h:74
Definition: pins.h:71
Struct which contains gpio details (dir/out/in/pull pins and bit)
Definition: pins.h:51
Definition: pins.h:72
Definition: pins.h:73
Definition: pins.h:70
Definition: pins.h:76
uint8_t bit
Definition: pins.h:60
Definition: pins.h:74
Definition: pins.h:71
volatile uint8_t * in_pin
PxIN.
Definition: pins.h:57
Definition: pins.h:73
Definition: pins.h:70
Definition: pins.h:75
Definition: pins.h:73
Definition: pins.h:74
Definition: pins.h:70
Definition: pins.h:70
Definition: pins.h:75
Definition: pins.h:72
Definition: pins.h:71
Definition: pins.h:71
Definition: pins.h:72
Definition: pins.h:76
Definition: pins.h:74
volatile uint8_t * pull_pin
PxREN.
Definition: pins.h:59
KPin
Enum containing gpios currently setup.
Definition: pins.h:69
volatile uint8_t * out_pin
PxOUT.
Definition: pins.h:55
Definition: pins.h:74
Definition: pins.h:71
Definition: pins.h:71
Definition: pins.h:74
Definition: pins.h:74
Definition: pins.h:71
Definition: pins.h:72
volatile uint8_t * dir_pin
PxDIR.
Definition: pins.h:53
Definition: pins.h:72
Definition: pins.h:73
Definition: pins.h:71