feat add sem obtain wait_time and modify e220 lora receive len operation
This commit is contained in:
@@ -68,11 +68,12 @@ void InstallConsole(const char *bus_name, const char *drv_name, const char *dev_
|
||||
BusDevClose(_console);
|
||||
}
|
||||
|
||||
console_bus->match(console_drv, console);
|
||||
|
||||
configure_info.configure_cmd = OPE_INT;
|
||||
memset(&serial_cfg, 0, sizeof(struct SerialCfgParam));
|
||||
configure_info.private_data = &serial_cfg;
|
||||
BusDrvConfigure(console_drv, &configure_info);
|
||||
console_bus->match(console_drv, console);
|
||||
|
||||
serial_dev_param = (struct SerialDevParam *)console->private_data;
|
||||
serial_dev_param->serial_set_mode = 0;
|
||||
|
||||
@@ -96,7 +96,12 @@ static x_err_t _MsgQueueSend(struct MsgQueue *mq,
|
||||
|
||||
tick_delta = 0;
|
||||
task = GetKTaskDescriptor();
|
||||
timeout = CalculteTickFromTimeMs(msec);
|
||||
|
||||
if(WAITING_FOREVER == msec)
|
||||
timeout = WAITING_FOREVER;
|
||||
else
|
||||
timeout = CalculteTickFromTimeMs(msec);
|
||||
|
||||
lock = CriticalAreaLock();
|
||||
if (mq->num_msgs >= mq->max_msgs && timeout == 0) {
|
||||
CriticalAreaUnLock(lock);
|
||||
|
||||
@@ -95,7 +95,11 @@ static int32 _SemaphoreObtain(struct Semaphore *sem, int32 msec)
|
||||
|
||||
NULL_PARAM_CHECK(sem);
|
||||
|
||||
wait_time = CalculteTickFromTimeMs(msec);
|
||||
if(WAITING_FOREVER == msec)
|
||||
wait_time = WAITING_FOREVER;
|
||||
else
|
||||
wait_time = CalculteTickFromTimeMs(msec);
|
||||
|
||||
lock = CriticalAreaLock();
|
||||
|
||||
SYS_KDEBUG_LOG(KDBG_IPC, ("obtain semaphore: id %d, value %d, by task %s\n",
|
||||
|
||||
Reference in New Issue
Block a user