cancel
Showing results for 
Search instead for 
Did you mean: 

Smart Bluetooth

Anonymous
Not applicable

I'm using Wiced-Smart SDK2.0.1.

For make some functions operate without interrupt, I'd like to control interrupt like cli/sei.

Does anybody know this?

Thank you.

1 Solution
ArvindS_76
Employee

See <SDK>/Wiced-Smart/bleapp/utils/bleapputils.h:

/// Disables interrupts and preemption. Use with caution; never lock out interrupts for more than ~100uS.

/// \return Returns an opaque current posture that is to be used when restoring interrupts.

UINT32 bleapputil_cpuIntDisable(void);

/// Enables/restores interrupt and preemption state.

/// \param _newPosture The value returned by bleapputil_cpuIntDisable previously.

void bleapputil_cpuIntEnable(UINT32 _newPosture);

To use:

UINT32 posture = bleapputil_cpuIntDisable();

// Interrupts and preemption are disabled now. Do something very quickly.

// Locking out interrupts for more than ~100uS may adversely affect the system.

// When done, unlock the state.

bleapputil_cpuIntEnable(posture);

View solution in original post

1 Reply
ArvindS_76
Employee

See <SDK>/Wiced-Smart/bleapp/utils/bleapputils.h:

/// Disables interrupts and preemption. Use with caution; never lock out interrupts for more than ~100uS.

/// \return Returns an opaque current posture that is to be used when restoring interrupts.

UINT32 bleapputil_cpuIntDisable(void);

/// Enables/restores interrupt and preemption state.

/// \param _newPosture The value returned by bleapputil_cpuIntDisable previously.

void bleapputil_cpuIntEnable(UINT32 _newPosture);

To use:

UINT32 posture = bleapputil_cpuIntDisable();

// Interrupts and preemption are disabled now. Do something very quickly.

// Locking out interrupts for more than ~100uS may adversely affect the system.

// When done, unlock the state.

bleapputil_cpuIntEnable(posture);

View solution in original post