I've no idea why your compiler crashes...
but I can see several reasons your code won't compile.
This is just on a quick scan.
- You declare I2C_write as returning unsigned char...it should be void.
- You declare:
void AS1130config(unsigned char ram, unsigned char command, unsigned char data)
then call AS1130_config(i, 2*j+1, Frames_Data[data]); twice!! (what do you think is wrong with that?)
3)Will your compiler allow inline declarations? ie
for (int i=0x01;i<=0x24; i++)
or do you have to declare them first?
int i,j,k;
whichever it is you have done both in the same function and you can't declare i as an integer AND an unsigned char in the same bit of code.
4) You've declared Frames_Data[0x360] and then try to step through it using an int. Does your compiler treat int as signed/unsigned or 8 or 16 bit?
-
Will your compiler allow you to define AS1130CONFIG as a constant and then declare AS1130config as a function name?
-
ALL your initial declarations are wrong...they should be #defines NOT variables.