fix #41 use RXD,TXD in board header

This commit is contained in:
hathach 2019-01-14 12:50:20 +07:00
parent 3611a0579e
commit 2f1eec7118
No known key found for this signature in database
GPG Key ID: 2FA891220FBFD581
5 changed files with 63 additions and 58 deletions

View File

@ -56,10 +56,11 @@ endif
MK := mkdir MK := mkdir
RM := rm -rf RM := rm -rf
# Verbose mode (V=). 0: default, 1: print out CFLAG, LDFLAG 2: print all compile command
ifeq ("$(V)","2") ifeq ("$(V)","2")
QUIET := QUIET =
else else
QUIET := @ QUIET = @
endif endif
GNU_PREFIX = arm-none-eabi GNU_PREFIX = arm-none-eabi
@ -335,6 +336,8 @@ $(info CFLAGS $(CFLAGS))
$(info ) $(info )
$(info LDFLAGS $(LDFLAGS)) $(info LDFLAGS $(LDFLAGS))
$(info ) $(info )
$(info ASMFLAGS $(ASMFLAGS))
$(info )
endif endif
.phony: all clean size flash sd erase .phony: all clean size flash sd erase
@ -438,12 +441,12 @@ $(BUILD)/%.o: %.c
# Assemble files # Assemble files
$(BUILD)/%.o: %.S $(BUILD)/%.o: %.S
@echo AS $(notdir $<) @echo AS $(notdir $<)
@$(CC) $(ASMFLAGS) $(INC_PATHS) -c -o $@ $< $(QUIET)$(CC) $(ASMFLAGS) $(INC_PATHS) -c -o $@ $<
# Link # Link
$(BUILD)/$(OUTPUT_FILENAME)-nosd.out: $(BUILD) $(OBJECTS) $(BUILD)/$(OUTPUT_FILENAME)-nosd.out: $(BUILD) $(OBJECTS)
@echo LD $(OUTPUT_FILENAME)-nosd.out @echo LD $(OUTPUT_FILENAME)-nosd.out
$(CC) $(LDFLAGS) $(OBJECTS) $(LIBS) -lm -o $@ $(QUIET)$(CC) $(LDFLAGS) $(OBJECTS) $(LIBS) -lm -o $@
size: $(BUILD)/$(OUTPUT_FILENAME)-nosd.out size: $(BUILD)/$(OUTPUT_FILENAME)-nosd.out
-@echo '' -@echo ''

View File

@ -40,32 +40,32 @@
/*------------------------------------------------------------------*/ /*------------------------------------------------------------------*/
/* LED /* LED
*------------------------------------------------------------------*/ *------------------------------------------------------------------*/
#define LEDS_NUMBER 2 #define LEDS_NUMBER 2
#define LED_PRIMARY_PIN 17 // Red #define LED_PRIMARY_PIN 17 // Red
#define LED_SECONDARY_PIN 19 // Blue #define LED_SECONDARY_PIN 19 // Blue
#define LED_STATE_ON 1 #define LED_STATE_ON 1
/*------------------------------------------------------------------*/ /*------------------------------------------------------------------*/
/* BUTTON /* BUTTON
*------------------------------------------------------------------*/ *------------------------------------------------------------------*/
#define BUTTONS_NUMBER 2 #define BUTTONS_NUMBER 2
#define BUTTON_1 20 #define BUTTON_1 20
#define BUTTON_2 22 #define BUTTON_2 22
#define BUTTON_PULL NRF_GPIO_PIN_PULLUP #define BUTTON_PULL NRF_GPIO_PIN_PULLUP
/*------------------------------------------------------------------*/ /*------------------------------------------------------------------*/
/* UART /* UART
*------------------------------------------------------------------*/ *------------------------------------------------------------------*/
#define RX_PIN_NUMBER 8 #define RX_PIN_NUMBER 8
#define TX_PIN_NUMBER 6 #define TX_PIN_NUMBER 6
#define CTS_PIN_NUMBER 7 #define CTS_PIN_NUMBER 0
#define RTS_PIN_NUMBER 5 #define RTS_PIN_NUMBER 0
#define HWFC false #define HWFC false
// Used as model string in OTA mode // Used as model string in OTA mode
#define DIS_MANUFACTURER "Adafruit Industries" #define DIS_MANUFACTURER "Adafruit Industries"
#define DIS_MODEL "Bluefruit Feather nRF52832" #define DIS_MODEL "Bluefruit Feather nRF52832"
#define PRODUCT_NAME "Adafruit Bluefruit Feather nRF52832" #define PRODUCT_NAME "Adafruit Bluefruit Feather nRF52832"
#endif // _FEATHER52832_H #endif // _FEATHER52832_H

View File

