cc3200: Eliminate dependency on stm32's irq.h.

Signed-off-by: Damien George <damien@micropython.org>
pull/13103/head
Damien George 2023-12-01 13:59:12 +11:00
rodzic 49fa3ce65d
commit 7a6489aaa5
4 zmienionych plików z 10 dodań i 5 usunięć

Wyświetl plik

@ -32,8 +32,11 @@
//
// Note on IRQ state: you should not need to know the specific
// value of the state variable, but rather just pass the return
// value from disable_irq back to enable_irq. If you really need
// to know the machine-specific values, see irq.h.
// value from disable_irq back to enable_irq.
// these states correspond to values from query_irq, enable_irq and disable_irq
#define IRQ_STATE_DISABLED (0x00000001)
#define IRQ_STATE_ENABLED (0x00000000)
#ifndef __disable_irq
#define __disable_irq() __asm__ volatile ("cpsid i");
@ -79,6 +82,11 @@ static inline void __set_BASEPRI(uint32_t value) {
__asm volatile ("msr basepri, %0" : : "r" (value) : "memory");
}
__attribute__(( always_inline ))
static inline uint32_t query_irq(void) {
return __get_PRIMASK();
}
__attribute__(( always_inline ))
static inline void enable_irq(mp_uint_t state) {
__set_PRIMASK(state);

Wyświetl plik

@ -49,7 +49,6 @@
#include "telnet.h"
#include "pybuart.h"
#include "utils.h"
#include "irq.h"
#ifdef USE_FREERTOS
#include "FreeRTOS.h"

Wyświetl plik

@ -32,7 +32,6 @@
#include "py/mphal.h"
#include "mptask.h"
#include "task.h"
#include "irq.h"
#if MICROPY_PY_THREAD

Wyświetl plik

@ -37,7 +37,6 @@
#include "debug.h"
#include "serverstask.h"
#include "genhdr/mpversion.h"
#include "irq.h"
/******************************************************************************
DEFINE PRIVATE CONSTANTS