📄 cust_os.h
字号:
#ifndef CUST_OS_H__ // {
#define CUST_OS_H__
#include <ceddk.h>
//------------------------------------------------------------------------------
//
// OS Customizing
//
// This example OS customization does not apply to an actual OS, it
// is for illustration only.
//
//------------------------------------------------------------------------------
extern void SetInterruptControl(int intrNum, int flag);
#define SPI_INTR_NUM 22
//------------------------------------------------------------------------------
//
// OS_ERROR - this optional function is the channel to send SPI driver
// errors to the HAL or the application.
//
// OS_WAIT_US - required - wait the specified number of microseconds.
// This function is called from within ISRs, so it can't block.
//
// OS_SPI_INTR_ON()
// OS_SPI_INTR_OFF()
// Enable and disable the SPI interrupt because the device
// driver is manipulating the device structure.
//
//------------------------------------------------------------------------------
#define OS_ERROR(error) SetLastError(error)
extern "C" void OSTWaitUS(DWORD microseconds); // Speculative
// extern "C" void StallExecution(UINT microseconds); // ceddk.h
// #define OS_WAIT_US(n) OSTWaitUS(n)
// #define OS_WAIT_US(n) StallExecution(n)
#define OS_WAIT_US(n) msWait(n)
#define OS_SPI_INTR_ON() // SetInterruptControl(SPI_INTR_NUM, 1)
#define OS_SPI_INTR_OFF() // SetInterruptControl(SPI_INTR_NUM, 0)
#endif // CUST_OS_H__ // }
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -