📄 vsema.c
字号:
/**
*** Copyright (c) 2001 Equator Technologies, Inc.
**/
//---------------------------------------------
//---------------------------------------------
//
// vlxmain()
//
//---------------------------------------------
//---------------------------------------------
#define VLX_NO_GB_STALL_HANDLER
#include <vlxapi/vlxstd.h>
typedef struct sema_struct {
int data;
} type_sema_struct;
typedef struct status_struct {
int data;
} type_status_struct;
type_sema_struct sema;
type_status_struct status;
int main()
{
//---------------------------------------------
// Declarations
//---------------------------------------------
volatile int* pSema;
volatile int* pStatus;
//---------------------------------------------
// Execution
//---------------------------------------------
pSema = &sema.data;
pStatus = &status.data;
*pSema = 0; // clear semaphore
*pStatus = 0xF;
} // end vlxmain()
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -