adding HardwarePWM support
This commit is contained in:
1 parent
a3afb48e7f
commit
953c55b218
9 files changed
+343
-3
No files matched your search
@@ -22,9 +22,6 @@
|
||||
#include "wiring_digital.h"
|
||||
#include <nrf.h>
|
||||
|
||||
// Must match temp register in bootloader
|
||||
#define BOOTLOADER_VERSION_REGISTER NRF_TIMER2->CC[0]
|
||||
|
||||
const uint32_t g_ADigitalPinMap[] = {
|
||||
// D0 - D7
|
||||
0, // xtal 1
|
||||
@@ -71,7 +68,10 @@ const uint32_t g_ADigitalPinMap[] = {
|
||||
|
||||
};
|
||||
|
||||
// Must match temp register in bootloader
|
||||
#define BOOTLOADER_VERSION_REGISTER NRF_TIMER2->CC[0]
|
||||
uint32_t bootloaderVersion = 0;
|
||||
|
||||
void initVariant()
|
||||
{
|
||||
bootloaderVersion = BOOTLOADER_VERSION_REGISTER;
|
||||
|
||||
@@ -122,6 +122,11 @@ static const uint8_t SCK = PIN_SPI_SCK ;
|
||||
*/
|
||||
extern uint32_t bootloaderVersion;
|
||||
|
||||
static inline bool isPinValid(uint32_t pin)
|
||||
{
|
||||
return (pin < PINS_COUNT) && (pin != PIN_SERIAL_RX) && (pin != PIN_SERIAL_TX);
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in new issue
Block a user