Обновление до версии 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:
klassents authored and KLASSENTS committed 2025-02-04 14:24:50 +07:00
1 parent 2044614aba
commit 7261b03ea1
114 files changed
+11064 -666

No files matched your search

+11 -3
View File
@@ -1,11 +1,15 @@
#include "board.h"
#include "mik32_hal_pcc.h"
#include "mik32_hal_irq.h"
#include "Arduino.h"
// --------------------- init --------------------- //
// called before setup()
void pre_init(void)
{
// set irq vector to ram region
write_csr(mtvec, 0x02000000);
HAL_Init();
// gpio clock
@@ -26,11 +30,15 @@ void post_init(void)
}
// --------------------- other --------------------- //
// print text if Serial is enabled
volatile bool use_error_messages = true;
// print error message to Serial
extern "C" void ErrorMsgHandler(const char * msg)
{
if(Serial)
Serial.println(msg);
// function works if Serial is used in sketch and user doesn't turn it off
#ifdef HardwareSerial_h
if(use_error_messages&&Serial)
Serial.println(msg);
#endif
}