Skip to content

Commit

Permalink
Merge pull request #11 from charlesportwoodii/partcle_boards
Browse files Browse the repository at this point in the history
Argon + Boron board definition. Closes #9. Closes #10
  • Loading branch information
charlesportwoodii authored Jun 30, 2019
2 parents 89b8365 + 4cb744e commit 9f0f826
Show file tree
Hide file tree
Showing 5 changed files with 184 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ env:
- BOARD=mdk DEBUG=1
- BOARD=particle-xenon
- BOARD=particle-xenon DEBUG=1
- BOARD=particle-boron
- BOARD=particle-boron DEBUG=1
- BOARD=particle-argon
- BOARD=particle-argon DEBUG=1
- BOARD=feather-express
- BOARD=feather-express DEBUG=1

Expand Down
10 changes: 10 additions & 0 deletions boards/particle-argon/s140/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
include ../../Makefile.boards

CFLAGS += -DBOARD_CUSTOM

ASMFLAGS += -DBOARD_CUSTOM

ifeq ($(PBRICK_DEBUG), 1)
CFLAGS += -DNRF_LOG_BACKEND_UART_TX_PIN=6
ASMFLAGS += -DNRF_LOG_BACKEND_UART_TX_PIN=6
endif
80 changes: 80 additions & 0 deletions boards/particle-argon/s140/include/custom_board.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
/**
* Copyright (c) 2019-Present Charles R. Portwood II <charlesportwoodii@erianna.com>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * 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.
* * Neither the name of the <organization> nor the
* names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* 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
* DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> 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 CUSTOM_BOARD_H
#define CUSTOM_BOARD_H

#ifdef __cplusplus
extern "C" {
#endif

#include "nrf_gpio.h"

#define LEDS_NUMBER 3

#define LED_1 NRF_GPIO_PIN_MAP(0,14)
#define LED_2 NRF_GPIO_PIN_MAP(0,13)
#define LED_3 NRF_GPIO_PIN_MAP(0,15)

#define LEDS_ACTIVE_STATE 0

#define LEDS_LIST { LED_1, LED_2, LED_3 }

#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 BUTTONS_NUMBER 1

#define BUTTON_1 11
#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 8
#define TX_PIN_NUMBER 6
#define CTS_PIN_NUMBER 0xFFFFFFFF //NC
#define RTS_PIN_NUMBER 0xFFFFFFFF //NC
#define HWFC false

#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

#ifdef __cplusplus
}
#endif

#endif // CUSTOM_BOARD_H
10 changes: 10 additions & 0 deletions boards/particle-boron/s140/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
include ../../Makefile.boards

CFLAGS += -DBOARD_CUSTOM

ASMFLAGS += -DBOARD_CUSTOM

ifeq ($(PBRICK_DEBUG), 1)
CFLAGS += -DNRF_LOG_BACKEND_UART_TX_PIN=6
ASMFLAGS += -DNRF_LOG_BACKEND_UART_TX_PIN=6
endif
80 changes: 80 additions & 0 deletions boards/particle-boron/s140/include/custom_board.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
/**
* Copyright (c) 2019-Present Charles R. Portwood II <charlesportwoodii@erianna.com>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * 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.
* * Neither the name of the <organization> nor the
* names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* 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
* DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> 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 CUSTOM_BOARD_H
#define CUSTOM_BOARD_H

#ifdef __cplusplus
extern "C" {
#endif

#include "nrf_gpio.h"

#define LEDS_NUMBER 3

#define LED_1 NRF_GPIO_PIN_MAP(0,14)
#define LED_2 NRF_GPIO_PIN_MAP(0,13)
#define LED_3 NRF_GPIO_PIN_MAP(0,15)

#define LEDS_ACTIVE_STATE 0

#define LEDS_LIST { LED_1, LED_2, LED_3 }

#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 BUTTONS_NUMBER 1

#define BUTTON_1 11
#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 8
#define TX_PIN_NUMBER 6
#define CTS_PIN_NUMBER 0xFFFFFFFF //NC
#define RTS_PIN_NUMBER 0xFFFFFFFF //NC
#define HWFC false

#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

#ifdef __cplusplus
}
#endif

#endif // CUSTOM_BOARD_H

0 comments on commit 9f0f826

Please sign in to comment.