On Fri, Oct 10, 2008 at 8:29 AM, Grant Brown wrote: > Hi List, > > I have a function that never gets entered even though its called in my > main loop. I know it does not get entered because I have stepped through > the code in the debugger . > > The purpose of the function is to set some bit values in 4 global > variables that are declared in a different file C from my main C file. > > If I try reseting these variables using a different function that does > get entered then there is no issue. > > So in GKB_SPI.c > > unsigned char Bus_Control_GPO_0 = 0xFF; > > void Cancel_All_Ram_ChipSelect_Pin_I2C_SPI_1(void) > { > Bus_Control_GPO_0 = (Bus_Control_GPO_0|0x0F); // 0000 1111 > } > > and in my Main "C" file - USBDtaController.c > > switch (CurCount) > { > case 2 : > Cancel_All_Ram_ChipSelect_Pin_I2C_SPI_1; // decared in > GKB_SPI.c Don't u need a "()" at the end of Cancel_xxxxx? > Set_Ram_ChipSelect_Pin_I2C_SPI_1(&SPI_01_Dta); // decared in > GKB_SPI.c > > > At this point the function does not get entered. > > However if I put a call to > > Cancel_All_Ram_ChipSelect_Pin_I2C_SPI_1 > > inside of > > Set_Ram_ChipSelect_Pin_I2C_SPI_1(&SPI_01_Dta); > > it does get called and the bits get reset. > > So why does the function not get entered ? I know this is a "me" thing > but I can not seem to see what I'm missing > > -- > Kind Regards > Grant Brown > > SiteDoc Pty Ltd > mob: 0412 926 995 > www.sitedoc.com.au > __________________________________________________________________________________________________________ > This email message together with any attachments is intended only for the addressee(s) and contains information that may be confidential and/or copyright. If you are not the intended recipient, please notify the sender by reply email (or telephone SiteDoc Pty Ltd on +61 2 42291185) and immediately delete this email together with any attachments from your computer. If you are the intended recipient, you must not copy, disclose, reproduce or distribute this communication together with any attachments without the authority of SiteDoc Proprietary Limited. No representation is made that this email or any attachments are free of viruses. Virus scanning is recommended and is the responsibility of the recipient. Unless specifically stated by the sender as the views of SiteDoc Proprietary Limited, any views expressed in this message are those of the individual sender, and no responsibility will be borne by SiteDoc Proprietary Limited for its content or outcomes. > > > > -- > http://www.piclist.com PIC/SX FAQ & list archive > View/change your membership options at > http://mailman.mit.edu/mailman/listinfo/piclist > -- Regards, Peter Teoh -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist