⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 rk27.c

📁 瑞星微公司RK27XX系列芯片的SDK开发包
💻 C
📖 第 1 页 / 共 3 页
字号:
HTIMER  RKRockStartTimerEx(INT32U delayTicks ,
                           void (*callBack)(void *), void *arg , PROCHANDLE         callHandle)
{
    return RockStartTimerEx(delayTicks , callBack, arg , callHandle) ;
}


/*----------------------------------------------------------------------
Name  :  RKRockStopTimer
Desc  :  停止定时器
Params:  定时器ID
Return:  无
Author:  System Author
Date  :  070830
----------------------------------------------------------------------*/
void* RKRockStopTimer(HTIMER timer)
{
    return RockStopTimer(timer);
}

/*----------------------------------------------------------------------
Name  :  RkosDelayMs
Desc  :  OS延时
Params:  延时时长,
Return:  无
Author:  System Author
Date  :  070830
----------------------------------------------------------------------*/
void RkosDelayMs(UINT16 ms)
{
#ifndef __arm
// OSTimeDly(1+ms/5);
#endif
}



/*----------------------------------------------------------------------
Name  :  RKSemObtain
Desc  :  申请信号量
Params:  信号量
Return:  无
Author:  System Author
Date  :  070830
----------------------------------------------------------------------*/
void RKSemObtain(ROCK_SEM_DATA *pSem)
{
    RockSemObtain(pSem);
}

/*----------------------------------------------------------------------
Name  :  RkSemRelease
Desc  :  释放信号量
Params:  信号量
Return:  处理结果
Author:  System Author
Date  :  070830
----------------------------------------------------------------------*/
void RkSemRelease(ROCK_SEM_DATA *pSem)
{
    RockSemRelease(pSem);
}



/*----------------------------------------------------------------------
Name  :  RKOSSendMsg
Desc  :  发送OS消息
Params:  目标邮箱,消息ID,消息体指针
Return:  处理结果
Author:  System Author
Date  :  070830
----------------------------------------------------------------------*/
INT32U RKOSSendMsg(ROCK_MSG_BOX* msgBox , ROCK_MSG_ID id , void *msg)
{

    return RockOSSendMsg(msgBox, id,  msg);
}

/*----------------------------------------------------------------------
Name  :  RKIntr_RegISR
Desc  :  注册中断
Params:  中断号,回调函数(ISR)
Return:  处理结果
Author:  System Author
Date  :  070830
----------------------------------------------------------------------*/
InterruptHandler RKIntr_RegISR(int irq, InterruptHandler routine)
{
    return Intr_RegISR(irq, routine);
}


/*----------------------------------------------------------------------
Name  :  RKRegisterAddKey
Desc  :  向注册表添加一个键
Params:  添加的键名,键值长度
Return:  处理结果
Author:  System Author
Date  :  070830
----------------------------------------------------------------------*/
RKEY  RKRegisterAddKey(char* Key ,  INT32U dataSize)
{
    return NULL;//RegisterAddKey(  Key ,  dataSize );
}

#if 0
/*----------------------------------------------------------------------
Name  :  RKRegisterDelKey
Desc  :  删除注册表一个键
Params:
Return:  处理结果
Author:  System Author
Date  :  070830
----------------------------------------------------------------------*/
BOOLEAN  RKRegisterDelKey(char* Key)
{
    return RegisterDelKey(Key);
}

/*----------------------------------------------------------------------
Name  :  RKRegisterGetKeyValueEx
Desc  :  获取注册表一个键对应的值
Params:  Key 键名,valueSize键值长度
Return:  键值
Author:  System Author
Date  :  070830
----------------------------------------------------------------------*/
const void    * RKRegisterGetKeyValueEx(char* Key  ,  INT32U *valueSize)
{
    return NULL;//RegisterGetKeyValueEx( Key  ,  valueSize );
}

/*----------------------------------------------------------------------
Name  :  RKRegisterSetKeyValue
Desc  :  设置注册表一个键的值
Params:
Return:  处理结果
Author:  System Author
Date  :  070830
----------------------------------------------------------------------*/
BOOLEAN  RKRegisterSetKeyValue(char* Key ,  void * kValue)
{
    return RegisterSetKeyValue(Key ,  kValue);
}
#endif

/*----------------------------------------------------------------------
Name  :  RKProcGetCurrentProc
Desc  :  获取当前的应用proc handle
Params:
Return:  处理结果
Author:  System Author
Date  :  070830
----------------------------------------------------------------------*/
PROCHANDLE RKProcGetCurrentProc(void)
{
#if defined(DLL)
    return ProcGetCurrentProc();
#else
    return INVALID_PHANDLE;
#endif
}


/*----------------------------------------------------------------------
Name  :  RKProcGetProcGuid
Desc  :  通过GUID获取应用的proc handle
Params:
Return:  处理结果
Author:  System Author
Date  :  070830
----------------------------------------------------------------------*/
PROCHANDLE RKProcGetProcGuid(RK_GUID guid)
{
    return ProcGetProcGuid(guid);
}
/*----------------------------------------------------------------------
Name  :  RockAppCreateThread
Desc  :  在某个应用上创建线程
Params:  ProcHandle :线程属于这个应用程序
   thread:  要创建的线程,是一个具有TaskMsgHandle类型的函数
   TaskPrio: 该线程所属任务的优先级,
      有四种: TPRI_HIGH,TPRI_NORMAL,TPRI_LOW,TPRI_MHIGH
Return:  线程句柄
Date  :  070830
----------------------------------------------------------------------*/
THANDLE RKCreateThread(PROCHANDLE ProcHandle  ,  TaskMsgHandle taskHandle , INT16U tPriority)
{
    return RockCreateThread(ProcHandle  ,  taskHandle , tPriority);
}


