#include <stdbool.h>
|
|
#include "hal.h"
|
|
|
|
typedef struct {
|
|
volatile uint32_t state;
|
|
} My_Mem;
|
|
|
|
#define MY_MEM ((My_Mem*)(0xF0030000))
|
|
|
|
int main(void)
|
|
{
|
|
printf("HELLO WORLD\n");
|
|
|
|
uint32_t state = 10000;
|
|
uint32_t state_return;
|
|
|
|
while (1)
|
|
{
|
|
printf("State in : %i\n", state);
|
|
|
|
MY_MEM->state = state;
|
|
state_return = MY_MEM->state;
|
|
|
|
state = state + 1;
|
|
|
|
printf("State out: %i\n", state_return);
|
|
}
|
|
return 0;
|
|
}
|