Skip to content

Commit e5ab98b

Browse files
committed
partial: add GPIO write pins
1 parent 13664e7 commit e5ab98b

File tree

3 files changed

+130
-0
lines changed

3 files changed

+130
-0
lines changed

variants/MBN52DK/pins_arduino.h

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
/*
2+
Copyright (c) 2014-2015 Arduino LLC. All right reserved.
3+
This library is free software; you can redistribute it and/or
4+
modify it under the terms of the GNU Lesser General Public
5+
License as published by the Free Software Foundation; either
6+
version 2.1 of the License, or (at your option) any later version.
7+
This library is distributed in the hope that it will be useful,
8+
but WITHOUT ANY WARRANTY; without even the implied warranty of
9+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
10+
See the GNU Lesser General Public License for more details.
11+
You should have received a copy of the GNU Lesser General Public
12+
License along with this library; if not, write to the Free Software
13+
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
14+
*/
15+
16+
// API compatibility
17+
#include "variant.h"

variants/MBN52DK/variant.cpp

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
/*
2+
Copyright (c) 2014-2015 Arduino LLC. All right reserved.
3+
Copyright (c) 2016 Sandeep Mistry All right reserved.
4+
5+
This library is free software; you can redistribute it and/or
6+
modify it under the terms of the GNU Lesser General Public
7+
License as published by the Free Software Foundation; either
8+
version 2.1 of the License, or (at your option) any later version.
9+
10+
This library is distributed in the hope that it will be useful,
11+
but WITHOUT ANY WARRANTY; without even the implied warranty of
12+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
13+
See the GNU Lesser General Public License for more details.
14+
15+
You should have received a copy of the GNU Lesser General Public
16+
License along with this library; if not, write to the Free Software
17+
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
18+
*/
19+
20+
#include "variant.h"
21+
22+
const uint32_t g_ADigitalPinMap[] = {
23+
3,
24+
21,
25+
14,
26+
15,
27+
4,
28+
5,
29+
6,
30+
17,
31+
9,
32+
20,
33+
7,
34+
20,
35+
2,
36+
7
37+
};

variants/MBN52DK/variant.h

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
/*
2+
Copyright (c) 2014-2015 Arduino LLC. All right reserved.
3+
Copyright (c) 2016 Sandeep Mistry All right reserved.
4+
This library is free software; you can redistribute it and/or
5+
modify it under the terms of the GNU Lesser General Public
6+
License as published by the Free Software Foundation; either
7+
version 2.1 of the License, or (at your option) any later version.
8+
This library is distributed in the hope that it will be useful,
9+
but WITHOUT ANY WARRANTY; without even the implied warranty of
10+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
11+
See the GNU Lesser General Public License for more details.
12+
You should have received a copy of the GNU Lesser General Public
13+
License along with this library; if not, write to the Free Software
14+
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
15+
*/
16+
17+
#ifndef _VARIANT_MBN52_DK_
18+
#define _VARIANT_MBN52_DK_
19+
20+
/** Master clock frequency */
21+
#define VARIANT_MCK (64000000ul)
22+
23+
/*----------------------------------------------------------------------------
24+
* Headers
25+
*----------------------------------------------------------------------------*/
26+
27+
#include "WVariant.h"
28+
29+
#ifdef __cplusplus
30+
extern "C"
31+
{
32+
#endif // __cplusplus
33+
34+
// Number of pins defined in PinDescription array
35+
#define PINS_COUNT (26u)
36+
#define NUM_DIGITAL_PINS (13u)
37+
#define NUM_ANALOG_INPUTS (5u)
38+
#define NUM_ANALOG_OUTPUTS (0u)
39+
40+
41+
#define P0_02 (21)
42+
#define P0_03 (14)
43+
#define P0_04 (15)
44+
#define P0_05 (20)
45+
// #define P0_06 (21) // Not exposed on the DK
46+
// #define P0_07 (14) // Not controllable
47+
// #define P0_08 (21) // Not controllable
48+
// #define P0_09 (14) // Not controllable
49+
// #define P0_10 (21) // Not controllable
50+
// #define P0_11 (14) // Not controllable
51+
// #define P0_12 (21) // Not controllable
52+
#define P0_13 (2)
53+
#define P0_14 (3)
54+
#define P0_15 (4)
55+
#define P0_16 (5)
56+
#define P0_17 (6)
57+
#define P0_18 (7)
58+
#define P0_29 (17)
59+
#define P0_30 (9)
60+
61+
#define VCTS (20)
62+
#define RFSWO (7)
63+
64+
65+
#define ADC_RESOLUTION 12
66+
67+
68+
#ifdef __cplusplus
69+
}
70+
#endif
71+
72+
/*----------------------------------------------------------------------------
73+
* Arduino objects - C++ only
74+
*----------------------------------------------------------------------------*/
75+
76+
#endif

0 commit comments

Comments
 (0)