btstack_util.c (6d7084813262308410501e1cf0c602a6ec2b0471) | btstack_util.c (d7d45b32136f1f4910d6c49cbbbb0c69b415073e) |
---|---|
1/* 2 * Copyright (C) 2014 BlueKitchen GmbH 3 * 4 * Redistribution and use in source and binary forms, with or without 5 * modification, are permitted provided that the following conditions 6 * are met: 7 * 8 * 1. Redistributions of source code must retain the above copyright --- 192 unchanged lines hidden (view full) --- 201/** 202 * @brief Calculate delta between two uint16_t points in time 203 * @return time_a - time_b - result > 0 if time_a is newer than time_b 204 */ 205int16_t btstack_time16_delta(uint16_t time_a, uint16_t time_b){ 206 return (int16_t)(time_a - time_b); 207} 208 | 1/* 2 * Copyright (C) 2014 BlueKitchen GmbH 3 * 4 * Redistribution and use in source and binary forms, with or without 5 * modification, are permitted provided that the following conditions 6 * are met: 7 * 8 * 1. Redistributions of source code must retain the above copyright --- 192 unchanged lines hidden (view full) --- 201/** 202 * @brief Calculate delta between two uint16_t points in time 203 * @return time_a - time_b - result > 0 if time_a is newer than time_b 204 */ 205int16_t btstack_time16_delta(uint16_t time_a, uint16_t time_b){ 206 return (int16_t)(time_a - time_b); 207} 208 |
209char char_for_nibble(int nibble){ | 209char char_for_nibble(uint8_t nibble){ |
210 211 static const char * char_to_nibble = "0123456789ABCDEF"; 212 213 if (nibble < 16){ 214 return char_to_nibble[nibble]; 215 } else { 216 return '?'; 217 } --- 395 unchanged lines hidden --- | 210 211 static const char * char_to_nibble = "0123456789ABCDEF"; 212 213 if (nibble < 16){ 214 return char_to_nibble[nibble]; 215 } else { 216 return '?'; 217 } --- 395 unchanged lines hidden --- |