MNRS-BM-BSP/include/ehrenberg/devices/interrupt.h

17 lines
287 B
C

#ifndef _BSP_INTERRUPT_H
#define _BSP_INTERRUPT_H
#include <stdint.h>
typedef struct __attribute((__packed__)) {
volatile uint32_t ip;
volatile uint32_t ie;
} irq_t;
inline void irq_init(irq_t* reg){
reg->ie = 0;
reg->ip = 0xFFFFFFFF;
}
#endif /* _BSP_INTERRUPT_H */