- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
Solved! Go to Solution.
- Tags:
- interrupt
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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);