/*----------------------------------------------------------------------
Name  :  RKProcGetTopProc
Desc  :  获取顶层proc handle
Params:
Return:  处理结果
Author:  System Author
Date  :  070830
----------------------------------------------------------------------*/
PROCHANDLE    RKProcGetTopProc(void)
{
    return ProcGetTopProc();
}

#if 0
/*----------------------------------------------------------------------
Name  :  RKResApiReadProcResource
Desc  :  读取proc 资源
Params:
Return:  处理结果
Author:  System Author
Date  :  070830
----------------------------------------------------------------------*/
INT32U  RKResApiGetProcNameDataOffset(PROCHANDLE proc ,  INT32U  offSet , void *Buffer  , INT32U size)
{

    return ResApiGetProcNameDataOffset(proc ,   offSet , Buffer  , size);
}


#endif
/*----------------------------------------------------------------------
Name  :  RKFSFileOpen
Desc  :  打开文件
Params:  文件路径名,打开模式
Return:  打开的文件句柄
Author:  System Author
Date  :  070830
----------------------------------------------------------------------*/
MY_FILE    *RKFSFileOpen(const char *filename, const char *mode)
{
    return FSFileOpen(filename, mode);
}



/*----------------------------------------------------------------------
Name  :  RKFSFileOpenR
Desc  :  以读方式打开文件
Params:  文件路径名,
Return:  打开的文件句柄
Author:  System Author
Date  :  070830
----------------------------------------------------------------------*/
MY_FILE    *RKFSFileOpenR(const char *filename)
{
    return FSFileOpen(filename, "rb");
}

/*----------------------------------------------------------------------
Name  :  RKFSFileOpen
Desc  :  以写方式打开文件
Params:  文件路径名
Return:  打开的文件句柄
Author:  System Author
Date  :  070830
----------------------------------------------------------------------*/
MY_FILE    *RKFSFileOpenW(const char *filename)
{
    return FSFileOpen(filename, "wb");
}


/*----------------------------------------------------------------------
Name  :  RKFSFileClose
Desc  :  关闭打开的文件
Params:  文件句柄
Return:  处理结果
Author:  System Author
Date  :  070830
----------------------------------------------------------------------*/
int     RKFSFileClose(MY_FILE        *stream)
{
    return FSFileClose(stream);
}


/*----------------------------------------------------------------------
Name  :  RKFSFileGetSize
Desc  :  获取文件大小
Params:  打开的文件句柄
Return:  处理结果
Author:  System Author
Date  :  070830
----------------------------------------------------------------------*/
size_t   RKFSFileGetSize(MY_FILE        *stream)
{
    return FSFileGetSize(stream);
}


/*----------------------------------------------------------------------
Name  :  RKFSFileRead
Desc  :  读文件
Params:  目标buffer,读长度,文件句柄
Return:  读到的长度
Author:  System Author
Date  :  070830
----------------------------------------------------------------------*/
size_t   RKFSFileRead(void *buffer, size_t size, MY_FILE *stream)
{
    return FSFileRead(buffer, size, stream);
}


/*----------------------------------------------------------------------
Name  :  RKFSFileWrite
Desc  :  写文件
Params:  源buffer,写入长度,文件句柄
Return:  写入的大小
Author:  System Author
Date  :  070830
----------------------------------------------------------------------*/
size_t  RKFSFileWrite(const void *buffer, size_t size, MY_FILE *stream)
{
    return FSFileWrite(buffer, size, stream);
}

/*----------------------------------------------------------------------
Name  :  RKFSFileSeek
Desc  :  文件定位
Params:  偏移到origin后第offset个字节处
Return:  处理结果
Author:  System Author
Date  :  070830
----------------------------------------------------------------------*/
int  RKFSFileSeek(MY_FILE *stream, size_t offset, int origin)
{
    return FSFileSeek(stream,  offset,  origin);
}

/*----------------------------------------------------------------------
Name  :  RKFSFileDelete
Desc  :  删除文件
Params:  文件路径名
Return:  处理结果
Author:  System Author
Date  :  070830
----------------------------------------------------------------------*/
int    RKFSFileDelete(const char *filename)
{
    return FSFileDelete(filename);
}



/*----------------------------------------------------------------------
Name  :  RKTraceFLF
Desc  :  ///放到最后,以免影响其他接口.
Params:
Return:  处理结果
Author:  System Author
Date  :  070830
----------------------------------------------------------------------*/
#if defined(_DEBUG_) && defined(__arm)
void RKTraceFLF(char* file , INT32U line , char* funName)

{
    TraceFLF(file , line , funName);
}

/*----------------------------------------------------------------------
Name  :  RKMyTrace
Desc  :
Params:
Return:  处理结果
Author:  System Author
Date  :  070830
----------------------------------------------------------------------*/
void RKMyTrace(const char* Format , ...)

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -