добавила новые макросы, добавила уровень оптимизации

This commit is contained in:
klassents committed 2024-10-13 15:22:12 +07:00
1 parent a02f1f23af
commit 7c266d6521
2 files changed
+5 -1

No files matched your search

+1 -1
View File
@@ -11,7 +11,7 @@ void __attribute__((weak)) wire_interrupt_handler(void)
} }
// ---------------------------------------------- // // ---------------------------------------------- //
void __attribute__((noinline, section(".ram_text"))) trap_handler(void) void __attribute__((noinline, section(".ram_text"), optimize("O3"))) trap_handler (void)
{ {
// gpio interrupt // gpio interrupt
if (EPIC_CHECK_GPIO_IRQ()) if (EPIC_CHECK_GPIO_IRQ())
+4
View File
@@ -21,6 +21,10 @@
// get ticks from systick // get ticks from systick
#define SYSTICK_GET_TICKS() ((uint64_t)(SCR1_TIMER->MTIMEH)<<32 | SCR1_TIMER->MTIME) #define SYSTICK_GET_TICKS() ((uint64_t)(SCR1_TIMER->MTIMEH)<<32 | SCR1_TIMER->MTIME)
// ----------------- UART ----------------- //
#define UART_READ_BYTE(pUart) ((uint16_t)pUart->RXDATA)
#define UART_IS_RX_FIFO_EMPTY(pUart) ((pUart->FLAGS & UART_FLAGS_RXNE_M) == 0)
// ----------------- TIMER16 ----------------- // // ----------------- TIMER16 ----------------- //
#define TIM16_DISABLE(htim16) (htim16.Instance->CR &= ~TIMER16_CR_ENABLE_M) #define TIM16_DISABLE(htim16) (htim16.Instance->CR &= ~TIMER16_CR_ENABLE_M)
#define TIM16_CLEAR_INT_MASK(htim16, intMask) (htim16.Instance->ICR = intMask) #define TIM16_CLEAR_INT_MASK(htim16, intMask) (htim16.Instance->ICR = intMask)