Added support for unofficial Raspberry Pi Pico core (#643)
This commit is contained in:
parent
f66a31c4f4
commit
947ff48df6
2 changed files with 42 additions and 2 deletions
5
.github/workflows/main.yml
vendored
5
.github/workflows/main.yml
vendored
|
@ -31,6 +31,7 @@ jobs:
|
|||
- stm32duino:STM32F1:mapleMini
|
||||
- MegaCoreX:megaavr:4809
|
||||
- arduino:mbed_rp2040:pico
|
||||
- rp2040:rp2040:rpipico
|
||||
- CubeCell:CubeCell:CubeCell-Board
|
||||
- MegaCore:avr:1281
|
||||
- teensy:avr:teensy41
|
||||
|
@ -124,6 +125,10 @@ jobs:
|
|||
# CubeCell
|
||||
echo "::set-output name=index-url::--additional-urls https://resource.heltec.cn/download/package_CubeCell_index.json"
|
||||
|
||||
elif [[ "${{ contains(matrix.board, 'rp2040:rp2040') }}" == "true" ]]; then
|
||||
# CubeCell
|
||||
echo "::set-output name=index-url::--additional-urls https://github.com/earlephilhower/arduino-pico/releases/download/global/package_rp2040_index.json"
|
||||
|
||||
elif [[ "${{ contains(matrix.board, 'MegaCore:avr') }}" == "true" ]]; then
|
||||
# MegaCore
|
||||
echo "::set-output name=index-url::--additional-urls https://mcudude.github.io/MegaCore/package_MCUdude_MegaCore_index.json"
|
||||
|
|
|
@ -644,8 +644,8 @@
|
|||
#define RADIOLIB_CB_ARGS_SPI_END_TRANSACTION (void, SPIendTransaction, void)
|
||||
#define RADIOLIB_CB_ARGS_SPI_END (void, SPIend, void)
|
||||
|
||||
#elif defined(ARDUINO_ARCH_RP2040)
|
||||
// Raspberry Pi Pico
|
||||
#elif defined(ARDUINO_ARCH_MBED_RP2040)
|
||||
// Raspberry Pi Pico (official mbed core)
|
||||
#define RADIOLIB_PLATFORM "Raspberry Pi Pico"
|
||||
#define RADIOLIB_PIN_TYPE pin_size_t
|
||||
#define RADIOLIB_PIN_MODE PinMode
|
||||
|
@ -683,6 +683,41 @@
|
|||
#define RADIOLIB_CB_ARGS_SPI_END_TRANSACTION (void, SPIendTransaction, void)
|
||||
#define RADIOLIB_CB_ARGS_SPI_END (void, SPIend, void)
|
||||
|
||||
#elif defined(ARDUINO_ARCH_RP2040)
|
||||
// Raspberry Pi Pico (unofficial core)
|
||||
#define RADIOLIB_PLATFORM "Raspberry Pi Pico (unofficial)"
|
||||
#define RADIOLIB_PIN_TYPE pin_size_t
|
||||
#define RADIOLIB_PIN_MODE PinMode
|
||||
#define RADIOLIB_PIN_STATUS PinStatus
|
||||
#define RADIOLIB_INTERRUPT_STATUS RADIOLIB_PIN_STATUS
|
||||
#define RADIOLIB_DIGITAL_PIN_TO_INTERRUPT(p) digitalPinToInterrupt(p)
|
||||
#define RADIOLIB_NC (0xFF)
|
||||
#define RADIOLIB_DEFAULT_SPI SPI
|
||||
#define RADIOLIB_DEFAULT_SPI_SETTINGS SPISettings(2000000, MSBFIRST, SPI_MODE0)
|
||||
#define RADIOLIB_NONVOLATILE PROGMEM
|
||||
#define RADIOLIB_NONVOLATILE_READ_BYTE(addr) pgm_read_byte(addr)
|
||||
#define RADIOLIB_TYPE_ALIAS(type, alias) using alias = type;
|
||||
|
||||
// Arduino API callbacks
|
||||
#define RADIOLIB_CB_ARGS_PIN_MODE (void, pinMode, pin_size_t pin, PinMode mode)
|
||||
#define RADIOLIB_CB_ARGS_DIGITAL_WRITE (void, digitalWrite, pin_size_t pin, PinStatus val)
|
||||
#define RADIOLIB_CB_ARGS_DIGITAL_READ (PinStatus, digitalRead, pin_size_t pin)
|
||||
#define RADIOLIB_CB_ARGS_TONE (void, tone, uint8_t pin, unsigned int frequency, unsigned long duration)
|
||||
#define RADIOLIB_CB_ARGS_NO_TONE (void, noTone, uint8_t pin)
|
||||
#define RADIOLIB_CB_ARGS_ATTACH_INTERRUPT (void, attachInterrupt, pin_size_t interruptNum, voidFuncPtr func, PinStatus mode)
|
||||
#define RADIOLIB_CB_ARGS_DETACH_INTERRUPT (void, detachInterrupt, pin_size_t interruptNum)
|
||||
#define RADIOLIB_CB_ARGS_YIELD (void, yield, void)
|
||||
#define RADIOLIB_CB_ARGS_DELAY (void, delay, unsigned long ms)
|
||||
#define RADIOLIB_CB_ARGS_DELAY_MICROSECONDS (void, delayMicroseconds, unsigned int us)
|
||||
#define RADIOLIB_CB_ARGS_MILLIS (unsigned long, millis, void)
|
||||
#define RADIOLIB_CB_ARGS_MICROS (unsigned long, micros, void)
|
||||
#define RADIOLIB_CB_ARGS_PULSE_IN (unsigned long, pulseIn, pin_size_t pin, uint8_t state, unsigned long timeout)
|
||||
#define RADIOLIB_CB_ARGS_SPI_BEGIN (void, SPIbegin, void)
|
||||
#define RADIOLIB_CB_ARGS_SPI_BEGIN_TRANSACTION (void, SPIbeginTransaction, void)
|
||||
#define RADIOLIB_CB_ARGS_SPI_TRANSFER (uint8_t, SPItransfer, uint8_t b)
|
||||
#define RADIOLIB_CB_ARGS_SPI_END_TRANSACTION (void, SPIendTransaction, void)
|
||||
#define RADIOLIB_CB_ARGS_SPI_END (void, SPIend, void)
|
||||
|
||||
#elif defined(__ASR6501__) || defined(ARDUINO_ARCH_ASR650X) || defined(DARDUINO_ARCH_ASR6601)
|
||||
// CubeCell
|
||||
#define RADIOLIB_PLATFORM "CubeCell"
|
||||
|
|
Loading…
Add table
Reference in a new issue