/
board.h
64 lines (54 loc) · 1.74 KB
/
board.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
/**
* @file boards/arduino_pro_micro/board.h
*
* @section License
* Copyright (C) 2014-2016, Erik Moqvist
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* This file is part of the Simba project.
*/
#ifndef __BOARD_H__
#define __BOARD_H__
#define pin_d2_dev pin_device[11]
#define pin_d3_dev pin_device[10]
#define pin_d4_dev pin_device[14]
#define pin_d5_dev pin_device[8]
#define pin_d6_dev pin_device[17]
#define pin_d7_dev pin_device[18]
#define pin_d8_dev pin_device[4]
#define pin_d9_dev pin_device[5]
#define pin_d10_dev pin_device[6]
#define pin_d14_dev pin_device[3]
#define pin_d15_dev pin_device[1]
#define pin_d16_dev pin_device[2]
#define pin_a0_dev pin_device[24]
#define pin_a1_dev pin_device[23]
#define pin_a2_dev pin_device[22]
#define pin_a3_dev pin_device[21]
#define pin_led_dev pin_device[0]
#define exti_d2_dev exti_device[0]
#define exti_d3_dev exti_device[1]
#define pwm_d3_dev pwm_device[3]
#define pwm_d9_dev pwm_device[0]
#define pwm_d10_dev pwm_device[1]
#define pwm_d11_dev pwm_device[2]
#define adc_0_dev adc_device[0]
#define i2c_0_dev i2c_device[0]
/**
* Convert given pin string to the pin number.
*
* @param[in] str_p Pin as a string.
*
* @return Pin number of negative error code.
*/
int board_pin_string_to_device_index(const char *str_p);
#endif