|
23 | 23 |
|
24 | 24 | static int send(struct node_rx_pdu *rx); |
25 | 25 | static inline void sample(uint32_t *timestamp); |
26 | | -static inline void delta(uint32_t timestamp, uint8_t *cputime); |
| 26 | +static inline void delta(uint32_t timestamp, uint16_t *cputime); |
27 | 27 |
|
28 | 28 | static uint32_t timestamp_radio; |
29 | 29 | static uint32_t timestamp_lll; |
30 | 30 | static uint32_t timestamp_ull_high; |
31 | 31 | static uint32_t timestamp_ull_low; |
32 | | -static uint8_t cputime_radio; |
33 | | -static uint8_t cputime_lll; |
34 | | -static uint8_t cputime_ull_high; |
35 | | -static uint8_t cputime_ull_low; |
36 | | -static uint8_t latency_min = (uint8_t) -1; |
37 | | -static uint8_t latency_max; |
38 | | -static uint8_t latency_prev; |
39 | | -static uint8_t cputime_min = (uint8_t) -1; |
40 | | -static uint8_t cputime_max; |
41 | | -static uint8_t cputime_prev; |
| 32 | +static uint16_t cputime_radio; |
| 33 | +static uint16_t cputime_lll; |
| 34 | +static uint16_t cputime_ull_high; |
| 35 | +static uint16_t cputime_ull_low; |
| 36 | +static uint16_t latency_min = UINT16_MAX; |
| 37 | +static uint16_t latency_max; |
| 38 | +static uint16_t latency_prev; |
| 39 | +static uint16_t cputime_min = UINT16_MAX; |
| 40 | +static uint16_t cputime_max; |
| 41 | +static uint16_t cputime_prev; |
42 | 42 | static uint32_t timestamp_latency; |
43 | 43 |
|
44 | 44 | void lll_prof_enter_radio(void) |
@@ -155,7 +155,7 @@ void lll_prof_reserve_send(struct node_rx_pdu *rx) |
155 | 155 |
|
156 | 156 | static int send(struct node_rx_pdu *rx) |
157 | 157 | { |
158 | | - uint8_t latency, cputime, prev; |
| 158 | + uint16_t latency, cputime, prev; |
159 | 159 | struct pdu_data *pdu; |
160 | 160 | struct profile *p; |
161 | 161 | uint8_t chg = 0U; |
@@ -248,13 +248,13 @@ static inline void sample(uint32_t *timestamp) |
248 | 248 | *timestamp = radio_tmr_sample_get(); |
249 | 249 | } |
250 | 250 |
|
251 | | -static inline void delta(uint32_t timestamp, uint8_t *cputime) |
| 251 | +static inline void delta(uint32_t timestamp, uint16_t *cputime) |
252 | 252 | { |
253 | 253 | uint32_t delta; |
254 | 254 |
|
255 | 255 | radio_tmr_sample(); |
256 | 256 | delta = radio_tmr_sample_get() - timestamp; |
257 | | - if (delta < UINT8_MAX && delta > *cputime) { |
| 257 | + if (delta < UINT16_MAX && delta > *cputime) { |
258 | 258 | *cputime = delta; |
259 | 259 | } |
260 | 260 | } |
0 commit comments