forked from Elron_dev/elbear_arduino_bsp
Merged with dev0.1.0
This commit is contained in:
1 parent
fa310cfa0d
commit
687984b356
22 files changed
+71
-84
No files matched your search
@@ -35,11 +35,6 @@
|
||||
|
||||
#include "wiring.h"
|
||||
|
||||
// define из avr-gcc (некоторые библиотеки ардуины им пользуются)
|
||||
#define _BV(bit) (1 << (bit))
|
||||
|
||||
// void ErrorMsgHandler(const char * msg);
|
||||
|
||||
/* sketch */
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
||||
@@ -53,7 +53,6 @@ size_t Print::print(const __FlashStringHelper *ifsh)
|
||||
else break;
|
||||
}
|
||||
return n;
|
||||
// return print(reinterpret_cast<const char *>(ifsh));
|
||||
}
|
||||
|
||||
size_t Print::print(const String &s)
|
||||
|
||||
@@ -425,6 +425,7 @@ HAL_StatusTypeDef HAL_SPI_Exchange(SPI_HandleTypeDef *hspi, uint8_t TransmitByte
|
||||
goto error;
|
||||
}
|
||||
}
|
||||
return error_code;
|
||||
|
||||
error:
|
||||
__HAL_SPI_DISABLE(hspi);
|
||||
@@ -544,6 +545,7 @@ HAL_StatusTypeDef HAL_SPI_ExchangeThreshold(SPI_HandleTypeDef *hspi, uint8_t Tra
|
||||
tx_counter = 0;
|
||||
}
|
||||
}
|
||||
return error_code;
|
||||
|
||||
error:
|
||||
__HAL_SPI_DISABLE(hspi);
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
#include "wiring_private.h"
|
||||
|
||||
#define HIGH 0x1
|
||||
#define LOW 0x0
|
||||
@@ -80,7 +81,8 @@ enum BitOrder
|
||||
#define sq(x) ((x)*(x))
|
||||
|
||||
// Bits and Bytes
|
||||
#define bit(b) (1UL << (b))
|
||||
#define _BV(bit) (1 << (bit)) // from avr-gcc (some arduino libs uses it)
|
||||
#define bit(b) (1UL << (b))
|
||||
#define lowByte(w) ((uint8_t) ((w) & 0xff))
|
||||
#define highByte(w) ((uint8_t) ((w) >> 8))
|
||||
|
||||
|
||||
@@ -10,6 +10,8 @@
|
||||
extern "C"{
|
||||
#endif
|
||||
|
||||
// available interrupts number
|
||||
#define EXTERNAL_NUM_INTERRUPTS 7
|
||||
|
||||
typedef void (*voidFuncPtr)(void);
|
||||
|
||||
|
||||
Reference in new issue
Block a user