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:
parent
0a71b8b62a
commit
08388f1b11
|
@ -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);
|
||||||
|
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Subproject commit a400879b133bdce5051f7a550a4a05bfdbceb26c
|
Subproject commit be37aa885ca710ddcdf6ec0f671f0d566da9cb6f
|
|
@ -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;
|
||||||
|
|
|
@ -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)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue