Skip to content

Commit 4213608

Browse files
authored
Merge pull request #7 from disk91/add-murata-lora-sigfox
Add murata lora sigfox
2 parents 4b3ab06 + bc28174 commit 4213608

File tree

6 files changed

+183
-109
lines changed

6 files changed

+183
-109
lines changed

Doc/rtc.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ The RTC need to be activated with the following configuration:
3333
The RTC predivider are configured to provide a 1Hz signal to the RTC according to the formula:
3434
1Hz= (RTCCLK)/((1+Async_previv)*(1+Sync_prediv))
3535
* for 37KHz (LSI) Asycn_prediv 124 & Sync_prediv 295
36-
* for 32.768KHz (LSE) Async_prediv 127 & Sync_previd 255
36+
* for 32.768KHz (LSE) Async_prediv 127 & Sync_prediv 255
3737

3838
The wake-up unit for the different sleep mode is directly connected to RTCLK signal with a predivision. The setting have to be RTCLK/16.
3939

Inc/drivers/lorawan/core/lorawan.h

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ typedef enum lorawan_driver_sendState_e {
4545
LORAWAN_SEND_STATE_RUNNING,
4646
LORAWAN_SEND_STATE_SENT,
4747
LORAWAN_SEND_STATE_ACKED,
48+
LORAWAN_SEND_STATE_ACKED_NO_DOWNLINK,
4849
LORAWAN_SEND_STATE_ACKED_WITH_DOWNLINK,
4950
LORAWAN_SEND_STATE_ACKED_DOWNLINK_PENDING,
5051
LORAWAN_SEND_STATE_NOTACKED,
@@ -136,8 +137,11 @@ itsdk_lorawan_send_t lorawan_driver_LORA_Send(
136137
uint8_t port,
137138
uint8_t dataRate,
138139
itsdk_lorawan_sendconf_t isTxConfirmed,
139-
uint8_t retry,
140-
itsdk_lorawan_run_t runMode
140+
uint8_t retry,
141+
itsdk_lorawan_run_t runMode,
142+
uint8_t * rPort, // for sync mode only - on reception - Port
143+
uint8_t * rSize, // for sync mode only - on reception - DataSize - contains maxSize on input
144+
uint8_t * rData // for sync mode only - on reception - Data (bcopied)
141145
);
142146

143147

Inc/it_sdk/configLoRaWan.h.template

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@
5252
#define ITSDK_LORAWAN_CNF_RETRY 3 // Number of retry when Confirm mode is applied
5353
#define ITSDK_LORAWAN_MAX_RX_ERROR 0 // Extends the RX windows with +/- MS
5454
// This is for unprecised clocks (0=default value)
55+
#define ITSDK_LORAWAN_MAX_DWNLNKSZ 32 // Max downlink Size in Byte for reception buffer
5556

5657
// =============================
5758
// FREQUENCY MAPPING

Inc/it_sdk/lorawan/lorawan.h

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -54,13 +54,16 @@ typedef enum {
5454
} itsdk_lorawan_join_t;
5555

5656
typedef enum {
57-
LORAWAN_SEND_QUEUED = 0, // Message put in the sending queue (SUCCESS)
58-
LORAWAN_SEND_SENT, // Message sent (SUCCESS)
59-
LORAWAN_SEND_ACKED, // Message sent and Acked (SUCESS)
60-
LORAWAN_SEND_RUNNING, // Message is in progress (asycn mode) (SUCCESS)
61-
LORAWAN_SEND_NOT_JOINED, // The device has not joined message can be sent (ERROR)
62-
LORAWAN_SEND_DUTYCYCLE, // Not sent - duty cycle constraints
63-
LORAWAN_SEND_FAILED // Various other failure (ERROR)
57+
LORAWAN_SEND_QUEUED = 0, // Message put in the sending queue (SUCCESS)
58+
LORAWAN_SEND_SENT, // Message sent (SUCCESS)
59+
LORAWAN_SEND_ACKED, // Message sent and Acked (SUCCESS)
60+
LORAWAN_SEND_ACKED_WITH_DOWNLINK, // Message sent and Acked with downlink (SUCCESS)
61+
LORAWAN_SEND_ACKED_WITH_DOWNLINK_PENDING, // Message sent and Acked with downlink & Other downlink is pending (SUCCESS)
62+
LORAWAN_SEND_RUNNING, // Message is in progress (async mode) (SUCCESS)
63+
LORAWAN_SEND_NOT_JOINED, // The device has not joined message can be sent (ERROR)
64+
LORAWAN_SEND_DUTYCYCLE, // Not sent - duty cycle constraints
65+
LORAWAN_SEND_ALREADYRUNNING, // A transmission is already in progress (ERROR)
66+
LORAWAN_SEND_FAILED // Various other failure (ERROR)
6467
} itsdk_lorawan_send_t;
6568

6669

@@ -145,7 +148,10 @@ itsdk_lorawan_send_t itsdk_lorawan_send_sync( // Send a frame in sync mod
145148
uint8_t port,
146149
uint8_t dataRate,
147150
itsdk_lorawan_sendconf_t confirm,
148-
uint8_t retry
151+
uint8_t retry,
152+
uint8_t * rPort, // In case of reception - Port (uint8_t)
153+
uint8_t * rSize, // In case of reception - Size (uint8_t) - init with buffer max size
154+
uint8_t * rData // In case of recpetion - Data (uint8_t[] bcopied)
149155
);
150156
itsdk_lorawan_send_t itsdk_lorawan_send_async( // Send a frame in async mode
151157
uint8_t * payload,
@@ -154,7 +160,7 @@ itsdk_lorawan_send_t itsdk_lorawan_send_async( // Send a frame in async m
154160
uint8_t dataRate,
155161
itsdk_lorawan_sendconf_t confirm,
156162
uint8_t retry,
157-
void (*callback_func)(itsdk_lorawan_send_t status)
163+
void (*callback_func)(itsdk_lorawan_send_t status, uint8_t port, uint8_t size, uint8_t * rxData)
158164
);
159165
itsdk_lorawan_send_t itsdk_lorawan_getSendState(); // Send state for polling
160166

0 commit comments

Comments
 (0)