File tree 1 file changed +3
-5
lines changed
1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -103,8 +103,6 @@ extern "C" void wsf_mbed_ble_signal_event(void)
103
103
}
104
104
#endif // CORDIO_ZERO_COPY_HCI
105
105
106
- #define CORDIO_TRANSPORT_WSF_MS_PER_TICK 10
107
-
108
106
static void bleLoop ()
109
107
{
110
108
#if CORDIO_ZERO_COPY_HCI
@@ -118,7 +116,7 @@ static void bleLoop()
118
116
timer.reset ();
119
117
120
118
uint64_t last_update_ms = (last_update_us / 1000 );
121
- wsfTimerTicks_t wsf_ticks = (last_update_ms / CORDIO_TRANSPORT_WSF_MS_PER_TICK );
119
+ wsfTimerTicks_t wsf_ticks = (last_update_ms / WSF_MS_PER_TICK );
122
120
123
121
if (wsf_ticks > 0 ) {
124
122
WsfTimerUpdate (wsf_ticks);
@@ -139,9 +137,9 @@ static void bleLoop()
139
137
uint64_t time_spent = (uint64_t ) timer.read_high_resolution_us ();
140
138
141
139
/* don't bother sleeping if we're already past tick */
142
- if (sleep && (CORDIO_TRANSPORT_WSF_MS_PER_TICK * 1000 > time_spent)) {
140
+ if (sleep && (WSF_MS_PER_TICK * 1000 > time_spent)) {
143
141
/* sleep to maintain constant tick rate */
144
- uint64_t wait_time_us = CORDIO_TRANSPORT_WSF_MS_PER_TICK * 1000 - time_spent;
142
+ uint64_t wait_time_us = WSF_MS_PER_TICK * 1000 - time_spent;
145
143
uint64_t wait_time_ms = wait_time_us / 1000 ;
146
144
147
145
wait_time_us = wait_time_us % 1000 ;
You can’t perform that action at this time.
0 commit comments