add timeout for adapter_lora.c PrivSemaphoreObtainWait function

This commit is contained in:
wgzAIIT
2022-05-24 16:29:46 +08:00
parent 60e35914a5
commit a9410bd9b1
2 changed files with 18 additions and 13 deletions

View File

@@ -29,6 +29,7 @@
#include <stdint.h>
#include <nuttx/wireless/lpwan/sx127x.h>
#include <nuttx/ioexpander/gpio.h>
#include <termios.h>
typedef uint8_t uint8;
typedef uint16_t uint16;
@@ -44,23 +45,23 @@ typedef int64_t int64;
extern "C" {
#endif
#define OPE_INT 0x0000
#define OPE_CFG 0x0001
#define OPE_INT 0x0000
#define OPE_CFG 0x0001
#define NAME_NUM_MAX 32
#define NAME_NUM_MAX 32
/*********************GPIO define*********************/
#define GPIO_LOW 0x00
#define GPIO_HIGH 0x01
#define GPIO_CFG_OUTPUT 0x00
#define GPIO_CFG_INPUT 0x01
#define GPIO_CFG_INPUT_PULLUP 0x02
#define GPIO_CFG_OUTPUT 0x00
#define GPIO_CFG_INPUT 0x01
#define GPIO_CFG_INPUT_PULLUP 0x02
#define GPIO_CFG_INPUT_PULLDOWN 0x03
#define GPIO_CFG_OUTPUT_OD 0x04
#define GPIO_CFG_OUTPUT_OD 0x04
#define GPIO_CONFIG_MODE 0xffffffff
#define GPIO_CONFIG_MODE 0xffffffff
/********************SERIAL define*******************/
#define BAUD_RATE_2400 2400
@@ -174,9 +175,6 @@ int PrivMutexDelete(pthread_mutex_t *p_mutex);
int PrivMutexObtain(pthread_mutex_t *p_mutex);
int PrivMutexAbandon(pthread_mutex_t *p_mutex);
/*********************semaphore**********************/
int PrivSemaphoreCreate(sem_t *sem, int pshared, unsigned int value);