#include "stdio.h" #define DISPLAY_WRITE (*((volatile unsigned int *)0xc0000000)) #define DISPLAY_READ (*((volatile unsigned int *)0x40000C00)) #ifdef __cplusplus extern "C" #else extern #endif void InterruptHandle(unsigned); /* ---------------------------------------------------------------------- Users code This just sends a small number of integers to the function block. ---------------------------------------------------------------------- */ int iFlag = 0; #ifdef __cplusplus extern "C" #else extern #endif __irq void p_nIRQ_ISR() { iFlag = 1; int data = DISPLAY_READ; float data2 = data/10.0; printf("software Recv %f\n",data2); } #ifdef __cplusplus extern "C" #else extern #endif __irq void p_nFIQ_ISR() { } int main(void) { //InterruptEnable; InterruptHandle(0xFFFFFF3F); DISPLAY_WRITE = 100; for(float i=0;i<1;i+=0.1) { if(iFlag==1) { iFlag = 0; //multiply 10 to make the number integer int data = i*10; DISPLAY_WRITE = data; } } while(1); return 0; }