mirror of
https://github.com/jam422470459/EPD-nRF52-hema213.git
synced 2025-12-19 14:53:19 +08:00
move components to SDK dir
This commit is contained in:
117
SDK/12.3.0_d7731ad/components/boards/arduino_primo.h
Normal file
117
SDK/12.3.0_d7731ad/components/boards/arduino_primo.h
Normal file
@@ -0,0 +1,117 @@
|
||||
/**
|
||||
* Copyright (c) 2016 - 2017, Nordic Semiconductor ASA
|
||||
*
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification,
|
||||
* are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this
|
||||
* list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form, except as embedded into a Nordic
|
||||
* Semiconductor ASA integrated circuit in a product or a software update for
|
||||
* such product, must reproduce the above copyright notice, this list of
|
||||
* conditions and the following disclaimer in the documentation and/or other
|
||||
* materials provided with the distribution.
|
||||
*
|
||||
* 3. Neither the name of Nordic Semiconductor ASA nor the names of its
|
||||
* contributors may be used to endorse or promote products derived from this
|
||||
* software without specific prior written permission.
|
||||
*
|
||||
* 4. This software, with or without modification, must only be used with a
|
||||
* Nordic Semiconductor ASA integrated circuit.
|
||||
*
|
||||
* 5. Any software provided in binary form under this license must not be reverse
|
||||
* engineered, decompiled, modified and/or disassembled.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY NORDIC SEMICONDUCTOR ASA "AS IS" AND ANY EXPRESS
|
||||
* OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY, NONINFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL NORDIC SEMICONDUCTOR ASA OR CONTRIBUTORS BE
|
||||
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
|
||||
* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
|
||||
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
*/
|
||||
#ifndef ARDUINO_PRIMO_H
|
||||
#define ARDUINO_PRIMO_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
// LEDs definitions
|
||||
#define LEDS_NUMBER 1
|
||||
|
||||
#define LED_1 25
|
||||
|
||||
#define LEDS_ACTIVE_STATE 0
|
||||
|
||||
#define LEDS_LIST { LED_1}
|
||||
|
||||
#define BSP_LED_0 LED_1
|
||||
|
||||
#define LEDS_INV_MASK 0
|
||||
|
||||
#define BUTTONS_NUMBER 1
|
||||
|
||||
#define BUTTON_START 7
|
||||
#define BUTTON_1 7
|
||||
#define BUTTON_STOP 7
|
||||
#define BUTTON_PULL NRF_GPIO_PIN_PULLUP
|
||||
|
||||
#define BUTTONS_ACTIVE_STATE 0
|
||||
|
||||
#define BUTTONS_LIST { BUTTON_1 }
|
||||
|
||||
#define BSP_BUTTON_0 BUTTON_1
|
||||
|
||||
#define RX_PIN_NUMBER 11
|
||||
#define TX_PIN_NUMBER 12
|
||||
#define CTS_PIN_NUMBER UART_PIN_DISCONNECTED
|
||||
#define RTS_PIN_NUMBER UART_PIN_DISCONNECTED
|
||||
#define HWFC false
|
||||
|
||||
// Arduino board mappings
|
||||
#define ARDUINO_SCL_PIN 27 // SCL signal pin
|
||||
#define ARDUINO_SDA_PIN 26 // SDA signal pin
|
||||
#define ARDUINO_AREF_PIN 2 // Aref pin
|
||||
#define ARDUINO_13_PIN 25 // Digital pin 13
|
||||
#define ARDUINO_12_PIN 24 // Digital pin 12
|
||||
#define ARDUINO_11_PIN 23 // Digital pin 11
|
||||
#define ARDUINO_10_PIN 22 // Digital pin 10
|
||||
#define ARDUINO_9_PIN 20 // Digital pin 9
|
||||
#define ARDUINO_8_PIN 19 // Digital pin 8
|
||||
|
||||
#define ARDUINO_7_PIN 18 // Digital pin 7
|
||||
#define ARDUINO_6_PIN 17 // Digital pin 6
|
||||
#define ARDUINO_5_PIN 16 // Digital pin 5
|
||||
#define ARDUINO_4_PIN 15 // Digital pin 4
|
||||
#define ARDUINO_3_PIN 14 // Digital pin 3
|
||||
#define ARDUINO_2_PIN 13 // Digital pin 2
|
||||
#define ARDUINO_1_PIN 12 // Digital pin 1
|
||||
#define ARDUINO_0_PIN 11 // Digital pin 0
|
||||
|
||||
#define ARDUINO_A0_PIN 3 // Analog channel 0
|
||||
#define ARDUINO_A1_PIN 4 // Analog channel 1
|
||||
#define ARDUINO_A2_PIN 28 // Analog channel 2
|
||||
#define ARDUINO_A3_PIN 29 // Analog channel 3
|
||||
#define ARDUINO_A4_PIN 30 // Analog channel 4
|
||||
#define ARDUINO_A5_PIN 31 // Analog channel 5
|
||||
|
||||
// Low frequency clock source to be used by the SoftDevice
|
||||
#define NRF_CLOCK_LFCLKSRC {.source = NRF_CLOCK_LF_SRC_XTAL, \
|
||||
.rc_ctiv = 0, \
|
||||
.rc_temp_ctiv = 0, \
|
||||
.xtal_accuracy = NRF_CLOCK_LF_XTAL_ACCURACY_20_PPM}
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // ARDUINO_PRIMO_H
|
||||
165
SDK/12.3.0_d7731ad/components/boards/boards.c
Normal file
165
SDK/12.3.0_d7731ad/components/boards/boards.c
Normal file
@@ -0,0 +1,165 @@
|
||||
/**
|
||||
* Copyright (c) 2016 - 2017, Nordic Semiconductor ASA
|
||||
*
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification,
|
||||
* are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this
|
||||
* list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form, except as embedded into a Nordic
|
||||
* Semiconductor ASA integrated circuit in a product or a software update for
|
||||
* such product, must reproduce the above copyright notice, this list of
|
||||
* conditions and the following disclaimer in the documentation and/or other
|
||||
* materials provided with the distribution.
|
||||
*
|
||||
* 3. Neither the name of Nordic Semiconductor ASA nor the names of its
|
||||
* contributors may be used to endorse or promote products derived from this
|
||||
* software without specific prior written permission.
|
||||
*
|
||||
* 4. This software, with or without modification, must only be used with a
|
||||
* Nordic Semiconductor ASA integrated circuit.
|
||||
*
|
||||
* 5. Any software provided in binary form under this license must not be reverse
|
||||
* engineered, decompiled, modified and/or disassembled.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY NORDIC SEMICONDUCTOR ASA "AS IS" AND ANY EXPRESS
|
||||
* OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY, NONINFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL NORDIC SEMICONDUCTOR ASA OR CONTRIBUTORS BE
|
||||
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
|
||||
* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
|
||||
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
*/
|
||||
#include "boards.h"
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
|
||||
#if LEDS_NUMBER > 0
|
||||
static const uint8_t m_board_led_list[LEDS_NUMBER] = LEDS_LIST;
|
||||
#endif
|
||||
|
||||
#if BUTTONS_NUMBER > 0
|
||||
static const uint8_t m_board_btn_list[BUTTONS_NUMBER] = BUTTONS_LIST;
|
||||
#endif
|
||||
|
||||
#if LEDS_NUMBER > 0
|
||||
bool bsp_board_led_state_get(uint32_t led_idx)
|
||||
{
|
||||
ASSERT(led_idx < LEDS_NUMBER);
|
||||
bool pin_set = nrf_gpio_pin_out_read(m_board_led_list[led_idx]) ? true : false;
|
||||
return (pin_set == (LEDS_ACTIVE_STATE ? true : false));
|
||||
}
|
||||
|
||||
void bsp_board_led_on(uint32_t led_idx)
|
||||
{
|
||||
ASSERT(led_idx < LEDS_NUMBER);
|
||||
nrf_gpio_pin_write(m_board_led_list[led_idx], LEDS_ACTIVE_STATE ? 1 : 0);
|
||||
}
|
||||
|
||||
void bsp_board_led_off(uint32_t led_idx)
|
||||
{
|
||||
ASSERT(led_idx < LEDS_NUMBER);
|
||||
nrf_gpio_pin_write(m_board_led_list[led_idx], LEDS_ACTIVE_STATE ? 0 : 1);
|
||||
}
|
||||
|
||||
void bsp_board_leds_off(void)
|
||||
{
|
||||
uint32_t i;
|
||||
for(i = 0; i < LEDS_NUMBER; ++i)
|
||||
{
|
||||
bsp_board_led_off(i);
|
||||
}
|
||||
}
|
||||
|
||||
void bsp_board_leds_on(void)
|
||||
{
|
||||
uint32_t i;
|
||||
for(i = 0; i < LEDS_NUMBER; ++i)
|
||||
{
|
||||
bsp_board_led_on(i);
|
||||
}
|
||||
}
|
||||
|
||||
void bsp_board_led_invert(uint32_t led_idx)
|
||||
{
|
||||
ASSERT(led_idx < LEDS_NUMBER);
|
||||
nrf_gpio_pin_toggle(m_board_led_list[led_idx]);
|
||||
}
|
||||
|
||||
void bsp_board_leds_init(void)
|
||||
{
|
||||
uint32_t i;
|
||||
for(i = 0; i < LEDS_NUMBER; ++i)
|
||||
{
|
||||
nrf_gpio_cfg_output(m_board_led_list[i]);
|
||||
}
|
||||
bsp_board_leds_off();
|
||||
}
|
||||
|
||||
uint32_t bsp_board_led_idx_to_pin(uint32_t led_idx)
|
||||
{
|
||||
ASSERT(led_idx < LEDS_NUMBER);
|
||||
return m_board_led_list[led_idx];
|
||||
}
|
||||
|
||||
uint32_t bsp_board_pin_to_led_idx(uint32_t pin_number)
|
||||
{
|
||||
uint32_t ret = 0xFFFFFFFF;
|
||||
uint32_t i;
|
||||
for(i = 0; i < LEDS_NUMBER; ++i)
|
||||
{
|
||||
if (m_board_led_list[i] == pin_number)
|
||||
{
|
||||
ret = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
#endif //LEDS_NUMBER > 0
|
||||
|
||||
#if BUTTONS_NUMBER > 0
|
||||
bool bsp_board_button_state_get(uint32_t button_idx)
|
||||
{
|
||||
ASSERT(button_idx < BUTTONS_NUMBER);
|
||||
bool pin_set = nrf_gpio_pin_read(m_board_btn_list[button_idx]) ? true : false;
|
||||
return (pin_set == (BUTTONS_ACTIVE_STATE ? true : false));
|
||||
}
|
||||
|
||||
void bsp_board_buttons_init(void)
|
||||
{
|
||||
uint32_t i;
|
||||
for(i = 0; i < BUTTONS_NUMBER; ++i)
|
||||
{
|
||||
nrf_gpio_cfg_input(m_board_btn_list[i], BUTTON_PULL);
|
||||
}
|
||||
}
|
||||
|
||||
uint32_t bsp_board_pin_to_button_idx(uint32_t pin_number)
|
||||
{
|
||||
uint32_t i;
|
||||
uint32_t ret = 0xFFFFFFFF;
|
||||
for(i = 0; i < BUTTONS_NUMBER; ++i)
|
||||
{
|
||||
if (m_board_btn_list[i] == pin_number)
|
||||
{
|
||||
ret = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
uint32_t bsp_board_button_idx_to_pin(uint32_t button_idx)
|
||||
{
|
||||
ASSERT(button_idx < BUTTONS_NUMBER);
|
||||
return m_board_btn_list[button_idx];
|
||||
}
|
||||
#endif //BUTTONS_NUMBER > 0
|
||||
319
SDK/12.3.0_d7731ad/components/boards/boards.h
Normal file
319
SDK/12.3.0_d7731ad/components/boards/boards.h
Normal file
@@ -0,0 +1,319 @@
|
||||
/**
|
||||
* Copyright (c) 2014 - 2017, Nordic Semiconductor ASA
|
||||
*
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification,
|
||||
* are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this
|
||||
* list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form, except as embedded into a Nordic
|
||||
* Semiconductor ASA integrated circuit in a product or a software update for
|
||||
* such product, must reproduce the above copyright notice, this list of
|
||||
* conditions and the following disclaimer in the documentation and/or other
|
||||
* materials provided with the distribution.
|
||||
*
|
||||
* 3. Neither the name of Nordic Semiconductor ASA nor the names of its
|
||||
* contributors may be used to endorse or promote products derived from this
|
||||
* software without specific prior written permission.
|
||||
*
|
||||
* 4. This software, with or without modification, must only be used with a
|
||||
* Nordic Semiconductor ASA integrated circuit.
|
||||
*
|
||||
* 5. Any software provided in binary form under this license must not be reverse
|
||||
* engineered, decompiled, modified and/or disassembled.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY NORDIC SEMICONDUCTOR ASA "AS IS" AND ANY EXPRESS
|
||||
* OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY, NONINFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL NORDIC SEMICONDUCTOR ASA OR CONTRIBUTORS BE
|
||||
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
|
||||
* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
|
||||
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
*/
|
||||
#ifndef BOARDS_H
|
||||
#define BOARDS_H
|
||||
|
||||
#include "nrf_gpio.h"
|
||||
|
||||
#if defined(BOARD_NRF6310)
|
||||
#include "nrf6310.h"
|
||||
#elif defined(BOARD_PCA10000)
|
||||
#include "pca10000.h"
|
||||
#elif defined(BOARD_PCA10001)
|
||||
#include "pca10001.h"
|
||||
#elif defined(BOARD_PCA10002)
|
||||
#include "pca10000.h"
|
||||
#elif defined(BOARD_PCA10003)
|
||||
#include "pca10003.h"
|
||||
#elif defined(BOARD_PCA20006)
|
||||
#include "pca20006.h"
|
||||
#elif defined(BOARD_PCA10028)
|
||||
#include "pca10028.h"
|
||||
#elif defined(BOARD_PCA10031)
|
||||
#include "pca10031.h"
|
||||
#elif defined(BOARD_PCA10036)
|
||||
#include "pca10036.h"
|
||||
#elif defined(BOARD_PCA10040)
|
||||
#include "pca10040.h"
|
||||
#elif defined(BOARD_PCA10056)
|
||||
#include "pca10056.h"
|
||||
#elif defined(BOARD_WT51822)
|
||||
#include "wt51822.h"
|
||||
#elif defined(BOARD_N5DK1)
|
||||
#include "n5_starterkit.h"
|
||||
#elif defined (BOARD_D52DK1)
|
||||
#include "d52_starterkit.h"
|
||||
#elif defined (BOARD_ARDUINO_PRIMO)
|
||||
#include "arduino_primo.h"
|
||||
#elif defined(BOARD_CUSTOM)
|
||||
#include "custom_board.h"
|
||||
#else
|
||||
#error "Board is not defined"
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Function for returning the state of an LED.
|
||||
*
|
||||
* @param led_idx LED index (starting from 0), as defined in the board-specific header.
|
||||
*
|
||||
* @return True if the LED is turned on.
|
||||
*/
|
||||
bool bsp_board_led_state_get(uint32_t led_idx);
|
||||
|
||||
/**
|
||||
* Function for turning on an LED.
|
||||
*
|
||||
* @param led_idx LED index (starting from 0), as defined in the board-specific header.
|
||||
*/
|
||||
void bsp_board_led_on(uint32_t led_idx);
|
||||
|
||||
/**
|
||||
* Function for turning off an LED.
|
||||
*
|
||||
* @param led_idx LED index (starting from 0), as defined in the board-specific header.
|
||||
*/
|
||||
void bsp_board_led_off(uint32_t led_idx);
|
||||
|
||||
/**
|
||||
* Function for inverting the state of an LED.
|
||||
*
|
||||
* @param led_idx LED index (starting from 0), as defined in the board-specific header.
|
||||
*/
|
||||
void bsp_board_led_invert(uint32_t led_idx);
|
||||
/**
|
||||
* Function for turning off all LEDs.
|
||||
*/
|
||||
void bsp_board_leds_off(void);
|
||||
|
||||
/**
|
||||
* Function for turning on all LEDs.
|
||||
*/
|
||||
void bsp_board_leds_on(void);
|
||||
|
||||
/**
|
||||
* Function for initializing LEDs.
|
||||
*/
|
||||
void bsp_board_leds_init(void);
|
||||
|
||||
/**
|
||||
* Function for converting pin number to LED index.
|
||||
*
|
||||
* @param pin_number Pin number.
|
||||
*
|
||||
* @return LED index of the given pin or 0xFFFFFFFF if invalid pin provided.
|
||||
*/
|
||||
uint32_t bsp_board_pin_to_led_idx(uint32_t pin_number);
|
||||
|
||||
/**
|
||||
* Function for converting LED index to pin number.
|
||||
*
|
||||
* @param led_idx LED index.
|
||||
*
|
||||
* @return Pin number.
|
||||
*/
|
||||
uint32_t bsp_board_led_idx_to_pin(uint32_t led_idx);
|
||||
|
||||
/**
|
||||
* Function for returning the state of a button.
|
||||
*
|
||||
* @param button_idx Button index (starting from 0), as defined in the board-specific header.
|
||||
*
|
||||
* @return True if the button is pressed.
|
||||
*/
|
||||
bool bsp_board_button_state_get(uint32_t button_idx);
|
||||
|
||||
/**
|
||||
* Function for initializing buttons.
|
||||
*/
|
||||
void bsp_board_buttons_init(void);
|
||||
|
||||
/**
|
||||
* Function for converting pin number to button index.
|
||||
*
|
||||
* @param pin_number Pin number.
|
||||
*
|
||||
* @return Button index of the given pin or 0xFFFFFFFF if invalid pin provided.
|
||||
*/
|
||||
uint32_t bsp_board_pin_to_button_idx(uint32_t pin_number);
|
||||
|
||||
|
||||
/**
|
||||
* Function for converting button index to pin number.
|
||||
*
|
||||
* @param button_idx Button index.
|
||||
*
|
||||
* @return Pin number.
|
||||
*/
|
||||
uint32_t bsp_board_button_idx_to_pin(uint32_t button_idx);
|
||||
|
||||
#define BSP_BOARD_LED_0 0
|
||||
#define BSP_BOARD_LED_1 1
|
||||
#define BSP_BOARD_LED_2 2
|
||||
#define BSP_BOARD_LED_3 3
|
||||
#define BSP_BOARD_LED_4 4
|
||||
#define BSP_BOARD_LED_5 5
|
||||
#define BSP_BOARD_LED_6 6
|
||||
#define BSP_BOARD_LED_7 7
|
||||
|
||||
#ifdef BSP_LED_0
|
||||
#define BSP_LED_0_MASK (1<<BSP_LED_0)
|
||||
#else
|
||||
#define BSP_LED_0_MASK 0
|
||||
#endif
|
||||
#ifdef BSP_LED_1
|
||||
#define BSP_LED_1_MASK (1<<BSP_LED_1)
|
||||
#else
|
||||
#define BSP_LED_1_MASK 0
|
||||
#endif
|
||||
#ifdef BSP_LED_2
|
||||
#define BSP_LED_2_MASK (1<<BSP_LED_2)
|
||||
#else
|
||||
#define BSP_LED_2_MASK 0
|
||||
#endif
|
||||
#ifdef BSP_LED_3
|
||||
#define BSP_LED_3_MASK (1<<BSP_LED_3)
|
||||
#else
|
||||
#define BSP_LED_3_MASK 0
|
||||
#endif
|
||||
#ifdef BSP_LED_4
|
||||
#define BSP_LED_4_MASK (1<<BSP_LED_4)
|
||||
#else
|
||||
#define BSP_LED_4_MASK 0
|
||||
#endif
|
||||
#ifdef BSP_LED_5
|
||||
#define BSP_LED_5_MASK (1<<BSP_LED_5)
|
||||
#else
|
||||
#define BSP_LED_5_MASK 0
|
||||
#endif
|
||||
#ifdef BSP_LED_6
|
||||
#define BSP_LED_6_MASK (1<<BSP_LED_6)
|
||||
#else
|
||||
#define BSP_LED_6_MASK 0
|
||||
#endif
|
||||
#ifdef BSP_LED_7
|
||||
#define BSP_LED_7_MASK (1<<BSP_LED_7)
|
||||
#else
|
||||
#define BSP_LED_7_MASK 0
|
||||
#endif
|
||||
|
||||
|
||||
#define LEDS_MASK (BSP_LED_0_MASK | BSP_LED_1_MASK | \
|
||||
BSP_LED_2_MASK | BSP_LED_3_MASK | \
|
||||
BSP_LED_4_MASK | BSP_LED_5_MASK | \
|
||||
BSP_LED_6_MASK | BSP_LED_7_MASK)
|
||||
|
||||
#define BSP_BOARD_BUTTON_0 0
|
||||
#define BSP_BOARD_BUTTON_1 1
|
||||
#define BSP_BOARD_BUTTON_2 2
|
||||
#define BSP_BOARD_BUTTON_3 3
|
||||
#define BSP_BOARD_BUTTON_4 4
|
||||
#define BSP_BOARD_BUTTON_5 5
|
||||
#define BSP_BOARD_BUTTON_6 6
|
||||
#define BSP_BOARD_BUTTON_7 7
|
||||
|
||||
|
||||
#ifdef BSP_BUTTON_0
|
||||
#define BSP_BUTTON_0_MASK (1<<BSP_BUTTON_0)
|
||||
#else
|
||||
#define BSP_BUTTON_0_MASK 0
|
||||
#endif
|
||||
#ifdef BSP_BUTTON_1
|
||||
#define BSP_BUTTON_1_MASK (1<<BSP_BUTTON_1)
|
||||
#else
|
||||
#define BSP_BUTTON_1_MASK 0
|
||||
#endif
|
||||
#ifdef BSP_BUTTON_2
|
||||
#define BSP_BUTTON_2_MASK (1<<BSP_BUTTON_2)
|
||||
#else
|
||||
#define BSP_BUTTON_2_MASK 0
|
||||
#endif
|
||||
#ifdef BSP_BUTTON_3
|
||||
#define BSP_BUTTON_3_MASK (1<<BSP_BUTTON_3)
|
||||
#else
|
||||
#define BSP_BUTTON_3_MASK 0
|
||||
#endif
|
||||
#ifdef BSP_BUTTON_4
|
||||
#define BSP_BUTTON_4_MASK (1<<BSP_BUTTON_4)
|
||||
#else
|
||||
#define BSP_BUTTON_4_MASK 0
|
||||
#endif
|
||||
#ifdef BSP_BUTTON_5
|
||||
#define BSP_BUTTON_5_MASK (1<<BSP_BUTTON_5)
|
||||
#else
|
||||
#define BSP_BUTTON_5_MASK 0
|
||||
#endif
|
||||
#ifdef BSP_BUTTON_6
|
||||
#define BSP_BUTTON_6_MASK (1<<BSP_BUTTON_6)
|
||||
#else
|
||||
#define BSP_BUTTON_6_MASK 0
|
||||
#endif
|
||||
#ifdef BSP_BUTTON_7
|
||||
#define BSP_BUTTON_7_MASK (1<<BSP_BUTTON_7)
|
||||
#else
|
||||
#define BSP_BUTTON_7_MASK 0
|
||||
#endif
|
||||
|
||||
#define BUTTONS_MASK (BSP_BUTTON_0_MASK | BSP_BUTTON_1_MASK | \
|
||||
BSP_BUTTON_2_MASK | BSP_BUTTON_3_MASK | \
|
||||
BSP_BUTTON_4_MASK | BSP_BUTTON_5_MASK | \
|
||||
BSP_BUTTON_6_MASK | BSP_BUTTON_7_MASK)
|
||||
|
||||
|
||||
#define LEDS_OFF(leds_mask) do { ASSERT(sizeof(leds_mask) == 4); \
|
||||
NRF_GPIO->OUTSET = (leds_mask) & (LEDS_MASK & LEDS_INV_MASK); \
|
||||
NRF_GPIO->OUTCLR = (leds_mask) & (LEDS_MASK & ~LEDS_INV_MASK); } while (0)
|
||||
|
||||
#define LEDS_ON(leds_mask) do { ASSERT(sizeof(leds_mask) == 4); \
|
||||
NRF_GPIO->OUTCLR = (leds_mask) & (LEDS_MASK & LEDS_INV_MASK); \
|
||||
NRF_GPIO->OUTSET = (leds_mask) & (LEDS_MASK & ~LEDS_INV_MASK); } while (0)
|
||||
|
||||
#define LED_IS_ON(leds_mask) ((leds_mask) & (NRF_GPIO->OUT ^ LEDS_INV_MASK) )
|
||||
|
||||
#define LEDS_INVERT(leds_mask) do { uint32_t gpio_state = NRF_GPIO->OUT; \
|
||||
ASSERT(sizeof(leds_mask) == 4); \
|
||||
NRF_GPIO->OUTSET = ((leds_mask) & ~gpio_state); \
|
||||
NRF_GPIO->OUTCLR = ((leds_mask) & gpio_state); } while (0)
|
||||
|
||||
#define LEDS_CONFIGURE(leds_mask) do { uint32_t pin; \
|
||||
ASSERT(sizeof(leds_mask) == 4); \
|
||||
for (pin = 0; pin < 32; pin++) \
|
||||
if ( (leds_mask) & (1 << pin) ) \
|
||||
nrf_gpio_cfg_output(pin); } while (0)
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
140
SDK/12.3.0_d7731ad/components/boards/d52_starterkit.h
Normal file
140
SDK/12.3.0_d7731ad/components/boards/d52_starterkit.h
Normal file
@@ -0,0 +1,140 @@
|
||||
/**
|
||||
* This software is subject to the ANT+ Shared Source License
|
||||
* www.thisisant.com/swlicenses
|
||||
* Copyright (c) Dynastream Innovations, Inc. 2016
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or
|
||||
* without modification, are permitted provided that the following
|
||||
* conditions are met:
|
||||
* 1) Redistributions of source code must retain the above
|
||||
* copyright notice, this list of conditions and the following
|
||||
* disclaimer.
|
||||
*
|
||||
* 2) Redistributions in binary form must reproduce the above
|
||||
* copyright notice, this list of conditions and the following
|
||||
* disclaimer in the documentation and/or other materials
|
||||
* provided with the distribution.
|
||||
*
|
||||
* 3) Neither the name of Dynastream nor the names of its
|
||||
* contributors may be used to endorse or promote products
|
||||
* derived from this software without specific prior
|
||||
* written permission.
|
||||
*
|
||||
* The following actions are prohibited:
|
||||
* 1) Redistribution of source code containing the ANT+ Network
|
||||
* Key. The ANT+ Network Key is available to ANT+ Adopters.
|
||||
* Please refer to http://thisisant.com to become an ANT+
|
||||
* Adopter and access the key.
|
||||
*
|
||||
* 2) Reverse engineering, decompilation, and/or disassembly of
|
||||
* software provided in binary form under this license.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
|
||||
* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
|
||||
* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE HEREBY
|
||||
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES(INCLUDING,
|
||||
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; DAMAGE TO ANY DEVICE, LOSS OF USE, DATA, OR
|
||||
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
|
||||
* OF THE POSSIBILITY OF SUCH DAMAGE. SOME STATES DO NOT ALLOW
|
||||
* THE EXCLUSION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO THE
|
||||
* ABOVE LIMITATIONS MAY NOT APPLY TO YOU.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef D52STARTERKIT_H
|
||||
#define D52STARTERKIT_H
|
||||
|
||||
#include "nrf_gpio.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
// LEDs definitions for D52DK1
|
||||
#define LEDS_NUMBER 4
|
||||
|
||||
// IO board active low leds
|
||||
// D52DK1 does not define LED_START or LED_STOP since the LEDS are not on sequential pins
|
||||
#define LED_A 24 //LED A on D52 Starter Kit IO Board
|
||||
#define LED_B 31 //LED B on D52 Starter Kit IO Board
|
||||
#define LED_C 17 //LED C on D52 Starter Kit IO Board
|
||||
#define LED_D 20 //LED D on D52 Starter Kit IO Board
|
||||
|
||||
#define LEDS_ACTIVE_STATE 0
|
||||
|
||||
#define LEDS_LIST { LED_A, LED_B, LED_C, LED_D }
|
||||
|
||||
#define BSP_LED_0 LED_A
|
||||
#define BSP_LED_1 LED_B
|
||||
#define BSP_LED_2 LED_C
|
||||
#define BSP_LED_3 LED_D
|
||||
|
||||
#define LEDS_INV_MASK LEDS_MASK
|
||||
|
||||
#define BUTTONS_NUMBER 4
|
||||
|
||||
// IO board pull-up buttons
|
||||
#define BUTTON_A 6 //BUTTON A on D52 Starter Kit IO Board
|
||||
#define BUTTON_B 7 //BUTTON B on D52 Starter Kit IO Board
|
||||
#define BUTTON_C 16 //BUTTON C on D52 Starter Kit IO Board
|
||||
#define BUTTON_D 19 //BUTTON D on D52 Starter Kit IO Board
|
||||
#define BUTTON_PULL NRF_GPIO_PIN_PULLUP
|
||||
|
||||
#define BUTTONS_ACTIVE_STATE 0
|
||||
|
||||
#define BSP_BUTTON_0 BUTTON_A
|
||||
#define BSP_BUTTON_1 BUTTON_B
|
||||
#define BSP_BUTTON_2 BUTTON_C
|
||||
#define BSP_BUTTON_3 BUTTON_D
|
||||
|
||||
#define BUTTONS_LIST { BUTTON_A, BUTTON_B, BUTTON_C, BUTTON_D }
|
||||
|
||||
// Battery board pull-up switches
|
||||
#define SWITCH_1 12 // Switch 1 on D52 Starter Kit Battery Board
|
||||
#define SWITCH_2 8 // Switch 2 on D52 Starter Kit Battery Board
|
||||
#define SWITCH_3 15 // Switch 3 on D52 Starter Kit Battery Board
|
||||
#define SWITCH_4 11 // Switch 4 on D52 Starter Kit Battery Board
|
||||
#define SWITCH_5 14 // Switch 5 on D52 Starter Kit Battery Board
|
||||
#define SWITCH_PULL NRF_GPIO_PIN_PULLUP
|
||||
|
||||
#define SWITCHES_NUMBER 5
|
||||
|
||||
#define BSP_SWITCH_0 SWITCH_1
|
||||
#define BSP_SWITCH_1 SWITCH_2
|
||||
#define BSP_SWITCH_2 SWITCH_3
|
||||
#define BSP_SWITCH_3 SWITCH_4
|
||||
#define BSP_SWITCH_4 SWITCH_5
|
||||
|
||||
#define BSP_SWITCH_0_MASK (1<<BSP_SWITCH_0)
|
||||
#define BSP_SWITCH_1_MASK (1<<BSP_SWITCH_1)
|
||||
#define BSP_SWITCH_2_MASK (1<<BSP_SWITCH_2)
|
||||
#define BSP_SWITCH_3_MASK (1<<BSP_SWITCH_3)
|
||||
#define BSP_SWITCH_4_MASK (1<<BSP_SWITCH_4)
|
||||
|
||||
#define SWITCHES_MASK (BSP_SWITCH_0_MASK | BSP_SWITCH_1_MASK | BSP_SWITCH_2_MASK | BSP_SWITCH_3_MASK | BSP_SWITCH_4_MASK)
|
||||
|
||||
// D52DK1 does not have UART peripheral. Dummy defines for compilation.
|
||||
#define RX_PIN_NUMBER UART_PIN_DISCONNECTED
|
||||
#define TX_PIN_NUMBER UART_PIN_DISCONNECTED
|
||||
#define CTS_PIN_NUMBER UART_PIN_DISCONNECTED
|
||||
#define RTS_PIN_NUMBER UART_PIN_DISCONNECTED
|
||||
|
||||
// Low frequency clock source to be used by the SoftDevice
|
||||
#define NRF_CLOCK_LFCLKSRC {.source = NRF_CLOCK_LF_SRC_XTAL, \
|
||||
.rc_ctiv = 0, \
|
||||
.rc_temp_ctiv = 0, \
|
||||
.xtal_accuracy = NRF_CLOCK_LF_XTAL_ACCURACY_20_PPM}
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
139
SDK/12.3.0_d7731ad/components/boards/n5_starterkit.h
Normal file
139
SDK/12.3.0_d7731ad/components/boards/n5_starterkit.h
Normal file
@@ -0,0 +1,139 @@
|
||||
/**
|
||||
* This software is subject to the ANT+ Shared Source License
|
||||
* www.thisisant.com/swlicenses
|
||||
* Copyright (c) Dynastream Innovations, Inc. 2015
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or
|
||||
* without modification, are permitted provided that the following
|
||||
* conditions are met:
|
||||
* 1) Redistributions of source code must retain the above
|
||||
* copyright notice, this list of conditions and the following
|
||||
* disclaimer.
|
||||
*
|
||||
* 2) Redistributions in binary form must reproduce the above
|
||||
* copyright notice, this list of conditions and the following
|
||||
* disclaimer in the documentation and/or other materials
|
||||
* provided with the distribution.
|
||||
*
|
||||
* 3) Neither the name of Dynastream nor the names of its
|
||||
* contributors may be used to endorse or promote products
|
||||
* derived from this software without specific prior
|
||||
* written permission.
|
||||
*
|
||||
* The following actions are prohibited:
|
||||
* 1) Redistribution of source code containing the ANT+ Network
|
||||
* Key. The ANT+ Network Key is available to ANT+ Adopters.
|
||||
* Please refer to http://thisisant.com to become an ANT+
|
||||
* Adopter and access the key.
|
||||
*
|
||||
* 2) Reverse engineering, decompilation, and/or disassembly of
|
||||
* software provided in binary form under this license.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
|
||||
* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
|
||||
* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE HEREBY
|
||||
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES(INCLUDING,
|
||||
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; DAMAGE TO ANY DEVICE, LOSS OF USE, DATA, OR
|
||||
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
|
||||
* OF THE POSSIBILITY OF SUCH DAMAGE. SOME STATES DO NOT ALLOW
|
||||
* THE EXCLUSION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO THE
|
||||
* ABOVE LIMITATIONS MAY NOT APPLY TO YOU.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef N5STARTERKIT_H
|
||||
#define N5STARTERKIT_H
|
||||
|
||||
#include "nrf_gpio.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
// LEDs definitions for N5DK1
|
||||
#define LEDS_NUMBER 4
|
||||
|
||||
// IO board active low leds
|
||||
// N5DK1 does not define LED_START or LED_STOP since the LEDS are not on sequential pins
|
||||
#define LED_A 8 //LED A on N5 Starter Kit IO Board
|
||||
#define LED_B 3 //LED B on N5 Starter Kit IO Board
|
||||
#define LED_C 15 //LED C on N5 Starter Kit IO Board
|
||||
#define LED_D 30 //LED D on N5 Starter Kit IO Board
|
||||
|
||||
#define LEDS_ACTIVE_STATE 0
|
||||
|
||||
#define LEDS_LIST { LED_A, LED_B, LED_C, LED_D }
|
||||
|
||||
#define LEDS_INV_MASK LEDS_MASK
|
||||
|
||||
#define BSP_LED_0 LED_A
|
||||
#define BSP_LED_1 LED_B
|
||||
#define BSP_LED_2 LED_C
|
||||
#define BSP_LED_3 LED_D
|
||||
|
||||
#define BUTTONS_NUMBER 4
|
||||
|
||||
// IO board pull-up buttons
|
||||
#define BUTTON_A 23 //BUTTON A on N5 Starter Kit IO Board
|
||||
#define BUTTON_B 2 //BUTTON B on N5 Starter Kit IO Board
|
||||
#define BUTTON_C 12 //BUTTON C on N5 Starter Kit IO Board
|
||||
#define BUTTON_D 11 //BUTTON D on N5 Starter Kit IO Board
|
||||
#define BUTTON_PULL NRF_GPIO_PIN_PULLUP
|
||||
|
||||
#define BUTTONS_ACTIVE_STATE 0
|
||||
|
||||
#define BSP_BUTTON_0 BUTTON_A
|
||||
#define BSP_BUTTON_1 BUTTON_B
|
||||
#define BSP_BUTTON_2 BUTTON_C
|
||||
#define BSP_BUTTON_3 BUTTON_D
|
||||
|
||||
#define BUTTONS_LIST { BUTTON_A, BUTTON_B, BUTTON_C, BUTTON_D }
|
||||
|
||||
// Battery board pull-up switches
|
||||
#define SWITCH_1 5 // Switch 1 on N5 Starter Kit Battery Board
|
||||
#define SWITCH_2 0 // Switch 2 on N5 Starter Kit Battery Board
|
||||
#define SWITCH_3 6 // Switch 3 on N5 Starter Kit Battery Board
|
||||
#define SWITCH_4 24 // Switch 4 on N5 Starter Kit Battery Board
|
||||
#define SWITCH_5 9 // Switch 5 on N5 Starter Kit Battery Board
|
||||
#define SWITCH_PULL NRF_GPIO_PIN_PULLUP
|
||||
|
||||
#define SWITCHES_NUMBER 5
|
||||
|
||||
#define BSP_SWITCH_0 SWITCH_1
|
||||
#define BSP_SWITCH_1 SWITCH_2
|
||||
#define BSP_SWITCH_2 SWITCH_3
|
||||
#define BSP_SWITCH_3 SWITCH_4
|
||||
#define BSP_SWITCH_4 SWITCH_5
|
||||
|
||||
#define SWITCHES_MASK 0x01000261
|
||||
|
||||
// N5DK1 does not have UART peripheral. Dummy defines for compilation.
|
||||
#define RX_PIN_NUMBER UART_PIN_DISCONNECTED
|
||||
#define TX_PIN_NUMBER UART_PIN_DISCONNECTED
|
||||
#define CTS_PIN_NUMBER UART_PIN_DISCONNECTED
|
||||
#define RTS_PIN_NUMBER UART_PIN_DISCONNECTED
|
||||
|
||||
// Low frequency clock source to be used by the SoftDevice
|
||||
#ifdef S210
|
||||
#define NRF_CLOCK_LFCLKSRC NRF_CLOCK_LFCLKSRC_XTAL_50_PPM
|
||||
#else
|
||||
#define NRF_CLOCK_LFCLKSRC {.source = NRF_CLOCK_LF_SRC_XTAL, \
|
||||
.rc_ctiv = 0, \
|
||||
.rc_temp_ctiv = 0, \
|
||||
.xtal_accuracy = NRF_CLOCK_LF_XTAL_ACCURACY_50_PPM}
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
186
SDK/12.3.0_d7731ad/components/boards/nrf6310.h
Normal file
186
SDK/12.3.0_d7731ad/components/boards/nrf6310.h
Normal file
@@ -0,0 +1,186 @@
|
||||
/**
|
||||
* Copyright (c) 2012 - 2017, Nordic Semiconductor ASA
|
||||
*
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification,
|
||||
* are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this
|
||||
* list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form, except as embedded into a Nordic
|
||||
* Semiconductor ASA integrated circuit in a product or a software update for
|
||||
* such product, must reproduce the above copyright notice, this list of
|
||||
* conditions and the following disclaimer in the documentation and/or other
|
||||
* materials provided with the distribution.
|
||||
*
|
||||
* 3. Neither the name of Nordic Semiconductor ASA nor the names of its
|
||||
* contributors may be used to endorse or promote products derived from this
|
||||
* software without specific prior written permission.
|
||||
*
|
||||
* 4. This software, with or without modification, must only be used with a
|
||||
* Nordic Semiconductor ASA integrated circuit.
|
||||
*
|
||||
* 5. Any software provided in binary form under this license must not be reverse
|
||||
* engineered, decompiled, modified and/or disassembled.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY NORDIC SEMICONDUCTOR ASA "AS IS" AND ANY EXPRESS
|
||||
* OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY, NONINFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL NORDIC SEMICONDUCTOR ASA OR CONTRIBUTORS BE
|
||||
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
|
||||
* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
|
||||
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
*/
|
||||
#ifndef NRF6310_H__
|
||||
#define NRF6310_H__
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define LED_START 8
|
||||
#define LED_0 8
|
||||
#define LED_1 9
|
||||
#define LED_2 10
|
||||
#define LED_3 11
|
||||
#define LED_4 12
|
||||
#define LED_5 13
|
||||
#define LED_6 14
|
||||
#define LED_7 15
|
||||
#define LED_STOP 15
|
||||
|
||||
#define BSP_LED_0 LED_0
|
||||
#define BSP_LED_1 LED_1
|
||||
#define BSP_LED_2 LED_2
|
||||
#define BSP_LED_3 LED_3
|
||||
#define BSP_LED_4 LED_4
|
||||
#define BSP_LED_5 LED_5
|
||||
#define BSP_LED_6 LED_6
|
||||
#define BSP_LED_7 LED_7
|
||||
|
||||
#define LEDS_ACTIVE_STATE 1
|
||||
|
||||
#define BUTTON_START 0
|
||||
#define BUTTON_0 0
|
||||
#define BUTTON_1 1
|
||||
#define BUTTON_2 2
|
||||
#define BUTTON_3 3
|
||||
#define BUTTON_4 4
|
||||
#define BUTTON_5 5
|
||||
#define BUTTON_6 6
|
||||
#define BUTTON_7 7
|
||||
#define BUTTON_STOP 7
|
||||
#define BUTTON_PULL NRF_GPIO_PIN_NOPULL
|
||||
|
||||
#define BSP_BUTTON_0 BUTTON_0
|
||||
#define BSP_BUTTON_1 BUTTON_1
|
||||
#define BSP_BUTTON_2 BUTTON_2
|
||||
#define BSP_BUTTON_3 BUTTON_3
|
||||
#define BSP_BUTTON_4 BUTTON_4
|
||||
#define BSP_BUTTON_5 BUTTON_5
|
||||
#define BSP_BUTTON_6 BUTTON_6
|
||||
#define BSP_BUTTON_7 BUTTON_7
|
||||
|
||||
#define BUTTONS_ACTIVE_STATE 1
|
||||
|
||||
#define BUTTONS_LIST {BUTTON_0, BUTTON_1, BUTTON_2, BUTTON_3, BUTTON_4, BUTTON_5, BUTTON_6, BUTTON_7}
|
||||
#define LEDS_LIST {LED_0, LED_1, LED_2, LED_3, LED_4, LED_5, LED_6, LED_7}
|
||||
|
||||
#define LEDS_INV_MASK 0x00000000
|
||||
|
||||
#define BUTTONS_NUMBER 8
|
||||
#define LEDS_NUMBER 8
|
||||
|
||||
#define RX_PIN_NUMBER 16 // UART RX pin number.
|
||||
#define TX_PIN_NUMBER 17 // UART TX pin number.
|
||||
#define CTS_PIN_NUMBER 18 // UART Clear To Send pin number. Not used if HWFC is set to false.
|
||||
#define RTS_PIN_NUMBER 19 // UART Request To Send pin number. Not used if HWFC is set to false.
|
||||
#define HWFC false // UART hardware flow control.
|
||||
|
||||
#define SPIS_MISO_PIN 20 // SPI MISO signal.
|
||||
#define SPIS_CSN_PIN 21 // SPI CSN signal.
|
||||
#define SPIS_MOSI_PIN 22 // SPI MOSI signal.
|
||||
#define SPIS_SCK_PIN 23 // SPI SCK signal.
|
||||
|
||||
#define SPIM0_SCK_PIN 23u /**< SPI clock GPIO pin number. */
|
||||
#define SPIM0_MOSI_PIN 20u /**< SPI Master Out Slave In GPIO pin number. */
|
||||
#define SPIM0_MISO_PIN 22u /**< SPI Master In Slave Out GPIO pin number. */
|
||||
#define SPIM0_SS_PIN 21u /**< SPI Slave Select GPIO pin number. */
|
||||
|
||||
#define SPIM1_SCK_PIN 16u /**< SPI clock GPIO pin number. */
|
||||
#define SPIM1_MOSI_PIN 18u /**< SPI Master Out Slave In GPIO pin number. */
|
||||
#define SPIM1_MISO_PIN 17u /**< SPI Master In Slave Out GPIO pin number. */
|
||||
#define SPIM1_SS_PIN 19u /**< SPI Slave Select GPIO pin number. */
|
||||
|
||||
// serialization APPLICATION board
|
||||
#define SER_APP_RX_PIN 16 // UART RX pin number.
|
||||
#define SER_APP_TX_PIN 17 // UART TX pin number.
|
||||
#define SER_APP_CTS_PIN 18 // UART Clear To Send pin number.
|
||||
#define SER_APP_RTS_PIN 19 // UART Request To Send pin number.
|
||||
|
||||
#if 0
|
||||
#define SER_APP_SPIM0_SCK_PIN 20 // SPI clock GPIO pin number.
|
||||
#define SER_APP_SPIM0_MOSI_PIN 17 // SPI Master Out Slave In GPIO pin number
|
||||
#define SER_APP_SPIM0_MISO_PIN 16 // SPI Master In Slave Out GPIO pin number
|
||||
#define SER_APP_SPIM0_SS_PIN 21 // SPI Slave Select GPIO pin number
|
||||
#define SER_APP_SPIM0_RDY_PIN 19 // SPI READY GPIO pin number
|
||||
#define SER_APP_SPIM0_REQ_PIN 18 // SPI REQUEST GPIO pin number
|
||||
#else
|
||||
#define SER_APP_SPIM0_SCK_PIN 23 // SPI clock GPIO pin number.
|
||||
#define SER_APP_SPIM0_MOSI_PIN 20 // SPI Master Out Slave In GPIO pin number
|
||||
#define SER_APP_SPIM0_MISO_PIN 22 // SPI Master In Slave Out GPIO pin number
|
||||
#define SER_APP_SPIM0_SS_PIN 21 // SPI Slave Select GPIO pin number
|
||||
#define SER_APP_SPIM0_RDY_PIN 29 // SPI READY GPIO pin number
|
||||
#define SER_APP_SPIM0_REQ_PIN 28 // SPI REQUEST GPIO pin number
|
||||
|
||||
#endif
|
||||
|
||||
// serialization CONNECTIVITY board
|
||||
#if 0
|
||||
#define SER_CON_RX_PIN 17 // UART RX pin number.
|
||||
#define SER_CON_TX_PIN 16 // UART TX pin number.
|
||||
#define SER_CON_CTS_PIN 19 // UART Clear To Send pin number. Not used if HWFC is set to false.
|
||||
#define SER_CON_RTS_PIN 18 // UART Request To Send pin number. Not used if HWFC is set to false.
|
||||
#else
|
||||
#define SER_CON_RX_PIN 16 // UART RX pin number.
|
||||
#define SER_CON_TX_PIN 17 // UART TX pin number.
|
||||
#define SER_CON_CTS_PIN 18 // UART Clear To Send pin number. Not used if HWFC is set to false.
|
||||
#define SER_CON_RTS_PIN 19 // UART Request To Send pin number. Not used if HWFC is set to false.
|
||||
#endif
|
||||
|
||||
#if 0
|
||||
#define SER_CON_SPIS_SCK_PIN 20 // SPI SCK signal.
|
||||
#define SER_CON_SPIS_MISO_PIN 16 // SPI MISO signal.
|
||||
#define SER_CON_SPIS_MOSI_PIN 17 // SPI MOSI signal.
|
||||
#define SER_CON_SPIS_CSN_PIN 21 // SPI CSN signal.
|
||||
#define SER_CON_SPIS_RDY_PIN 19 // SPI READY GPIO pin number.
|
||||
#define SER_CON_SPIS_REQ_PIN 18 // SPI REQUEST GPIO pin number.
|
||||
#else
|
||||
#define SER_CON_SPIS_SCK_PIN 23 // SPI SCK signal.
|
||||
#define SER_CON_SPIS_MOSI_PIN 22 // SPI MOSI signal.
|
||||
#define SER_CON_SPIS_MISO_PIN 20 // SPI MISO signal.
|
||||
#define SER_CON_SPIS_CSN_PIN 21 // SPI CSN signal.
|
||||
#define SER_CON_SPIS_RDY_PIN 29 // SPI READY GPIO pin number.
|
||||
#define SER_CON_SPIS_REQ_PIN 28 // SPI REQUEST GPIO pin number.
|
||||
#endif
|
||||
|
||||
#define SER_CONN_ASSERT_LED_PIN LED_2
|
||||
|
||||
// Low frequency clock source to be used by the SoftDevice
|
||||
#define NRF_CLOCK_LFCLKSRC {.source = NRF_CLOCK_LF_SRC_XTAL, \
|
||||
.rc_ctiv = 0, \
|
||||
.rc_temp_ctiv = 0, \
|
||||
.xtal_accuracy = NRF_CLOCK_LF_XTAL_ACCURACY_20_PPM}
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // NRF6310_H__
|
||||
103
SDK/12.3.0_d7731ad/components/boards/pca10000.h
Normal file
103
SDK/12.3.0_d7731ad/components/boards/pca10000.h
Normal file
@@ -0,0 +1,103 @@
|
||||
/**
|
||||
* Copyright (c) 2012 - 2017, Nordic Semiconductor ASA
|
||||
*
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification,
|
||||
* are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this
|
||||
* list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form, except as embedded into a Nordic
|
||||
* Semiconductor ASA integrated circuit in a product or a software update for
|
||||
* such product, must reproduce the above copyright notice, this list of
|
||||
* conditions and the following disclaimer in the documentation and/or other
|
||||
* materials provided with the distribution.
|
||||
*
|
||||
* 3. Neither the name of Nordic Semiconductor ASA nor the names of its
|
||||
* contributors may be used to endorse or promote products derived from this
|
||||
* software without specific prior written permission.
|
||||
*
|
||||
* 4. This software, with or without modification, must only be used with a
|
||||
* Nordic Semiconductor ASA integrated circuit.
|
||||
*
|
||||
* 5. Any software provided in binary form under this license must not be reverse
|
||||
* engineered, decompiled, modified and/or disassembled.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY NORDIC SEMICONDUCTOR ASA "AS IS" AND ANY EXPRESS
|
||||
* OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY, NONINFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL NORDIC SEMICONDUCTOR ASA OR CONTRIBUTORS BE
|
||||
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
|
||||
* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
|
||||
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
*/
|
||||
#ifndef PCA10000_H
|
||||
#define PCA10000_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "nrf_gpio.h"
|
||||
|
||||
// Definitions for PCA10000 v2.0.0 or higher
|
||||
#if 1
|
||||
|
||||
#define LEDS_NUMBER 3
|
||||
|
||||
// there is RGB LED on this board
|
||||
#define LED_RGB_RED 21
|
||||
#define LED_RGB_GREEN 22
|
||||
#define LED_RGB_BLUE 23
|
||||
|
||||
#define LED_START LED_RGB_RED
|
||||
#define BSP_LED_0 LED_RGB_RED
|
||||
#define BSP_LED_1 LED_RGB_GREEN
|
||||
#define BSP_LED_2 LED_RGB_BLUE
|
||||
#define LED_STOP LED_RGB_BLUE
|
||||
|
||||
#define LEDS_ACTIVE_STATE 0
|
||||
|
||||
#define BUTTONS_LIST {}
|
||||
#define LEDS_LIST { LED_RGB_RED, LED_RGB_GREEN, LED_RGB_BLUE }
|
||||
|
||||
#define LEDS_INV_MASK LEDS_MASK
|
||||
|
||||
// there are no buttons on this board
|
||||
#define BUTTONS_NUMBER 0
|
||||
|
||||
// UART pins connected to J-Link
|
||||
#define RX_PIN_NUMBER 11
|
||||
#define TX_PIN_NUMBER 9
|
||||
#define CTS_PIN_NUMBER 10
|
||||
#define RTS_PIN_NUMBER 8
|
||||
#define HWFC true
|
||||
|
||||
// Definitions for PCA10000 v1.0
|
||||
#else
|
||||
|
||||
#define RX_PIN_NUMBER 3
|
||||
#define TX_PIN_NUMBER 1
|
||||
#define CTS_PIN_NUMBER 2
|
||||
#define RTS_PIN_NUMBER 0
|
||||
#define HWFC true
|
||||
|
||||
#endif
|
||||
|
||||
// Low frequency clock source to be used by the SoftDevice
|
||||
#define NRF_CLOCK_LFCLKSRC {.source = NRF_CLOCK_LF_SRC_XTAL, \
|
||||
.rc_ctiv = 0, \
|
||||
.rc_temp_ctiv = 0, \
|
||||
.xtal_accuracy = NRF_CLOCK_LF_XTAL_ACCURACY_20_PPM}
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
170
SDK/12.3.0_d7731ad/components/boards/pca10001.h
Normal file
170
SDK/12.3.0_d7731ad/components/boards/pca10001.h
Normal file
@@ -0,0 +1,170 @@
|
||||
/**
|
||||
* Copyright (c) 2012 - 2017, Nordic Semiconductor ASA
|
||||
*
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification,
|
||||
* are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this
|
||||
* list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form, except as embedded into a Nordic
|
||||
* Semiconductor ASA integrated circuit in a product or a software update for
|
||||
* such product, must reproduce the above copyright notice, this list of
|
||||
* conditions and the following disclaimer in the documentation and/or other
|
||||
* materials provided with the distribution.
|
||||
*
|
||||
* 3. Neither the name of Nordic Semiconductor ASA nor the names of its
|
||||
* contributors may be used to endorse or promote products derived from this
|
||||
* software without specific prior written permission.
|
||||
*
|
||||
* 4. This software, with or without modification, must only be used with a
|
||||
* Nordic Semiconductor ASA integrated circuit.
|
||||
*
|
||||
* 5. Any software provided in binary form under this license must not be reverse
|
||||
* engineered, decompiled, modified and/or disassembled.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY NORDIC SEMICONDUCTOR ASA "AS IS" AND ANY EXPRESS
|
||||
* OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY, NONINFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL NORDIC SEMICONDUCTOR ASA OR CONTRIBUTORS BE
|
||||
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
|
||||
* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
|
||||
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
*/
|
||||
#ifndef PCA10001_H
|
||||
#define PCA10001_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "nrf_gpio.h"
|
||||
|
||||
#define LED_START 18
|
||||
#define LED_0 18
|
||||
#define LED_1 19
|
||||
#define LED_STOP 19
|
||||
|
||||
#define LEDS_ACTIVE_STATE 1
|
||||
|
||||
#define BSP_LED_0 LED_0
|
||||
#define BSP_LED_1 LED_1
|
||||
|
||||
#define LEDS_INV_MASK 0x00000000
|
||||
|
||||
#define BUTTON_START 16
|
||||
#define BUTTON_0 16
|
||||
#define BUTTON_1 17
|
||||
#define BUTTON_STOP 17
|
||||
#define BUTTON_PULL NRF_GPIO_PIN_PULLUP
|
||||
|
||||
#define BUTTONS_ACTIVE_STATE 0
|
||||
|
||||
#define BSP_BUTTON_0 BUTTON_0
|
||||
#define BSP_BUTTON_1 BUTTON_1
|
||||
|
||||
#define BUTTONS_NUMBER 2
|
||||
#define LEDS_NUMBER 2
|
||||
|
||||
#define BUTTONS_LIST { BUTTON_0, BUTTON_1 }
|
||||
#define LEDS_LIST { LED_0, LED_1 }
|
||||
|
||||
#define RX_PIN_NUMBER 11
|
||||
#define TX_PIN_NUMBER 9
|
||||
#define CTS_PIN_NUMBER 10
|
||||
#define RTS_PIN_NUMBER 8
|
||||
#define HWFC true
|
||||
|
||||
#define SPIS_MISO_PIN 20 // SPI MISO signal.
|
||||
#define SPIS_CSN_PIN 21 // SPI CSN signal.
|
||||
#define SPIS_MOSI_PIN 22 // SPI MOSI signal.
|
||||
#define SPIS_SCK_PIN 23 // SPI SCK signal.
|
||||
|
||||
#define SPIM0_SCK_PIN 23u /**< SPI clock GPIO pin number. */
|
||||
#define SPIM0_MOSI_PIN 20u /**< SPI Master Out Slave In GPIO pin number. */
|
||||
#define SPIM0_MISO_PIN 22u /**< SPI Master In Slave Out GPIO pin number. */
|
||||
#define SPIM0_SS_PIN 21u /**< SPI Slave Select GPIO pin number. */
|
||||
|
||||
#define SPIM1_SCK_PIN 29u /**< SPI clock GPIO pin number. */
|
||||
#define SPIM1_MOSI_PIN 24u /**< SPI Master Out Slave In GPIO pin number. */
|
||||
#define SPIM1_MISO_PIN 28u /**< SPI Master In Slave Out GPIO pin number. */
|
||||
#define SPIM1_SS_PIN 25u /**< SPI Slave Select GPIO pin number. */
|
||||
|
||||
// serialization APPLICATION board
|
||||
|
||||
// UART
|
||||
// this configuration works with the SPI wires setup
|
||||
#define SER_APP_RX_PIN 20 // UART RX pin number.
|
||||
#define SER_APP_TX_PIN 22 // UART TX pin number.
|
||||
#define SER_APP_CTS_PIN 23 // UART Clear To Send pin number.
|
||||
#define SER_APP_RTS_PIN 21 // UART Request To Send pin number.
|
||||
|
||||
// SPI
|
||||
#if 0
|
||||
#define SER_APP_SPIM0_SCK_PIN 20 // SPI clock GPIO pin number.
|
||||
#define SER_APP_SPIM0_MOSI_PIN 17 // SPI Master Out Slave In GPIO pin number
|
||||
#define SER_APP_SPIM0_MISO_PIN 16 // SPI Master In Slave Out GPIO pin number
|
||||
#define SER_APP_SPIM0_SS_PIN 21 // SPI Slave Select GPIO pin number
|
||||
#define SER_APP_SPIM0_RDY_PIN 19 // SPI READY GPIO pin number
|
||||
#define SER_APP_SPIM0_REQ_PIN 18 // SPI REQUEST GPIO pin number
|
||||
#else
|
||||
#define SER_APP_SPIM0_SCK_PIN 23 // SPI clock GPIO pin number.
|
||||
#define SER_APP_SPIM0_MOSI_PIN 20 // SPI Master Out Slave In GPIO pin number
|
||||
#define SER_APP_SPIM0_MISO_PIN 22 // SPI Master In Slave Out GPIO pin number
|
||||
#define SER_APP_SPIM0_SS_PIN 21 // SPI Slave Select GPIO pin number
|
||||
#define SER_APP_SPIM0_RDY_PIN 25 // SPI READY GPIO pin number
|
||||
#define SER_APP_SPIM0_REQ_PIN 24 // SPI REQUEST GPIO pin number
|
||||
#endif
|
||||
|
||||
// serialization CONNECTIVITY board
|
||||
|
||||
// UART
|
||||
#if 0
|
||||
#define SER_CON_RX_PIN 22 // UART RX pin number.
|
||||
#define SER_CON_TX_PIN 20 // UART TX pin number.
|
||||
#define SER_CON_CTS_PIN 21 // UART Clear To Send pin number. Not used if HWFC is set to false.
|
||||
#define SER_CON_RTS_PIN 23 // UART Request To Send pin number. Not used if HWFC is set to false.
|
||||
#else
|
||||
// this configuration works with the SPI wires setup
|
||||
#define SER_CON_RX_PIN 20 // UART RX pin number.
|
||||
#define SER_CON_TX_PIN 22 // UART TX pin number.
|
||||
#define SER_CON_CTS_PIN 21 // UART Clear To Send pin number. Not used if HWFC is set to false.
|
||||
#define SER_CON_RTS_PIN 23 // UART Request To Send pin number. Not used if HWFC is set to false.
|
||||
#endif
|
||||
|
||||
//SPI
|
||||
#if 0
|
||||
#define SER_CON_SPIS_SCK_PIN 20 // SPI SCK signal.
|
||||
#define SER_CON_SPIS_MISO_PIN 16 // SPI MISO signal.
|
||||
#define SER_CON_SPIS_MOSI_PIN 17 // SPI MOSI signal.
|
||||
#define SER_CON_SPIS_CSN_PIN 21 // SPI CSN signal.
|
||||
#define SER_CON_SPIS_RDY_PIN 19 // SPI READY GPIO pin number.
|
||||
#define SER_CON_SPIS_REQ_PIN 18 // SPI REQUEST GPIO pin number.
|
||||
#else
|
||||
#define SER_CON_SPIS_SCK_PIN 23 // SPI SCK signal.
|
||||
#define SER_CON_SPIS_MOSI_PIN 22 // SPI MOSI signal.
|
||||
#define SER_CON_SPIS_MISO_PIN 20 // SPI MISO signal.
|
||||
#define SER_CON_SPIS_CSN_PIN 21 // SPI CSN signal.
|
||||
#define SER_CON_SPIS_RDY_PIN 25 // SPI READY GPIO pin number.
|
||||
#define SER_CON_SPIS_REQ_PIN 24 // SPI REQUEST GPIO pin number.
|
||||
#endif
|
||||
|
||||
#define SER_CONN_ASSERT_LED_PIN LED_0
|
||||
|
||||
// Low frequency clock source to be used by the SoftDevice
|
||||
#define NRF_CLOCK_LFCLKSRC {.source = NRF_CLOCK_LF_SRC_XTAL, \
|
||||
.rc_ctiv = 0, \
|
||||
.rc_temp_ctiv = 0, \
|
||||
.xtal_accuracy = NRF_CLOCK_LF_XTAL_ACCURACY_20_PPM}
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
98
SDK/12.3.0_d7731ad/components/boards/pca10003.h
Normal file
98
SDK/12.3.0_d7731ad/components/boards/pca10003.h
Normal file
@@ -0,0 +1,98 @@
|
||||
/**
|
||||
* Copyright (c) 2014 - 2017, Nordic Semiconductor ASA
|
||||
*
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification,
|
||||
* are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this
|
||||
* list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form, except as embedded into a Nordic
|
||||
* Semiconductor ASA integrated circuit in a product or a software update for
|
||||
* such product, must reproduce the above copyright notice, this list of
|
||||
* conditions and the following disclaimer in the documentation and/or other
|
||||
* materials provided with the distribution.
|
||||
*
|
||||
* 3. Neither the name of Nordic Semiconductor ASA nor the names of its
|
||||
* contributors may be used to endorse or promote products derived from this
|
||||
* software without specific prior written permission.
|
||||
*
|
||||
* 4. This software, with or without modification, must only be used with a
|
||||
* Nordic Semiconductor ASA integrated circuit.
|
||||
*
|
||||
* 5. Any software provided in binary form under this license must not be reverse
|
||||
* engineered, decompiled, modified and/or disassembled.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY NORDIC SEMICONDUCTOR ASA "AS IS" AND ANY EXPRESS
|
||||
* OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY, NONINFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL NORDIC SEMICONDUCTOR ASA OR CONTRIBUTORS BE
|
||||
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
|
||||
* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
|
||||
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
*/
|
||||
#ifndef PCA10003_H
|
||||
#define PCA10003_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "nrf_gpio.h"
|
||||
|
||||
#define LED_START 18
|
||||
#define LED_0 18
|
||||
#define LED_1 19
|
||||
#define LED_STOP 19
|
||||
|
||||
#define LEDS_ACTIVE_STATE 1
|
||||
|
||||
#define LEDS_INV_MASK 0x00000000
|
||||
|
||||
#define BSP_LED_0 LED_0
|
||||
#define BSP_LED_1 LED_1
|
||||
|
||||
#define BUTTON_START 16
|
||||
#define BUTTON_0 16
|
||||
#define BUTTON_1 17
|
||||
#define BUTTON_STOP 17
|
||||
#define BUTTON_PULL NRF_GPIO_PIN_PULLUP
|
||||
|
||||
#define BUTTONS_ACTIVE_STATE 0
|
||||
|
||||
#define BSP_BUTTON_0 BUTTON_0
|
||||
#define BSP_BUTTON_1 BUTTON_1
|
||||
|
||||
#define BUTTONS_NUMBER 2
|
||||
#define LEDS_NUMBER 2
|
||||
#define LEDS_LIST { LED_0, LED_1 }
|
||||
|
||||
#define BUTTONS_LIST { BUTTON_0, BUTTON_1 }
|
||||
|
||||
#define RX_PIN_NUMBER 11
|
||||
#define TX_PIN_NUMBER 9
|
||||
#define CTS_PIN_NUMBER 10
|
||||
#define RTS_PIN_NUMBER 8
|
||||
#define HWFC true
|
||||
|
||||
// Low frequency clock source to be used by the SoftDevice
|
||||
#ifdef S210
|
||||
#define NRF_CLOCK_LFCLKSRC NRF_CLOCK_LFCLKSRC_XTAL_20_PPM
|
||||
#else
|
||||
#define NRF_CLOCK_LFCLKSRC {.source = NRF_CLOCK_LF_SRC_XTAL, \
|
||||
.rc_ctiv = 0, \
|
||||
.rc_temp_ctiv = 0, \
|
||||
.xtal_accuracy = NRF_CLOCK_LF_XTAL_ACCURACY_20_PPM}
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
180
SDK/12.3.0_d7731ad/components/boards/pca10028.h
Normal file
180
SDK/12.3.0_d7731ad/components/boards/pca10028.h
Normal file
@@ -0,0 +1,180 @@
|
||||
/**
|
||||
* Copyright (c) 2014 - 2017, Nordic Semiconductor ASA
|
||||
*
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification,
|
||||
* are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this
|
||||
* list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form, except as embedded into a Nordic
|
||||
* Semiconductor ASA integrated circuit in a product or a software update for
|
||||
* such product, must reproduce the above copyright notice, this list of
|
||||
* conditions and the following disclaimer in the documentation and/or other
|
||||
* materials provided with the distribution.
|
||||
*
|
||||
* 3. Neither the name of Nordic Semiconductor ASA nor the names of its
|
||||
* contributors may be used to endorse or promote products derived from this
|
||||
* software without specific prior written permission.
|
||||
*
|
||||
* 4. This software, with or without modification, must only be used with a
|
||||
* Nordic Semiconductor ASA integrated circuit.
|
||||
*
|
||||
* 5. Any software provided in binary form under this license must not be reverse
|
||||
* engineered, decompiled, modified and/or disassembled.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY NORDIC SEMICONDUCTOR ASA "AS IS" AND ANY EXPRESS
|
||||
* OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY, NONINFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL NORDIC SEMICONDUCTOR ASA OR CONTRIBUTORS BE
|
||||
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
|
||||
* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
|
||||
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
*/
|
||||
#ifndef PCA10028_H
|
||||
#define PCA10028_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "nrf_gpio.h"
|
||||
|
||||
// LEDs definitions for PCA10028
|
||||
#define LEDS_NUMBER 4
|
||||
|
||||
#define LED_START 21
|
||||
#define LED_1 21
|
||||
#define LED_2 22
|
||||
#define LED_3 23
|
||||
#define LED_4 24
|
||||
#define LED_STOP 24
|
||||
|
||||
#define LEDS_ACTIVE_STATE 0
|
||||
|
||||
#define LEDS_LIST { LED_1, LED_2, LED_3, LED_4 }
|
||||
|
||||
#define LEDS_INV_MASK LEDS_MASK
|
||||
|
||||
#define BSP_LED_0 LED_1
|
||||
#define BSP_LED_1 LED_2
|
||||
#define BSP_LED_2 LED_3
|
||||
#define BSP_LED_3 LED_4
|
||||
|
||||
#define BUTTONS_NUMBER 4
|
||||
|
||||
#define BUTTON_START 17
|
||||
#define BUTTON_1 17
|
||||
#define BUTTON_2 18
|
||||
#define BUTTON_3 19
|
||||
#define BUTTON_4 20
|
||||
#define BUTTON_STOP 20
|
||||
#define BUTTON_PULL NRF_GPIO_PIN_PULLUP
|
||||
|
||||
#define BUTTONS_ACTIVE_STATE 0
|
||||
|
||||
#define BUTTONS_LIST { BUTTON_1, BUTTON_2, BUTTON_3, BUTTON_4 }
|
||||
|
||||
#define BSP_BUTTON_0 BUTTON_1
|
||||
#define BSP_BUTTON_1 BUTTON_2
|
||||
#define BSP_BUTTON_2 BUTTON_3
|
||||
#define BSP_BUTTON_3 BUTTON_4
|
||||
|
||||
#define RX_PIN_NUMBER 11
|
||||
#define TX_PIN_NUMBER 9
|
||||
#define CTS_PIN_NUMBER 10
|
||||
#define RTS_PIN_NUMBER 8
|
||||
#define HWFC true
|
||||
|
||||
#define SPIS_MISO_PIN 28 // SPI MISO signal.
|
||||
#define SPIS_CSN_PIN 12 // SPI CSN signal.
|
||||
#define SPIS_MOSI_PIN 25 // SPI MOSI signal.
|
||||
#define SPIS_SCK_PIN 29 // SPI SCK signal.
|
||||
|
||||
#define SPIM0_SCK_PIN 4 /**< SPI clock GPIO pin number. */
|
||||
#define SPIM0_MOSI_PIN 1 /**< SPI Master Out Slave In GPIO pin number. */
|
||||
#define SPIM0_MISO_PIN 3 /**< SPI Master In Slave Out GPIO pin number. */
|
||||
#define SPIM0_SS_PIN 2 /**< SPI Slave Select GPIO pin number. */
|
||||
|
||||
#define SPIM1_SCK_PIN 15 /**< SPI clock GPIO pin number. */
|
||||
#define SPIM1_MOSI_PIN 12 /**< SPI Master Out Slave In GPIO pin number. */
|
||||
#define SPIM1_MISO_PIN 14 /**< SPI Master In Slave Out GPIO pin number. */
|
||||
#define SPIM1_SS_PIN 13 /**< SPI Slave Select GPIO pin number. */
|
||||
|
||||
// serialization APPLICATION board
|
||||
#define SER_CONN_CHIP_RESET_PIN 12 // Pin used to reset connectivity chip
|
||||
|
||||
#define SER_APP_RX_PIN 25 // UART RX pin number.
|
||||
#define SER_APP_TX_PIN 28 // UART TX pin number.
|
||||
#define SER_APP_CTS_PIN 0 // UART Clear To Send pin number.
|
||||
#define SER_APP_RTS_PIN 29 // UART Request To Send pin number.
|
||||
|
||||
#define SER_APP_SPIM0_SCK_PIN 7 // SPI clock GPIO pin number.
|
||||
#define SER_APP_SPIM0_MOSI_PIN 0 // SPI Master Out Slave In GPIO pin number
|
||||
#define SER_APP_SPIM0_MISO_PIN 30 // SPI Master In Slave Out GPIO pin number
|
||||
#define SER_APP_SPIM0_SS_PIN 25 // SPI Slave Select GPIO pin number
|
||||
#define SER_APP_SPIM0_RDY_PIN 29 // SPI READY GPIO pin number
|
||||
#define SER_APP_SPIM0_REQ_PIN 28 // SPI REQUEST GPIO pin number
|
||||
|
||||
// serialization CONNECTIVITY board
|
||||
#define SER_CON_RX_PIN 28 // UART RX pin number.
|
||||
#define SER_CON_TX_PIN 25 // UART TX pin number.
|
||||
#define SER_CON_CTS_PIN 29 // UART Clear To Send pin number. Not used if HWFC is set to false.
|
||||
#define SER_CON_RTS_PIN 0 // UART Request To Send pin number. Not used if HWFC is set to false.
|
||||
|
||||
|
||||
#define SER_CON_SPIS_SCK_PIN 7 // SPI SCK signal.
|
||||
#define SER_CON_SPIS_MOSI_PIN 0 // SPI MOSI signal.
|
||||
#define SER_CON_SPIS_MISO_PIN 30 // SPI MISO signal.
|
||||
#define SER_CON_SPIS_CSN_PIN 25 // SPI CSN signal.
|
||||
#define SER_CON_SPIS_RDY_PIN 29 // SPI READY GPIO pin number.
|
||||
#define SER_CON_SPIS_REQ_PIN 28 // SPI REQUEST GPIO pin number.
|
||||
|
||||
// Arduino board mappings
|
||||
#define ARDUINO_SCL_PIN 7 // SCL signal pin
|
||||
#define ARDUINO_SDA_PIN 30 // SDA signal pin
|
||||
#define ARDUINO_AREF_PIN 0 // Aref pin
|
||||
#define ARDUINO_13_PIN 29 // Digital pin 13
|
||||
#define ARDUINO_12_PIN 28 // Digital pin 12
|
||||
#define ARDUINO_11_PIN 25 // Digital pin 11
|
||||
#define ARDUINO_10_PIN 24 // Digital pin 10
|
||||
#define ARDUINO_9_PIN 23 // Digital pin 9
|
||||
#define ARDUINO_8_PIN 20 // Digital pin 8
|
||||
|
||||
#define ARDUINO_7_PIN 19 // Digital pin 7
|
||||
#define ARDUINO_6_PIN 18 // Digital pin 6
|
||||
#define ARDUINO_5_PIN 17 // Digital pin 5
|
||||
#define ARDUINO_4_PIN 16 // Digital pin 4
|
||||
#define ARDUINO_3_PIN 15 // Digital pin 3
|
||||
#define ARDUINO_2_PIN 14 // Digital pin 2
|
||||
#define ARDUINO_1_PIN 13 // Digital pin 1
|
||||
#define ARDUINO_0_PIN 12 // Digital pin 0
|
||||
|
||||
#define ARDUINO_A0_PIN 1 // Analog channel 0
|
||||
#define ARDUINO_A1_PIN 2 // Analog channel 1
|
||||
#define ARDUINO_A2_PIN 3 // Analog channel 2
|
||||
#define ARDUINO_A3_PIN 4 // Analog channel 3
|
||||
#define ARDUINO_A4_PIN 5 // Analog channel 4
|
||||
#define ARDUINO_A5_PIN 6 // Analog channel 5
|
||||
|
||||
// Low frequency clock source to be used by the SoftDevice
|
||||
#ifdef S210
|
||||
#define NRF_CLOCK_LFCLKSRC NRF_CLOCK_LFCLKSRC_XTAL_20_PPM
|
||||
#else
|
||||
#define NRF_CLOCK_LFCLKSRC {.source = NRF_CLOCK_LF_SRC_XTAL, \
|
||||
.rc_ctiv = 0, \
|
||||
.rc_temp_ctiv = 0, \
|
||||
.xtal_accuracy = NRF_CLOCK_LF_XTAL_ACCURACY_20_PPM}
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // PCA10028_H
|
||||
97
SDK/12.3.0_d7731ad/components/boards/pca10031.h
Normal file
97
SDK/12.3.0_d7731ad/components/boards/pca10031.h
Normal file
@@ -0,0 +1,97 @@
|
||||
/**
|
||||
* Copyright (c) 2014 - 2017, Nordic Semiconductor ASA
|
||||
*
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification,
|
||||
* are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this
|
||||
* list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form, except as embedded into a Nordic
|
||||
* Semiconductor ASA integrated circuit in a product or a software update for
|
||||
* such product, must reproduce the above copyright notice, this list of
|
||||
* conditions and the following disclaimer in the documentation and/or other
|
||||
* materials provided with the distribution.
|
||||
*
|
||||
* 3. Neither the name of Nordic Semiconductor ASA nor the names of its
|
||||
* contributors may be used to endorse or promote products derived from this
|
||||
* software without specific prior written permission.
|
||||
*
|
||||
* 4. This software, with or without modification, must only be used with a
|
||||
* Nordic Semiconductor ASA integrated circuit.
|
||||
*
|
||||
* 5. Any software provided in binary form under this license must not be reverse
|
||||
* engineered, decompiled, modified and/or disassembled.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY NORDIC SEMICONDUCTOR ASA "AS IS" AND ANY EXPRESS
|
||||
* OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY, NONINFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL NORDIC SEMICONDUCTOR ASA OR CONTRIBUTORS BE
|
||||
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
|
||||
* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
|
||||
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
*/
|
||||
#ifndef PCA10031_H
|
||||
#define PCA10031_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "nrf_gpio.h"
|
||||
|
||||
// LEDs definitions for PCA10031
|
||||
#define LEDS_NUMBER 3
|
||||
|
||||
#define LED_START 21
|
||||
#define LED_RGB_RED 21
|
||||
#define LED_RGB_GREEN 22
|
||||
#define LED_RGB_BLUE 23
|
||||
#define LED_STOP 23
|
||||
|
||||
#define LEDS_ACTIVE_STATE 1
|
||||
|
||||
#define LEDS_INV_MASK LEDS_MASK
|
||||
|
||||
#define LED_RGB_RED_MASK (1<<LED_RGB_RED)
|
||||
#define LED_RGB_GREEN_MASK (1<<LED_RGB_GREEN)
|
||||
#define LED_RGB_BLUE_MASK (1<<LED_RGB_BLUE)
|
||||
|
||||
#define LEDS_LIST { LED_RGB_RED, LED_RGB_GREEN, LED_RGB_BLUE}
|
||||
// defining RGB led as 3 single LEDs
|
||||
#define BSP_LED_0 LED_RGB_RED
|
||||
#define BSP_LED_1 LED_RGB_GREEN
|
||||
#define BSP_LED_2 LED_RGB_BLUE
|
||||
|
||||
// there are no user buttons
|
||||
#define BUTTONS_NUMBER 0
|
||||
#define BUTTONS_LIST {}
|
||||
|
||||
// UART connection with J-Link
|
||||
#define RX_PIN_NUMBER 11
|
||||
#define TX_PIN_NUMBER 9
|
||||
#define CTS_PIN_NUMBER 10
|
||||
#define RTS_PIN_NUMBER 8
|
||||
#define HWFC true
|
||||
|
||||
// Low frequency clock source to be used by the SoftDevice
|
||||
#ifdef S210
|
||||
#define NRF_CLOCK_LFCLKSRC NRF_CLOCK_LFCLKSRC_XTAL_20_PPM
|
||||
#else
|
||||
#define NRF_CLOCK_LFCLKSRC {.source = NRF_CLOCK_LF_SRC_XTAL, \
|
||||
.rc_ctiv = 0, \
|
||||
.rc_temp_ctiv = 0, \
|
||||
.xtal_accuracy = NRF_CLOCK_LF_XTAL_ACCURACY_20_PPM}
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
182
SDK/12.3.0_d7731ad/components/boards/pca10036.h
Normal file
182
SDK/12.3.0_d7731ad/components/boards/pca10036.h
Normal file
@@ -0,0 +1,182 @@
|
||||
/**
|
||||
* Copyright (c) 2014 - 2017, Nordic Semiconductor ASA
|
||||
*
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification,
|
||||
* are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this
|
||||
* list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form, except as embedded into a Nordic
|
||||
* Semiconductor ASA integrated circuit in a product or a software update for
|
||||
* such product, must reproduce the above copyright notice, this list of
|
||||
* conditions and the following disclaimer in the documentation and/or other
|
||||
* materials provided with the distribution.
|
||||
*
|
||||
* 3. Neither the name of Nordic Semiconductor ASA nor the names of its
|
||||
* contributors may be used to endorse or promote products derived from this
|
||||
* software without specific prior written permission.
|
||||
*
|
||||
* 4. This software, with or without modification, must only be used with a
|
||||
* Nordic Semiconductor ASA integrated circuit.
|
||||
*
|
||||
* 5. Any software provided in binary form under this license must not be reverse
|
||||
* engineered, decompiled, modified and/or disassembled.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY NORDIC SEMICONDUCTOR ASA "AS IS" AND ANY EXPRESS
|
||||
* OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY, NONINFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL NORDIC SEMICONDUCTOR ASA OR CONTRIBUTORS BE
|
||||
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
|
||||
* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
|
||||
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
*/
|
||||
#ifndef PCA10036_H
|
||||
#define PCA10036_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "nrf_gpio.h"
|
||||
|
||||
// LEDs definitions for PCA10036
|
||||
#define LEDS_NUMBER 4
|
||||
|
||||
#define LED_START 17
|
||||
#define LED_1 17
|
||||
#define LED_2 18
|
||||
#define LED_3 19
|
||||
#define LED_4 20
|
||||
#define LED_STOP 20
|
||||
|
||||
#define LEDS_ACTIVE_STATE 0
|
||||
|
||||
#define LEDS_INV_MASK LEDS_MASK
|
||||
|
||||
#define LEDS_LIST { LED_1, LED_2, LED_3, LED_4 }
|
||||
|
||||
#define BSP_LED_0 LED_1
|
||||
#define BSP_LED_1 LED_2
|
||||
#define BSP_LED_2 LED_3
|
||||
#define BSP_LED_3 LED_4
|
||||
|
||||
#define BUTTONS_NUMBER 4
|
||||
|
||||
#define BUTTON_START 13
|
||||
#define BUTTON_1 13
|
||||
#define BUTTON_2 14
|
||||
#define BUTTON_3 15
|
||||
#define BUTTON_4 16
|
||||
#define BUTTON_STOP 16
|
||||
#define BUTTON_PULL NRF_GPIO_PIN_PULLUP
|
||||
|
||||
#define BUTTONS_ACTIVE_STATE 0
|
||||
|
||||
#define BUTTONS_LIST { BUTTON_1, BUTTON_2, BUTTON_3, BUTTON_4 }
|
||||
|
||||
#define BSP_BUTTON_0 BUTTON_1
|
||||
#define BSP_BUTTON_1 BUTTON_2
|
||||
#define BSP_BUTTON_2 BUTTON_3
|
||||
#define BSP_BUTTON_3 BUTTON_4
|
||||
|
||||
#define RX_PIN_NUMBER 8
|
||||
#define TX_PIN_NUMBER 6
|
||||
#define CTS_PIN_NUMBER 7
|
||||
#define RTS_PIN_NUMBER 5
|
||||
#define HWFC true
|
||||
|
||||
#define SPIS_MISO_PIN 28 // SPI MISO signal.
|
||||
#define SPIS_CSN_PIN 12 // SPI CSN signal.
|
||||
#define SPIS_MOSI_PIN 25 // SPI MOSI signal.
|
||||
#define SPIS_SCK_PIN 29 // SPI SCK signal.
|
||||
|
||||
#define SPIM0_SCK_PIN 29 // SPI clock GPIO pin number.
|
||||
#define SPIM0_MOSI_PIN 25 // SPI Master Out Slave In GPIO pin number.
|
||||
#define SPIM0_MISO_PIN 28 // SPI Master In Slave Out GPIO pin number.
|
||||
#define SPIM0_SS_PIN 12 // SPI Slave Select GPIO pin number.
|
||||
|
||||
#define SPIM1_SCK_PIN 2 // SPI clock GPIO pin number.
|
||||
#define SPIM1_MOSI_PIN 3 // SPI Master Out Slave In GPIO pin number.
|
||||
#define SPIM1_MISO_PIN 4 // SPI Master In Slave Out GPIO pin number.
|
||||
#define SPIM1_SS_PIN 5 // SPI Slave Select GPIO pin number.
|
||||
|
||||
#define SPIM2_SCK_PIN 12 // SPI clock GPIO pin number.
|
||||
#define SPIM2_MOSI_PIN 13 // SPI Master Out Slave In GPIO pin number.
|
||||
#define SPIM2_MISO_PIN 14 // SPI Master In Slave Out GPIO pin number.
|
||||
#define SPIM2_SS_PIN 15 // SPI Slave Select GPIO pin number.
|
||||
|
||||
// serialization APPLICATION board - temp. setup for running serialized MEMU tests
|
||||
#define SER_APP_RX_PIN 23 // UART RX pin number.
|
||||
#define SER_APP_TX_PIN 24 // UART TX pin number.
|
||||
#define SER_APP_CTS_PIN 2 // UART Clear To Send pin number.
|
||||
#define SER_APP_RTS_PIN 25 // UART Request To Send pin number.
|
||||
|
||||
#define SER_APP_SPIM0_SCK_PIN 27 // SPI clock GPIO pin number.
|
||||
#define SER_APP_SPIM0_MOSI_PIN 2 // SPI Master Out Slave In GPIO pin number
|
||||
#define SER_APP_SPIM0_MISO_PIN 26 // SPI Master In Slave Out GPIO pin number
|
||||
#define SER_APP_SPIM0_SS_PIN 23 // SPI Slave Select GPIO pin number
|
||||
#define SER_APP_SPIM0_RDY_PIN 25 // SPI READY GPIO pin number
|
||||
#define SER_APP_SPIM0_REQ_PIN 24 // SPI REQUEST GPIO pin number
|
||||
|
||||
// serialization CONNECTIVITY board
|
||||
#define SER_CON_RX_PIN 24 // UART RX pin number.
|
||||
#define SER_CON_TX_PIN 23 // UART TX pin number.
|
||||
#define SER_CON_CTS_PIN 25 // UART Clear To Send pin number. Not used if HWFC is set to false.
|
||||
#define SER_CON_RTS_PIN 2 // UART Request To Send pin number. Not used if HWFC is set to false.
|
||||
|
||||
|
||||
#define SER_CON_SPIS_SCK_PIN 27 // SPI SCK signal.
|
||||
#define SER_CON_SPIS_MOSI_PIN 2 // SPI MOSI signal.
|
||||
#define SER_CON_SPIS_MISO_PIN 26 // SPI MISO signal.
|
||||
#define SER_CON_SPIS_CSN_PIN 23 // SPI CSN signal.
|
||||
#define SER_CON_SPIS_RDY_PIN 25 // SPI READY GPIO pin number.
|
||||
#define SER_CON_SPIS_REQ_PIN 24 // SPI REQUEST GPIO pin number.
|
||||
|
||||
#define SER_CONN_CHIP_RESET_PIN 11 // Pin used to reset connectivity chip
|
||||
|
||||
// Arduino board mappings
|
||||
#define ARDUINO_SCL_PIN 27 // SCL signal pin
|
||||
#define ARDUINO_SDA_PIN 26 // SDA signal pin
|
||||
#define ARDUINO_AREF_PIN 2 // Aref pin
|
||||
#define ARDUINO_13_PIN 25 // Digital pin 13
|
||||
#define ARDUINO_12_PIN 24 // Digital pin 12
|
||||
#define ARDUINO_11_PIN 23 // Digital pin 11
|
||||
#define ARDUINO_10_PIN 22 // Digital pin 10
|
||||
#define ARDUINO_9_PIN 20 // Digital pin 9
|
||||
#define ARDUINO_8_PIN 19 // Digital pin 8
|
||||
|
||||
#define ARDUINO_7_PIN 18 // Digital pin 7
|
||||
#define ARDUINO_6_PIN 17 // Digital pin 6
|
||||
#define ARDUINO_5_PIN 16 // Digital pin 5
|
||||
#define ARDUINO_4_PIN 15 // Digital pin 4
|
||||
#define ARDUINO_3_PIN 14 // Digital pin 3
|
||||
#define ARDUINO_2_PIN 13 // Digital pin 2
|
||||
#define ARDUINO_1_PIN 12 // Digital pin 1
|
||||
#define ARDUINO_0_PIN 11 // Digital pin 0
|
||||
|
||||
#define ARDUINO_A0_PIN 3 // Analog channel 0
|
||||
#define ARDUINO_A1_PIN 4 // Analog channel 1
|
||||
#define ARDUINO_A2_PIN 28 // Analog channel 2
|
||||
#define ARDUINO_A3_PIN 29 // Analog channel 3
|
||||
#define ARDUINO_A4_PIN 30 // Analog channel 4
|
||||
#define ARDUINO_A5_PIN 31 // Analog channel 5
|
||||
|
||||
// Low frequency clock source to be used by the SoftDevice
|
||||
#define NRF_CLOCK_LFCLKSRC {.source = NRF_CLOCK_LF_SRC_XTAL, \
|
||||
.rc_ctiv = 0, \
|
||||
.rc_temp_ctiv = 0, \
|
||||
.xtal_accuracy = NRF_CLOCK_LF_XTAL_ACCURACY_20_PPM}
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // PCA10036_H
|
||||
182
SDK/12.3.0_d7731ad/components/boards/pca10040.h
Normal file
182
SDK/12.3.0_d7731ad/components/boards/pca10040.h
Normal file
@@ -0,0 +1,182 @@
|
||||
/**
|
||||
* Copyright (c) 2014 - 2017, Nordic Semiconductor ASA
|
||||
*
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification,
|
||||
* are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this
|
||||
* list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form, except as embedded into a Nordic
|
||||
* Semiconductor ASA integrated circuit in a product or a software update for
|
||||
* such product, must reproduce the above copyright notice, this list of
|
||||
* conditions and the following disclaimer in the documentation and/or other
|
||||
* materials provided with the distribution.
|
||||
*
|
||||
* 3. Neither the name of Nordic Semiconductor ASA nor the names of its
|
||||
* contributors may be used to endorse or promote products derived from this
|
||||
* software without specific prior written permission.
|
||||
*
|
||||
* 4. This software, with or without modification, must only be used with a
|
||||
* Nordic Semiconductor ASA integrated circuit.
|
||||
*
|
||||
* 5. Any software provided in binary form under this license must not be reverse
|
||||
* engineered, decompiled, modified and/or disassembled.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY NORDIC SEMICONDUCTOR ASA "AS IS" AND ANY EXPRESS
|
||||
* OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY, NONINFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL NORDIC SEMICONDUCTOR ASA OR CONTRIBUTORS BE
|
||||
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
|
||||
* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
|
||||
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
*/
|
||||
#ifndef PCA10040_H
|
||||
#define PCA10040_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "nrf_gpio.h"
|
||||
|
||||
// LEDs definitions for PCA10040
|
||||
#define LEDS_NUMBER 4
|
||||
|
||||
#define LED_START 17
|
||||
#define LED_1 17
|
||||
#define LED_2 18
|
||||
#define LED_3 19
|
||||
#define LED_4 20
|
||||
#define LED_STOP 20
|
||||
|
||||
#define LEDS_ACTIVE_STATE 0
|
||||
|
||||
#define LEDS_INV_MASK LEDS_MASK
|
||||
|
||||
#define LEDS_LIST { LED_1, LED_2, LED_3, LED_4 }
|
||||
|
||||
#define BSP_LED_0 LED_1
|
||||
#define BSP_LED_1 LED_2
|
||||
#define BSP_LED_2 LED_3
|
||||
#define BSP_LED_3 LED_4
|
||||
|
||||
#define BUTTONS_NUMBER 4
|
||||
|
||||
#define BUTTON_START 13
|
||||
#define BUTTON_1 13
|
||||
#define BUTTON_2 14
|
||||
#define BUTTON_3 15
|
||||
#define BUTTON_4 16
|
||||
#define BUTTON_STOP 16
|
||||
#define BUTTON_PULL NRF_GPIO_PIN_PULLUP
|
||||
|
||||
#define BUTTONS_ACTIVE_STATE 0
|
||||
|
||||
#define BUTTONS_LIST { BUTTON_1, BUTTON_2, BUTTON_3, BUTTON_4 }
|
||||
|
||||
#define BSP_BUTTON_0 BUTTON_1
|
||||
#define BSP_BUTTON_1 BUTTON_2
|
||||
#define BSP_BUTTON_2 BUTTON_3
|
||||
#define BSP_BUTTON_3 BUTTON_4
|
||||
|
||||
#define RX_PIN_NUMBER 8
|
||||
#define TX_PIN_NUMBER 6
|
||||
#define CTS_PIN_NUMBER 7
|
||||
#define RTS_PIN_NUMBER 5
|
||||
#define HWFC true
|
||||
|
||||
#define SPIS_MISO_PIN 28 // SPI MISO signal.
|
||||
#define SPIS_CSN_PIN 12 // SPI CSN signal.
|
||||
#define SPIS_MOSI_PIN 25 // SPI MOSI signal.
|
||||
#define SPIS_SCK_PIN 29 // SPI SCK signal.
|
||||
|
||||
#define SPIM0_SCK_PIN 29 // SPI clock GPIO pin number.
|
||||
#define SPIM0_MOSI_PIN 25 // SPI Master Out Slave In GPIO pin number.
|
||||
#define SPIM0_MISO_PIN 28 // SPI Master In Slave Out GPIO pin number.
|
||||
#define SPIM0_SS_PIN 12 // SPI Slave Select GPIO pin number.
|
||||
|
||||
#define SPIM1_SCK_PIN 2 // SPI clock GPIO pin number.
|
||||
#define SPIM1_MOSI_PIN 3 // SPI Master Out Slave In GPIO pin number.
|
||||
#define SPIM1_MISO_PIN 4 // SPI Master In Slave Out GPIO pin number.
|
||||
#define SPIM1_SS_PIN 5 // SPI Slave Select GPIO pin number.
|
||||
|
||||
#define SPIM2_SCK_PIN 12 // SPI clock GPIO pin number.
|
||||
#define SPIM2_MOSI_PIN 13 // SPI Master Out Slave In GPIO pin number.
|
||||
#define SPIM2_MISO_PIN 14 // SPI Master In Slave Out GPIO pin number.
|
||||
#define SPIM2_SS_PIN 15 // SPI Slave Select GPIO pin number.
|
||||
|
||||
// serialization APPLICATION board - temp. setup for running serialized MEMU tests
|
||||
#define SER_APP_RX_PIN 23 // UART RX pin number.
|
||||
#define SER_APP_TX_PIN 24 // UART TX pin number.
|
||||
#define SER_APP_CTS_PIN 2 // UART Clear To Send pin number.
|
||||
#define SER_APP_RTS_PIN 25 // UART Request To Send pin number.
|
||||
|
||||
#define SER_APP_SPIM0_SCK_PIN 27 // SPI clock GPIO pin number.
|
||||
#define SER_APP_SPIM0_MOSI_PIN 2 // SPI Master Out Slave In GPIO pin number
|
||||
#define SER_APP_SPIM0_MISO_PIN 26 // SPI Master In Slave Out GPIO pin number
|
||||
#define SER_APP_SPIM0_SS_PIN 23 // SPI Slave Select GPIO pin number
|
||||
#define SER_APP_SPIM0_RDY_PIN 25 // SPI READY GPIO pin number
|
||||
#define SER_APP_SPIM0_REQ_PIN 24 // SPI REQUEST GPIO pin number
|
||||
|
||||
// serialization CONNECTIVITY board
|
||||
#define SER_CON_RX_PIN 24 // UART RX pin number.
|
||||
#define SER_CON_TX_PIN 23 // UART TX pin number.
|
||||
#define SER_CON_CTS_PIN 25 // UART Clear To Send pin number. Not used if HWFC is set to false.
|
||||
#define SER_CON_RTS_PIN 2 // UART Request To Send pin number. Not used if HWFC is set to false.
|
||||
|
||||
|
||||
#define SER_CON_SPIS_SCK_PIN 27 // SPI SCK signal.
|
||||
#define SER_CON_SPIS_MOSI_PIN 2 // SPI MOSI signal.
|
||||
#define SER_CON_SPIS_MISO_PIN 26 // SPI MISO signal.
|
||||
#define SER_CON_SPIS_CSN_PIN 23 // SPI CSN signal.
|
||||
#define SER_CON_SPIS_RDY_PIN 25 // SPI READY GPIO pin number.
|
||||
#define SER_CON_SPIS_REQ_PIN 24 // SPI REQUEST GPIO pin number.
|
||||
|
||||
#define SER_CONN_CHIP_RESET_PIN 11 // Pin used to reset connectivity chip
|
||||
|
||||
|
||||
// Arduino board mappings
|
||||
#define ARDUINO_SCL_PIN 27 // SCL signal pin
|
||||
#define ARDUINO_SDA_PIN 26 // SDA signal pin
|
||||
#define ARDUINO_AREF_PIN 2 // Aref pin
|
||||
#define ARDUINO_13_PIN 25 // Digital pin 13
|
||||
#define ARDUINO_12_PIN 24 // Digital pin 12
|
||||
#define ARDUINO_11_PIN 23 // Digital pin 11
|
||||
#define ARDUINO_10_PIN 22 // Digital pin 10
|
||||
#define ARDUINO_9_PIN 20 // Digital pin 9
|
||||
#define ARDUINO_8_PIN 19 // Digital pin 8
|
||||
|
||||
#define ARDUINO_7_PIN 18 // Digital pin 7
|
||||
#define ARDUINO_6_PIN 17 // Digital pin 6
|
||||
#define ARDUINO_5_PIN 16 // Digital pin 5
|
||||
#define ARDUINO_4_PIN 15 // Digital pin 4
|
||||
#define ARDUINO_3_PIN 14 // Digital pin 3
|
||||
#define ARDUINO_2_PIN 13 // Digital pin 2
|
||||
#define ARDUINO_1_PIN 12 // Digital pin 1
|
||||
#define ARDUINO_0_PIN 11 // Digital pin 0
|
||||
|
||||
#define ARDUINO_A0_PIN 3 // Analog channel 0
|
||||
#define ARDUINO_A1_PIN 4 // Analog channel 1
|
||||
#define ARDUINO_A2_PIN 28 // Analog channel 2
|
||||
#define ARDUINO_A3_PIN 29 // Analog channel 3
|
||||
#define ARDUINO_A4_PIN 30 // Analog channel 4
|
||||
#define ARDUINO_A5_PIN 31 // Analog channel 5
|
||||
|
||||
// Low frequency clock source to be used by the SoftDevice
|
||||
#define NRF_CLOCK_LFCLKSRC {.source = NRF_CLOCK_LF_SRC_XTAL, \
|
||||
.rc_ctiv = 0, \
|
||||
.rc_temp_ctiv = 0, \
|
||||
.xtal_accuracy = NRF_CLOCK_LF_XTAL_ACCURACY_20_PPM}
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // PCA10040_H
|
||||
136
SDK/12.3.0_d7731ad/components/boards/pca10056.h
Normal file
136
SDK/12.3.0_d7731ad/components/boards/pca10056.h
Normal file
@@ -0,0 +1,136 @@
|
||||
/**
|
||||
* Copyright (c) 2016 - 2017, Nordic Semiconductor ASA
|
||||
*
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification,
|
||||
* are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this
|
||||
* list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form, except as embedded into a Nordic
|
||||
* Semiconductor ASA integrated circuit in a product or a software update for
|
||||
* such product, must reproduce the above copyright notice, this list of
|
||||
* conditions and the following disclaimer in the documentation and/or other
|
||||
* materials provided with the distribution.
|
||||
*
|
||||
* 3. Neither the name of Nordic Semiconductor ASA nor the names of its
|
||||
* contributors may be used to endorse or promote products derived from this
|
||||
* software without specific prior written permission.
|
||||
*
|
||||
* 4. This software, with or without modification, must only be used with a
|
||||
* Nordic Semiconductor ASA integrated circuit.
|
||||
*
|
||||
* 5. Any software provided in binary form under this license must not be reverse
|
||||
* engineered, decompiled, modified and/or disassembled.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY NORDIC SEMICONDUCTOR ASA "AS IS" AND ANY EXPRESS
|
||||
* OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY, NONINFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL NORDIC SEMICONDUCTOR ASA OR CONTRIBUTORS BE
|
||||
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
|
||||
* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
|
||||
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
*/
|
||||
#ifndef PCA10056_H
|
||||
#define PCA10056_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "nrf_gpio.h"
|
||||
|
||||
// LEDs definitions for PCA10056
|
||||
#define LEDS_NUMBER 4
|
||||
|
||||
#define LED_1 NRF_GPIO_PIN_MAP(0,13)
|
||||
#define LED_2 NRF_GPIO_PIN_MAP(0,14)
|
||||
#define LED_3 NRF_GPIO_PIN_MAP(0,15)
|
||||
#define LED_4 NRF_GPIO_PIN_MAP(0,16)
|
||||
|
||||
#define LEDS_ACTIVE_STATE 0
|
||||
|
||||
#define LEDS_LIST { LED_1, LED_2, LED_3, LED_4 }
|
||||
|
||||
#define LEDS_INV_MASK LEDS_MASK
|
||||
|
||||
#define BSP_LED_0 13
|
||||
#define BSP_LED_1 14
|
||||
#define BSP_LED_2 15
|
||||
#define BSP_LED_3 16
|
||||
|
||||
#define BUTTONS_NUMBER 4
|
||||
|
||||
#define BUTTON_1 11
|
||||
#define BUTTON_2 12
|
||||
#define BUTTON_3 24
|
||||
#define BUTTON_4 25
|
||||
#define BUTTON_PULL NRF_GPIO_PIN_PULLUP
|
||||
|
||||
#define BUTTONS_ACTIVE_STATE 0
|
||||
|
||||
#define BUTTONS_LIST { BUTTON_1, BUTTON_2, BUTTON_3, BUTTON_4 }
|
||||
|
||||
#define BSP_BUTTON_0 BUTTON_1
|
||||
#define BSP_BUTTON_1 BUTTON_2
|
||||
#define BSP_BUTTON_2 BUTTON_3
|
||||
#define BSP_BUTTON_3 BUTTON_4
|
||||
|
||||
#define RX_PIN_NUMBER 8
|
||||
#define TX_PIN_NUMBER 6
|
||||
#define CTS_PIN_NUMBER 7
|
||||
#define RTS_PIN_NUMBER 5
|
||||
#define HWFC true
|
||||
|
||||
#define BSP_QSPI_SCK_PIN 19
|
||||
#define BSP_QSPI_CSN_PIN 17
|
||||
#define BSP_QSPI_IO0_PIN 20
|
||||
#define BSP_QSPI_IO1_PIN 21
|
||||
#define BSP_QSPI_IO2_PIN 22
|
||||
#define BSP_QSPI_IO3_PIN 23
|
||||
|
||||
// Arduino board mappings
|
||||
#define ARDUINO_SCL_PIN 27 // SCL signal pin
|
||||
#define ARDUINO_SDA_PIN 26 // SDA signal pin
|
||||
#define ARDUINO_AREF_PIN 2 // Aref pin
|
||||
|
||||
#define ARDUINO_13_PIN NRF_GPIO_PIN_MAP(1, 15) // Digital pin 13
|
||||
#define ARDUINO_12_PIN NRF_GPIO_PIN_MAP(1, 14) // Digital pin 12
|
||||
#define ARDUINO_11_PIN NRF_GPIO_PIN_MAP(1, 13) // Digital pin 11
|
||||
#define ARDUINO_10_PIN NRF_GPIO_PIN_MAP(1, 12) // Digital pin 10
|
||||
#define ARDUINO_9_PIN NRF_GPIO_PIN_MAP(1, 11) // Digital pin 9
|
||||
#define ARDUINO_8_PIN NRF_GPIO_PIN_MAP(1, 10) // Digital pin 8
|
||||
|
||||
#define ARDUINO_7_PIN NRF_GPIO_PIN_MAP(1, 8) // Digital pin 7
|
||||
#define ARDUINO_6_PIN NRF_GPIO_PIN_MAP(1, 7) // Digital pin 6
|
||||
#define ARDUINO_5_PIN NRF_GPIO_PIN_MAP(1, 6) // Digital pin 5
|
||||
#define ARDUINO_4_PIN NRF_GPIO_PIN_MAP(1, 5) // Digital pin 4
|
||||
#define ARDUINO_3_PIN NRF_GPIO_PIN_MAP(1, 4) // Digital pin 3
|
||||
#define ARDUINO_2_PIN NRF_GPIO_PIN_MAP(1, 3) // Digital pin 2
|
||||
#define ARDUINO_1_PIN NRF_GPIO_PIN_MAP(1, 2) // Digital pin 1
|
||||
#define ARDUINO_0_PIN NRF_GPIO_PIN_MAP(1, 1) // Digital pin 0
|
||||
|
||||
#define ARDUINO_A0_PIN 3 // Analog channel 0
|
||||
#define ARDUINO_A1_PIN 4 // Analog channel 1
|
||||
#define ARDUINO_A2_PIN 28 // Analog channel 2
|
||||
#define ARDUINO_A3_PIN 29 // Analog channel 3
|
||||
#define ARDUINO_A4_PIN 30 // Analog channel 4
|
||||
#define ARDUINO_A5_PIN 31 // Analog channel 5
|
||||
|
||||
// Low frequency clock source to be used by the SoftDevice
|
||||
#define NRF_CLOCK_LFCLKSRC {.source = NRF_CLOCK_LF_SRC_XTAL, \
|
||||
.rc_ctiv = 0, \
|
||||
.rc_temp_ctiv = 0, \
|
||||
.xtal_accuracy = NRF_CLOCK_LF_XTAL_ACCURACY_20_PPM}
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // PCA10056_H
|
||||
99
SDK/12.3.0_d7731ad/components/boards/pca20006.h
Normal file
99
SDK/12.3.0_d7731ad/components/boards/pca20006.h
Normal file
@@ -0,0 +1,99 @@
|
||||
/**
|
||||
* Copyright (c) 2014 - 2017, Nordic Semiconductor ASA
|
||||
*
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification,
|
||||
* are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this
|
||||
* list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form, except as embedded into a Nordic
|
||||
* Semiconductor ASA integrated circuit in a product or a software update for
|
||||
* such product, must reproduce the above copyright notice, this list of
|
||||
* conditions and the following disclaimer in the documentation and/or other
|
||||
* materials provided with the distribution.
|
||||
*
|
||||
* 3. Neither the name of Nordic Semiconductor ASA nor the names of its
|
||||
* contributors may be used to endorse or promote products derived from this
|
||||
* software without specific prior written permission.
|
||||
*
|
||||
* 4. This software, with or without modification, must only be used with a
|
||||
* Nordic Semiconductor ASA integrated circuit.
|
||||
*
|
||||
* 5. Any software provided in binary form under this license must not be reverse
|
||||
* engineered, decompiled, modified and/or disassembled.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY NORDIC SEMICONDUCTOR ASA "AS IS" AND ANY EXPRESS
|
||||
* OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY, NONINFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL NORDIC SEMICONDUCTOR ASA OR CONTRIBUTORS BE
|
||||
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
|
||||
* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
|
||||
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
*/
|
||||
#ifndef PCA20006_H
|
||||
#define PCA20006_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "nrf_gpio.h"
|
||||
|
||||
// LEDs and buttons definition for PCA20006 board (beacon)
|
||||
#define LEDS_NUMBER 3
|
||||
|
||||
#define LED_RGB_RED 16
|
||||
#define LED_RGB_GREEN 12
|
||||
#define LED_RGB_BLUE 15
|
||||
|
||||
#define LEDS_ACTIVE_STATE 0
|
||||
|
||||
#define BSP_LED_0 LED_RGB_RED
|
||||
#define BSP_LED_1 LED_RGB_GREEN
|
||||
#define BSP_LED_2 LED_RGB_BLUE
|
||||
|
||||
#define LEDS_LIST { LED_RGB_RED, LED_RGB_GREEN, LED_RGB_BLUE}
|
||||
|
||||
#define LEDS_INV_MASK LEDS_MASK
|
||||
|
||||
#define BUTTON_0 8
|
||||
#define BUTTON_1 18
|
||||
#define BUTTON_PULL NRF_GPIO_PIN_PULLUP
|
||||
|
||||
#define BUTTONS_ACTIVE_STATE 0
|
||||
|
||||
#define BSP_BUTTON_0 BUTTON_0
|
||||
#define BSP_BUTTON_1 BUTTON_1
|
||||
|
||||
#define BUTTONS_NUMBER 2
|
||||
|
||||
#define BUTTONS_LIST { BUTTON_0, BUTTON_1 }
|
||||
|
||||
#define RX_PIN_NUMBER 24
|
||||
#define TX_PIN_NUMBER 9
|
||||
#define CTS_PIN_NUMBER 21
|
||||
#define RTS_PIN_NUMBER 11
|
||||
#define HWFC true
|
||||
|
||||
// Low frequency clock source to be used by the SoftDevice
|
||||
#ifdef S210
|
||||
#define NRF_CLOCK_LFCLKSRC NRF_CLOCK_LFCLKSRC_XTAL_20_PPM
|
||||
#else
|
||||
#define NRF_CLOCK_LFCLKSRC {.source = NRF_CLOCK_LF_SRC_XTAL, .rc_ctiv = 0, .rc_temp_ctiv = 0, .xtal_accuracy=NRF_CLOCK_LF_XTAL_ACCURACY_20_PPM}
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
94
SDK/12.3.0_d7731ad/components/boards/wt51822.h
Normal file
94
SDK/12.3.0_d7731ad/components/boards/wt51822.h
Normal file
@@ -0,0 +1,94 @@
|
||||
/**
|
||||
* Copyright (c) 2014 - 2017, Nordic Semiconductor ASA
|
||||
*
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification,
|
||||
* are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this
|
||||
* list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form, except as embedded into a Nordic
|
||||
* Semiconductor ASA integrated circuit in a product or a software update for
|
||||
* such product, must reproduce the above copyright notice, this list of
|
||||
* conditions and the following disclaimer in the documentation and/or other
|
||||
* materials provided with the distribution.
|
||||
*
|
||||
* 3. Neither the name of Nordic Semiconductor ASA nor the names of its
|
||||
* contributors may be used to endorse or promote products derived from this
|
||||
* software without specific prior written permission.
|
||||
*
|
||||
* 4. This software, with or without modification, must only be used with a
|
||||
* Nordic Semiconductor ASA integrated circuit.
|
||||
*
|
||||
* 5. Any software provided in binary form under this license must not be reverse
|
||||
* engineered, decompiled, modified and/or disassembled.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY NORDIC SEMICONDUCTOR ASA "AS IS" AND ANY EXPRESS
|
||||
* OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY, NONINFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL NORDIC SEMICONDUCTOR ASA OR CONTRIBUTORS BE
|
||||
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
|
||||
* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
|
||||
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
*/
|
||||
#ifndef WT51822_H
|
||||
#define WT51822_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define LEDS_NUMBER 3
|
||||
|
||||
#define LED_1 3
|
||||
#define LED_2 4
|
||||
#define LED_3 5
|
||||
|
||||
#define LEDS_LIST { LED_1, LED_2, LED_3 }
|
||||
|
||||
#define LEDS_ACTIVE_STATE 0
|
||||
|
||||
#define BSP_LED_0 LED_1
|
||||
#define BSP_LED_1 LED_2
|
||||
#define BSP_LED_2 LED_3
|
||||
|
||||
#define LEDS_INV_MASK LEDS_MASK
|
||||
|
||||
#define BUTTONS_NUMBER 3
|
||||
|
||||
#define SW_1 0
|
||||
#define SW_2 1
|
||||
#define SW_3 2
|
||||
#define BUTTON_PULL NRF_GPIO_PIN_PULLUP
|
||||
|
||||
#define BUTTONS_LIST { SW_1, SW_2, SW_3 }
|
||||
|
||||
#define BUTTONS_ACTIVE_STATE 0
|
||||
|
||||
#define BSP_BUTTON_0 SW_1
|
||||
#define BSP_BUTTON_1 SW_2
|
||||
#define BSP_BUTTON_2 SW_3
|
||||
|
||||
#define RX_PIN_NUMBER 13
|
||||
#define TX_PIN_NUMBER 12
|
||||
#define CTS_PIN_NUMBER 14
|
||||
#define RTS_PIN_NUMBER 15
|
||||
#define HWFC true
|
||||
|
||||
#define SER_CON_RX_PIN 13
|
||||
#define SER_CON_TX_PIN 12
|
||||
#define SER_CON_CTS_PIN 14
|
||||
#define SER_CON_RTS_PIN 15
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user