 by ebrand » Tue Mar 16, 2010 6:17 am
                by ebrand » Tue Mar 16, 2010 6:17 am
            
            
                     by ebrand
                by ebrand
Tue Mar 16, 2010 6:17 am
            
            
            Sorry to post again, but after more research I am able to post a more specific question. The C code that is the problem is as follows:
- Code: Select all
-     if(F_PF == PF1_HUNO){
 switch(BtnCode){
 case BTN_A:
 SendToSoundIC(7);
 gpT_Table    = HUNOBASIC_GETUPFRONT_Torque;
 ....
 break;
gpT_Table is defined as follows:
- Code: Select all
- BYTE flash    *gpT_Table;
HUNOBASIC_GETUPFRONT_Torque is defined as follows:
- Code: Select all
- unsigned char flash HUNOBASIC_GETUPFRONT_Torque[9][16]={
 /* ID
 0,  1,  2,  3,  4,  5,  6,  7,  8,  9, 10, 11, 12, 13, 14, 15 */
 {   4,  4,  4,  4,  4,  4,  4,  4,  4,  4,  4,  4,  4,  4,  4,  4 },   // Idx:0 - Data_0
 {   1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  4,  4,  4,  4,  4,  4 },   // Idx:1 - Data_1
 {   4,  4,  4,  4,  4,  4,  4,  4,  4,  4,  4,  4,  4,  4,  4,  4 },   // Idx:2 - Data_2
 {   1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1 },   // Idx:3 - Data_3
 {   1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1 },   // Idx:4 - Data_4
 {   2,  2,  2,  2,  2,  2,  2,  2,  2,  2,  2,  2,  2,  2,  2,  2 },   // Idx:5 - Data_5
 {   2,  2,  2,  2,  2,  2,  2,  2,  2,  2,  2,  2,  2,  2,  2,  2 },   // Idx:6 - Data
 {   2,  2,  2,  2,  2,  2,  2,  2,  2,  2,  2,  2,  2,  2,  2,  2 },   // Idx:7 - Data_6
 {   4,  4,  4,  4,  4,  4,  4,  4,  4,  4,  4,  4,  4,  4,  4,  4 }    // Idx:8 - Data_7
 };
I am getting the following error:
Error: C:\Users\emily\Documents\Robotics\C_Tutorial_Source-1\Project\maze\maze.c(2393): a value of type 'flash unsigned char [9][16]' can't be assigned to an entity of type 'flash unsigned char *'
So it seems the code is trying to make a char * = to an array. Is there some way I can make the code actually make sense?
Thanks!
Sorry to post again, but after more research I am able to post a more specific question. The C code that is the problem is as follows:
- Code: Select all
-     if(F_PF == PF1_HUNO){
 switch(BtnCode){
 case BTN_A:
 SendToSoundIC(7);
 gpT_Table    = HUNOBASIC_GETUPFRONT_Torque;
 ....
 break;
gpT_Table is defined as follows:
- Code: Select all
- BYTE flash    *gpT_Table;
HUNOBASIC_GETUPFRONT_Torque is defined as follows:
- Code: Select all
- unsigned char flash HUNOBASIC_GETUPFRONT_Torque[9][16]={
 /* ID
 0,  1,  2,  3,  4,  5,  6,  7,  8,  9, 10, 11, 12, 13, 14, 15 */
 {   4,  4,  4,  4,  4,  4,  4,  4,  4,  4,  4,  4,  4,  4,  4,  4 },   // Idx:0 - Data_0
 {   1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  4,  4,  4,  4,  4,  4 },   // Idx:1 - Data_1
 {   4,  4,  4,  4,  4,  4,  4,  4,  4,  4,  4,  4,  4,  4,  4,  4 },   // Idx:2 - Data_2
 {   1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1 },   // Idx:3 - Data_3
 {   1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1 },   // Idx:4 - Data_4
 {   2,  2,  2,  2,  2,  2,  2,  2,  2,  2,  2,  2,  2,  2,  2,  2 },   // Idx:5 - Data_5
 {   2,  2,  2,  2,  2,  2,  2,  2,  2,  2,  2,  2,  2,  2,  2,  2 },   // Idx:6 - Data
 {   2,  2,  2,  2,  2,  2,  2,  2,  2,  2,  2,  2,  2,  2,  2,  2 },   // Idx:7 - Data_6
 {   4,  4,  4,  4,  4,  4,  4,  4,  4,  4,  4,  4,  4,  4,  4,  4 }    // Idx:8 - Data_7
 };
I am getting the following error:
Error: C:\Users\emily\Documents\Robotics\C_Tutorial_Source-1\Project\maze\maze.c(2393): a value of type 'flash unsigned char [9][16]' can't be assigned to an entity of type 'flash unsigned char *'
So it seems the code is trying to make a char * = to an array. Is there some way I can make the code actually make sense?
Thanks!