1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-12-22 14:28:07 +00:00

refactor(core/embed): remove unnecessary pendsv exception handling

[no changelog]
This commit is contained in:
cepetr 2024-06-20 12:43:04 +02:00 committed by cepetr
parent a59ded586e
commit 20814f7ae6
5 changed files with 2 additions and 11 deletions

View File

@ -295,7 +295,6 @@ SOURCE_MICROPYTHON = [
'vendor/micropython/shared/runtime/stdout_helpers.c', 'vendor/micropython/shared/runtime/stdout_helpers.c',
'vendor/micropython/shared/timeutils/timeutils.c', 'vendor/micropython/shared/timeutils/timeutils.c',
'vendor/micropython/ports/stm32/gccollect.c', 'vendor/micropython/ports/stm32/gccollect.c',
'vendor/micropython/ports/stm32/pendsv.c',
'vendor/micropython/py/argcheck.c', 'vendor/micropython/py/argcheck.c',
'vendor/micropython/py/asmarm.c', 'vendor/micropython/py/asmarm.c',
'vendor/micropython/py/asmbase.c', 'vendor/micropython/py/asmbase.c',

View File

@ -17,8 +17,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
void pendsv_kbd_intr(void);
/// package: trezorio.__init__ /// package: trezorio.__init__
/// class VCP: /// class VCP:
@ -93,7 +91,7 @@ STATIC mp_obj_t mod_trezorio_VCP_make_new(const mp_obj_type_t *type,
o->info.rx_buffer = m_new(uint8_t, vcp_buffer_len); o->info.rx_buffer = m_new(uint8_t, vcp_buffer_len);
o->info.tx_buffer_len = vcp_buffer_len; o->info.tx_buffer_len = vcp_buffer_len;
o->info.rx_buffer_len = vcp_buffer_len; o->info.rx_buffer_len = vcp_buffer_len;
o->info.rx_intr_fn = pendsv_kbd_intr; o->info.rx_intr_fn = NULL;
o->info.rx_intr_byte = 3; // Ctrl-C o->info.rx_intr_byte = 3; // Ctrl-C
o->info.iface_num = (uint8_t)(iface_num); o->info.iface_num = (uint8_t)(iface_num);
o->info.data_iface_num = (uint8_t)(data_iface_num); o->info.data_iface_num = (uint8_t)(data_iface_num);

View File

@ -187,7 +187,6 @@ int main(void) {
#endif #endif
// Init peripherals // Init peripherals
pendsv_init();
fault_handlers_init(); fault_handlers_init();

View File

@ -155,10 +155,7 @@ static inline void restore_irq_pri(uint32_t state) {
#define IRQ_PRI_EXTINT NVIC_EncodePriority(NVIC_PRIORITYGROUP_4, 14, 0) #define IRQ_PRI_EXTINT NVIC_EncodePriority(NVIC_PRIORITYGROUP_4, 14, 0)
// PENDSV should be at the lowst priority so that other interrupts complete //?#define IRQ_PRI_RTC_WKUP NVIC_EncodePriority(NVIC_PRIORITYGROUP_4, 15, 0)
// before exception is raised.
#define IRQ_PRI_PENDSV NVIC_EncodePriority(NVIC_PRIORITYGROUP_4, 15, 0)
#define IRQ_PRI_RTC_WKUP NVIC_EncodePriority(NVIC_PRIORITYGROUP_4, 15, 0)
// !@# TAMPER interrupt priority should be probably much higher // !@# TAMPER interrupt priority should be probably much higher
#define IRQ_PRI_TAMP NVIC_EncodePriority(NVIC_PRIORITYGROUP_4, 15, 0) #define IRQ_PRI_TAMP NVIC_EncodePriority(NVIC_PRIORITYGROUP_4, 15, 0)

View File

@ -280,8 +280,6 @@ int usb_webusb_write_blocking(uint8_t iface_num, const uint8_t *buf,
return usb_webusb_write(iface_num, buf, len); return usb_webusb_write(iface_num, buf, len);
} }
void pendsv_kbd_intr(void) {}
void mp_hal_set_vcp_iface(int iface_num) {} void mp_hal_set_vcp_iface(int iface_num) {}
secbool usb_configured(void) { secbool usb_configured(void) {