AT-Command/at_util.h
2021-01-05 22:31:48 +08:00

82 lines
1.5 KiB
C
Raw Blame History

/******************************************************************************
* @brief atģ<74><C4A3>OS<4F><53><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֲ<EFBFBD>ӿ<EFBFBD>
*
* Copyright (c) 2020, <morro_luo@163.com>
*
* SPDX-License-Identifier: Apache-2.0
*
* Change Logs:
* Date Author Notes
* 2020-01-02 Morro <20><><EFBFBD><EFBFBD>
******************************************************************************/
#ifndef _ATUTIL_H_
#define _ATUTIL_H_
#include <stdint.h>
#include <stdbool.h>
#include <stddef.h>
typedef void *at_sem_t; /*<2A>ź<EFBFBD><C5BA><EFBFBD>*/
/*
* @brief <20><>ȡ<EFBFBD><C8A1>ǰϵͳ<CFB5><CDB3><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
*/
static inline unsigned int at_get_ms(void)
{
/*Add here...*/
return 0;
}
/*
* @brief <20><>ʱ<EFBFBD>ж<EFBFBD>
* @retval true | false
*/
static inline bool at_istimeout(unsigned int start_time, unsigned int timeout)
{
return at_get_ms() - start_time > timeout;
}
/*
* @brief <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ
* @retval none
*/
static inline void at_delay(uint32_t ms)
{
}
/*
* @brief <20><><EFBFBD><EFBFBD><EFBFBD>ź<EFBFBD>
* @retval none
*/
static inline at_sem_t at_sem_new(int value)
{
return NULL;
}
/*
* @brief <20>ȴ<EFBFBD><C8B4>ź<EFBFBD>
* @retval none
*/
static inline bool at_sem_wait(at_sem_t s, uint32_t timeout)
{
return false;
}
/*
* @brief <20>ͷ<EFBFBD><CDB7>ź<EFBFBD>
* @retval none
*/
static inline void at_sem_post(at_sem_t s)
{
}
/*
* @brief <20><><EFBFBD>ٵ<EFBFBD><D9B5>ź<EFBFBD>
* @retval none
*/
static inline void at_sem_free(at_sem_t s)
{
}
#endif