diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index d71407be..2ac3451c 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -26,8 +26,8 @@ jobs: run: platformio run -e tbeam - name: Build for heltec run: platformio run -e heltec - - name: Build for lora-relay-v1 - run: platformio run -e lora-relay-v1 + - name: Build for wisblock RAK4631 + run: platformio run -e rak4631 - name: Build for native run: platformio run -e native - name: Integration test diff --git a/bin/upload-to-bootloader.sh b/bin/upload-to-bootloader.sh index ba4b7b48..95ade3e3 100755 --- a/bin/upload-to-bootloader.sh +++ b/bin/upload-to-bootloader.sh @@ -1,4 +1,5 @@ +set -e echo "Converting to uf2 for NRF52 Adafruit bootloader" -bin/uf2conv.py .pio/build/lora-relay-v2/firmware.hex -f 0xADA52840 -# cp flash.uf2 /media/kevinh/FTH*BOOT/ +bin/uf2conv.py .pio/build/rak4631/firmware.hex -f 0xADA52840 +cp flash.uf2 /media/kevinh/FTH*BOOT/ diff --git a/docs/software/rak-wizblock.md b/docs/software/rak-wizblock.md index d7a607f8..d400b58f 100644 --- a/docs/software/rak-wizblock.md +++ b/docs/software/rak-wizblock.md @@ -24,9 +24,9 @@ https://docs.rakwireless.com/Product-Categories/Accessories/RAKBox-B2/Overview/# * DONE solder header * DONE attach antenna * get building (LORA disabled) -* FIX LEDs -* FIX BUTTONs -* FIX I2C assignment +* DONE FIX LEDs +* DONE FIX BUTTONs +* DONE FIX I2C assignment * FIX LORA SPI * FIX GPS GPIO assignment * Disable Bluetooth diff --git a/variants/WisCore_RAK4631_Board/variant.h b/variants/WisCore_RAK4631_Board/variant.h index 5f133f86..b8e52e99 100644 --- a/variants/WisCore_RAK4631_Board/variant.h +++ b/variants/WisCore_RAK4631_Board/variant.h @@ -34,8 +34,7 @@ #include "WVariant.h" #ifdef __cplusplus -extern "C" -{ +extern "C" { #endif // __cplusplus // Number of pins defined in PinDescription array @@ -76,14 +75,14 @@ extern "C" #define PIN_A6 (0xff) #define PIN_A7 (0xff) - static const uint8_t A0 = PIN_A0; - static const uint8_t A1 = PIN_A1; - static const uint8_t A2 = PIN_A2; - static const uint8_t A3 = PIN_A3; - static const uint8_t A4 = PIN_A4; - static const uint8_t A5 = PIN_A5; - static const uint8_t A6 = PIN_A6; - static const uint8_t A7 = PIN_A7; +static const uint8_t A0 = PIN_A0; +static const uint8_t A1 = PIN_A1; +static const uint8_t A2 = PIN_A2; +static const uint8_t A3 = PIN_A3; +static const uint8_t A4 = PIN_A4; +static const uint8_t A5 = PIN_A5; +static const uint8_t A6 = PIN_A6; +static const uint8_t A7 = PIN_A7; #define ADC_RESOLUTION 14 // Other pins @@ -91,7 +90,7 @@ extern "C" #define PIN_NFC1 (9) #define PIN_NFC2 (10) - static const uint8_t AREF = PIN_AREF; +static const uint8_t AREF = PIN_AREF; /* * Serial interfaces @@ -112,10 +111,10 @@ extern "C" #define PIN_SPI_MOSI (44) #define PIN_SPI_SCK (43) - static const uint8_t SS = 42; - static const uint8_t MOSI = PIN_SPI_MOSI; - static const uint8_t MISO = PIN_SPI_MISO; - static const uint8_t SCK = PIN_SPI_SCK; +static const uint8_t SS = 42; +static const uint8_t MOSI = PIN_SPI_MOSI; +static const uint8_t MISO = PIN_SPI_MISO; +static const uint8_t SCK = PIN_SPI_SCK; /* * Wire Interfaces @@ -137,6 +136,10 @@ extern "C" #define EXTERNAL_FLASH_DEVICES IS25LP080D #define EXTERNAL_FLASH_USE_QSPI +// Meshtastic specific flags +#define USE_SIM_RADIO +#define USE_SEGGER + #ifdef __cplusplus } #endif