для функций обработчиков изменен уровень оптимизации

This commit is contained in:
klassents committed 2024-10-13 11:46:40 +07:00
1 parent f8052ae19d
commit 9efc6c5adf
2 files changed
+2 -2

No files matched your search

+1 -1
View File
@@ -309,7 +309,7 @@ void TwoWire::onRequest( void (*function)(void) )
} }
// С function for trap handler // С function for trap handler
extern "C" void wire_interrupt_handler(void) extern "C" void __attribute__((optimize("O3"))) wire_interrupt_handler(void)
{ {
twi_interruptHandler(); twi_interruptHandler();
} }
+1 -1
View File
@@ -323,7 +323,7 @@ void twi_attachSlaveTxEvent( void (*function)(void) )
* Input none * Input none
* Output none * Output none
*/ */
void twi_interruptHandler(void) void __attribute__((optimize("O3"))) twi_interruptHandler(void)
{ {
uint32_t int_mask = HAL_I2C_Get_CR1_Content(&hi2c) & I2C_INTMASK; // interrupts allowed uint32_t int_mask = HAL_I2C_Get_CR1_Content(&hi2c) & I2C_INTMASK; // interrupts allowed
uint32_t interrupt_status = HAL_I2C_Get_Interrupts_Status(&hi2c); // current flags uint32_t interrupt_status = HAL_I2C_Get_Interrupts_Status(&hi2c); // current flags