forked from xuos/xiuos
1、updata lora_radio_driver submodules;2、fix radio define error in connect_lora_spi.c;3、fix ticks calculation bug in timer_settime。
This commit is contained in:
@@ -107,12 +107,13 @@ int timer_settime(timer_t timerid, int flags, const struct itimerspec *restrict
|
|||||||
//reference from RTT
|
//reference from RTT
|
||||||
/* calculate timer period(tick); To avoid lost of accuracy, because "TICK_PER_SECOND" maybe 100, 1000, 1024 and so on.
|
/* calculate timer period(tick); To avoid lost of accuracy, because "TICK_PER_SECOND" maybe 100, 1000, 1024 and so on.
|
||||||
*
|
*
|
||||||
* tick nanosecond nanosecond * TICK_PER_SECOND
|
* tick millisecond millisecond * TICK_PER_SECOND
|
||||||
* ------------------------- = -------------------------- ---> tick = -------------------------------------
|
* ------------------------- = -------------------------- ---> tick = -------------------------------------
|
||||||
* TICK_PER_SECOND NANOSECOND_PER_SECOND NANOSECOND_PER_SECOND
|
* TICK_PER_SECOND MILLISECOND_PER_SECOND MILLISECOND_PER_SECOND
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
uint32_t ticks = (value->it_interval.tv_sec * TICK_PER_SECOND) + (value->it_interval.tv_nsec / 1000000000) * TICK_PER_SECOND;
|
uint32_t ms_value = value->it_interval.tv_nsec / 1000000;
|
||||||
|
uint32_t ticks = (value->it_interval.tv_sec * TICK_PER_SECOND) + (ms_value * TICK_PER_SECOND) / 1000;
|
||||||
|
|
||||||
UserTimerModify(timerid, ticks);
|
UserTimerModify(timerid, ticks);
|
||||||
|
|
||||||
|
|||||||
Submodule APP_Framework/lib/lorawan/lora_radio_driver updated: a400879b13...be37aa885c
+1
-1
@@ -22,7 +22,7 @@
|
|||||||
|
|
||||||
static struct HardwareDev *g_spi_lora_dev;
|
static struct HardwareDev *g_spi_lora_dev;
|
||||||
static BusType buspin;
|
static BusType buspin;
|
||||||
tRadioDriver *Radio = NONE;
|
static tRadioDriver *Radio = NONE;
|
||||||
void SX1276InitIo(void)
|
void SX1276InitIo(void)
|
||||||
{
|
{
|
||||||
struct PinParam PinCfg;
|
struct PinParam PinCfg;
|
||||||
|
|||||||
+1
-1
@@ -22,7 +22,7 @@
|
|||||||
|
|
||||||
static struct HardwareDev *g_spi_lora_dev;
|
static struct HardwareDev *g_spi_lora_dev;
|
||||||
static BusType buspin;
|
static BusType buspin;
|
||||||
tRadioDriver *Radio = NONE;
|
static tRadioDriver *Radio = NONE;
|
||||||
void SX1276InitIo(void)
|
void SX1276InitIo(void)
|
||||||
{
|
{
|
||||||
struct PinParam PinCfg;
|
struct PinParam PinCfg;
|
||||||
|
|||||||
@@ -25,7 +25,7 @@
|
|||||||
#define LORA_RST_PIN (GPIO_PIN_02)
|
#define LORA_RST_PIN (GPIO_PIN_02)
|
||||||
|
|
||||||
static struct HardwareDev *g_spi_lora_dev;
|
static struct HardwareDev *g_spi_lora_dev;
|
||||||
tRadioDriver *Radio = NONE;
|
static tRadioDriver *Radio = NONE;
|
||||||
|
|
||||||
void SX1276InitIo(void)
|
void SX1276InitIo(void)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user