@@ -26,7 +26,7 @@ static otUdpSocket sUdpSocket;
26
26
void initUdp (otInstance * aInstance );
27
27
28
28
void handleUdpRecvTemperature (void * aContext , otMessage * aMessage ,
29
- const otMessageInfo * aMessageInfo );
29
+ const otMessageInfo * aMessageInfo );
30
30
31
31
void sendUdpTemperature (otInstance * aInstance , uint8_t temperature );
32
32
@@ -48,13 +48,13 @@ int main(__attribute__((unused)) int argc, __attribute__((unused)) char* argv[])
48
48
49
49
// Set callback to be notified when thread state changes.
50
50
otSetStateChangedCallback (instance , stateChangeCallback , instance );
51
-
51
+
52
52
///////////////////////////////////////////////////
53
- // THREAD NETWORK SETUP HERE
53
+ // THREAD NETWORK SETUP HERE
54
54
55
55
// Configure network.
56
56
setNetworkConfiguration (instance );
57
-
57
+
58
58
// Init UDP interface.
59
59
initUdp (instance );
60
60
@@ -75,10 +75,10 @@ int main(__attribute__((unused)) int argc, __attribute__((unused)) char* argv[])
75
75
76
76
//
77
77
////////////////////////////////////////////////////
78
-
78
+
79
79
// OpenThread main loop.
80
- for (;;) {
81
- // Execute any pending OpenThread related work.
80
+ for ( ;;) {
81
+ // Execute any pending OpenThread related work.
82
82
otTaskletsProcess (instance );
83
83
84
84
// Execute any platform related work (e.g. check
@@ -88,9 +88,8 @@ int main(__attribute__((unused)) int argc, __attribute__((unused)) char* argv[])
88
88
// If there is not pending platform or OpenThread
89
89
// related work -- yield.
90
90
if (!otTaskletsArePending (instance ) &&
91
- !openthread_platform_pending_work ())
92
- {
93
- yield ();
91
+ !openthread_platform_pending_work ()) {
92
+ yield ();
94
93
}
95
94
96
95
}
@@ -101,9 +100,9 @@ int main(__attribute__((unused)) int argc, __attribute__((unused)) char* argv[])
101
100
// Helper method that configures the OpenThread network dataset
102
101
// for the desired tutorial configuration.
103
102
// We set the following dataset parameters:
104
- // -- Channel: 26
105
- // -- PanId: 0xabcd
106
- // -- Networkkey: 00112233445566778899aabbccddeeff
103
+ // -- Channel: 26
104
+ // -- PanId: 0xabcd
105
+ // -- Networkkey: 00112233445566778899aabbccddeeff
107
106
void setNetworkConfiguration (otInstance * aInstance ) {
108
107
otOperationalDataset aDataset ;
109
108
@@ -175,7 +174,7 @@ static void print_ip_addr(otInstance* instance) {
175
174
176
175
177
176
void handleUdpRecvTemperature (void * aContext , otMessage * aMessage ,
178
- const otMessageInfo * aMessageInfo ) {
177
+ const otMessageInfo * aMessageInfo ) {
179
178
OT_UNUSED_VARIABLE (aContext );
180
179
OT_UNUSED_VARIABLE (aMessageInfo );
181
180
char buf [2 ];
@@ -231,4 +230,3 @@ void sendUdpTemperature(otInstance* aInstance, uint8_t temperature) {
231
230
otMessageFree (message );
232
231
}
233
232
}
234
-
0 commit comments