forked from Elron_dev/elbear_arduino_bsp
Обновление до версии 0.3.0
- обновлен elbear_fw_bootloader - добавлена проверка контрольной суммы каждой строки hex файла. - в модуль работы с АЦП добавлена функция analogReadResolution(). Функция analogRead() теперь возвращает усредненное по 10 измерениям значение. - общая функция обработки прерываний перенесена в память RAM. Обработчики прерываний модулей External Interrupts и Advanced I/O (функция tone()) так же перенесены в память RAM для увеличения скорости выполнения кода. - в пакет добавлены библиотеки EEPROM, Servo, SoftSerial, NeoPixel, MFRC522 адаптированные для работы с платой Elbear Ace-Uno. - добавлено описание особенностей работы с пакетом
This commit is contained in:
1 parent
2044614aba
commit
7261b03ea1
114 files changed
+11064
-666
No files matched your search
@@ -5,7 +5,7 @@
|
||||
#include "HardwareSerial.h"
|
||||
#include <uart_lib.h>
|
||||
#include "mik32_hal_irq.h"
|
||||
|
||||
#include "wiring_LL.h"
|
||||
|
||||
// HardwareSerial class objects for use in Arduino IDE
|
||||
HardwareSerial Serial(0);
|
||||
@@ -127,9 +127,9 @@ void HardwareSerial::rx_complete_irq(void)
|
||||
unsigned char c;
|
||||
// while there is something to receive, put the data into the buffer
|
||||
// and edit the buffer index
|
||||
while (!UART_IsRxFifoEmpty(uart))
|
||||
while(!UART_IS_RX_FIFO_EMPTY(uart))
|
||||
{
|
||||
c = UART_ReadByte(uart);
|
||||
c = UART_READ_BYTE(uart);
|
||||
if (i != _rx_buffer_tail)
|
||||
{
|
||||
// write if there is space in the buffer
|
||||
@@ -140,7 +140,7 @@ void HardwareSerial::rx_complete_irq(void)
|
||||
}
|
||||
|
||||
// wrapper for use in С-files
|
||||
extern "C" void serial_handler_wrapper(uint8_t uartNumInt)
|
||||
extern "C" void __attribute__((optimize("O3"))) serial_interrupt_handler(uint8_t uartNumInt)
|
||||
{
|
||||
if (uartNumInt == 0)
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user