@ -42,35 +42,35 @@
/*------------------------------------------------------------------*/ /*------------------------------------------------------------------*/
/* LED /* LED
*------------------------------------------------------------------*/ *------------------------------------------------------------------*/
#define LEDS_NUMBER 2 #define LEDS_NUMBER 2
#define LED_PRIMARY_PIN _PINNUM(1, 15) #define LED_PRIMARY_PIN _PINNUM(1, 15)
#define LED_SECONDARY_PIN _PINNUM(1, 10) #define LED_SECONDARY_PIN _PINNUM(1, 10)
#define LED_NEOPIXEL 16 #define LED_NEOPIXEL 16
#define BOARD_RGB_BRIGHTNESS 0x040404 #define BOARD_RGB_BRIGHTNESS 0x040404
#define LED_STATE_ON 1 #define LED_STATE_ON 1
/*------------------------------------------------------------------*/ /*------------------------------------------------------------------*/
/* BUTTON /* BUTTON
*------------------------------------------------------------------*/ *------------------------------------------------------------------*/
#define BUTTONS_NUMBER 2 #define BUTTONS_NUMBER 2
#define BUTTON_1 _PINNUM(0, 15) #define BUTTON_1 _PINNUM(0, 15)
#define BUTTON_2 _PINNUM(0, 19) #define BUTTON_2 _PINNUM(0, 19)
#define BUTTON_PULL NRF_GPIO_PIN_PULLUP #define BUTTON_PULL NRF_GPIO_PIN_PULLUP
/*------------------------------------------------------------------*/ /*------------------------------------------------------------------*/
/* UART /* UART
*------------------------------------------------------------------*/ *------------------------------------------------------------------*/
#define RX_PIN_NUMBER 8 #define RX_PIN_NUMBER 8
#define TX_PIN_NUMBER 6 #define TX_PIN_NUMBER 6
#define CTS_PIN_NUMBER 7 #define CTS_PIN_NUMBER 0
#define RTS_PIN_NUMBER 5 #define RTS_PIN_NUMBER 0
#define HWFC false #define HWFC false
// Used as model string in OTA mode // Used as model string in OTA mode
#define DIS_MANUFACTURER "Adafruit Industries" #define DIS_MANUFACTURER "Adafruit Industries"
#define DIS_MODEL "Bluefruit Feather nRF52840 Express" #define DIS_MODEL "Bluefruit Feather nRF52840 Express"
#define PRODUCT_NAME "Adafruit Feather nRF52840 Express" #define PRODUCT_NAME "Adafruit Feather nRF52840 Express"
#define VOLUME_LABEL "FTHR840BOOT" #define VOLUME_LABEL "FTHR840BOOT"
#endif // _FEATHER52840_H #endif // _FEATHER52840_H

View File

@ -40,30 +40,30 @@
/*------------------------------------------------------------------*/ /*------------------------------------------------------------------*/
/* LED /* LED
*------------------------------------------------------------------*/ *------------------------------------------------------------------*/
#define LEDS_NUMBER 2 #define LEDS_NUMBER 2
#define LED_PRIMARY_PIN 13 #define LED_PRIMARY_PIN 13
#define LED_SECONDARY_PIN 14 #define LED_SECONDARY_PIN 14
#define LED_STATE_ON 0 #define LED_STATE_ON 0
/*------------------------------------------------------------------*/ /*------------------------------------------------------------------*/
/* BUTTON /* BUTTON
*------------------------------------------------------------------*/ *------------------------------------------------------------------*/
#define BUTTONS_NUMBER 2 #define BUTTONS_NUMBER 2
#define BUTTON_1 11 #define BUTTON_1 11
#define BUTTON_2 12 #define BUTTON_2 12
#define BUTTON_PULL NRF_GPIO_PIN_PULLUP #define BUTTON_PULL NRF_GPIO_PIN_PULLUP
/*------------------------------------------------------------------*/ /*------------------------------------------------------------------*/
/* UART /* UART
*------------------------------------------------------------------*/ *------------------------------------------------------------------*/
#define RX_PIN_NUMBER 8 #define RX_PIN_NUMBER 8
#define TX_PIN_NUMBER 6 #define TX_PIN_NUMBER 6
#define CTS_PIN_NUMBER 7 #define CTS_PIN_NUMBER 0
#define RTS_PIN_NUMBER 5 #define RTS_PIN_NUMBER 0
#define HWFC false #define HWFC false
// Used as model string in OTA mode // Used as model string in OTA mode
#define DIS_MANUFACTURER "Nordic" #define DIS_MANUFACTURER "Nordic"
#define DIS_MODEL "PCA10056" #define DIS_MODEL "PCA10056"
#endif // PCA10056_H #endif // PCA10056_H

View File

@ -43,17 +43,19 @@
#ifndef SDK_CONFIG_H #ifndef SDK_CONFIG_H
#define SDK_CONFIG_H #define SDK_CONFIG_H
#include "boards.h"
//========================================================== //==========================================================
// <e> HCI_SLIP_ENABLED - hci_slip - SLIP protocol implementation used by HCI // <e> HCI_SLIP_ENABLED - hci_slip - SLIP protocol implementation used by HCI
//========================================================== //==========================================================
#define HCI_SLIP_ENABLED 1 #define HCI_SLIP_ENABLED 1
#define HCI_UART_BAUDRATE UART_BAUDRATE_BAUDRATE_Baud115200 #define HCI_UART_BAUDRATE UART_BAUDRATE_BAUDRATE_Baud115200
#define HCI_UART_FLOW_CONTROL 0 #define HCI_UART_FLOW_CONTROL HWFC
#define HCI_UART_RX_PIN 8 #define HCI_UART_RX_PIN RX_PIN_NUMBER
#define HCI_UART_TX_PIN 6 #define HCI_UART_TX_PIN TX_PIN_NUMBER
#define HCI_UART_RTS_PIN 5 #define HCI_UART_CTS_PIN CTS_PIN_NUMBER
#define HCI_UART_CTS_PIN 7 #define HCI_UART_RTS_PIN RTS_PIN_NUMBER
#define HCI_TRANSPORT_ENABLED 1 #define HCI_TRANSPORT_ENABLED 1
#define HCI_MAX_PACKET_SIZE_IN_BITS 8000 #define HCI_MAX_PACKET_SIZE_IN_BITS 8000