Praveen Kumar(deleted)
|
Re: Regarding the usage of InterruptLock and InterruptUnlock API
|
Praveen Kumar(deleted)
10/27/2015 3:18 AM
post114779
|
Re: Regarding the usage of InterruptLock and InterruptUnlock API
Hi Thomas,
Thank you for your response.
The piece of code where in i am trying this is something like this
#include <sys/neutrino.h> // Inlcude already for many other functions like interruptattach,mmap_device_io
intrspin_t *clrSpnLck ;
if( ThreadCtl( _NTO_TCTL_IO, 0 ) != -1 )
{
//I tried this as per the manual
//memset( clrSpnLck, 1, sizeof( *clrSpnLck ) ); //Code crashed either here if enabled
//clrSpnLck->value = 1; //Tried this just if the variable in the structure intrspin_t was to be initialized
InterruptLock(SetSpnLck_g); //Or code crashed here
regData &= (~(1 << bitPos)); //volatile uint32_t regData and uint8_t bitPos
InterruptUnlock(SetSpnLck_g);
}
Is there anything i am missing
|
|
|