AnsweredAssumed Answered

GPIO problem

Question asked by Ion Popescu on Mar 21, 2011
Latest reply on Mar 22, 2011 by Ion Popescu

Hello,

 

I am trying to write a character to a specific IO pin but no success . So, I have the following pieces of code (I mention that I have modified the BSP lib in order to have access to this specific pins) :

 

 

const uint_32 output_set[] = {    TX_PIN,     TX_ENABLE,       GPIO_LIST_END         };output = fopen("gpio:write", (char_ptr) &output_set);if (output){  SetOutput();}else      printf("Error\n");.......

 

 

the SetOutput function : 

 

 

void SetOutput(void){   static const uint_32 TxPin[] = {  TX_PIN,  GPIO_LIST_END      };       static const uint_32 TxEnable[] = {  TX_ENABLE,  GPIO_LIST_END     };         ioctl(output, 1, (pointer) &TxPin);    ioctl(output, 1, (pointer) &TxEnable);}

 

Debugging the program , I've seen that it is a problem with fopen function (I think). As you can see in the printscreen attached : it reaches that breakpoint and never steps out.

 

Can anyone have an idea ? What I am doing wrong.. ?

 

Thanks

 

Outcomes