Create nvic's register map
This commit is contained in:
parent
8ff2cabeab
commit
691b360eb1
39
drivers/nvic_regs.h
Normal file
39
drivers/nvic_regs.h
Normal file
@ -0,0 +1,39 @@
|
||||
/** @file nvic_regs.h
|
||||
* Module defining the Nested Vector Interrupt Controller (NVIC) registers.
|
||||
*
|
||||
* Mainly made to be used by the nvic module. It is recommanded to go through
|
||||
* the functions provided by that module instead of directly using the registers
|
||||
* defined here.
|
||||
*/
|
||||
|
||||
#ifndef _NVIC_REGS_H_
|
||||
#define _NVIC_REGS_H_
|
||||
|
||||
//--includes--------------------------------------------------------------------
|
||||
|
||||
#include "stdint.h"
|
||||
|
||||
|
||||
//--type definitions------------------------------------------------------------
|
||||
|
||||
#define NVIC1_BASE_ADDRESS 0xE000E100
|
||||
#define NVIC2_BASE_ADDRESS 0xE000EF00
|
||||
|
||||
struct __attribute__((packed)) NVIC1 {
|
||||
uint32_t ISERX[3];
|
||||
uint32_t ICERX[3];
|
||||
uint32_t ISPRX[3];
|
||||
uint32_t ICPRX[3];
|
||||
uint32_t IABRX[3];
|
||||
uint32_t IPRX[20];
|
||||
};
|
||||
|
||||
struct __attribute__((packed)) NVIC2 {
|
||||
uint32_t INTID;
|
||||
};
|
||||
|
||||
|
||||
//--functions-------------------------------------------------------------------
|
||||
|
||||
#endif //_NVIC_REGS_H_
|
||||
|
||||
Loading…
Reference in New Issue
Block a user