mirror of
https://github.com/firewalkwithm3/qmk_firmware.git
synced 2024-11-22 11:30:30 +08:00
format code according to conventions [skip ci]
This commit is contained in:
parent
6c2c3c13e9
commit
cc38627816
|
@ -25,10 +25,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
# include "avr/timer_avr.h"
|
||||
#endif
|
||||
|
||||
#define TIMER_DIFF(a, b, max) ((max == UINT8_MAX) ? ((uint8_t)((a)-(b))) : ( \
|
||||
(max == UINT16_MAX) ? ((uint16_t)((a)-(b))) : ( \
|
||||
(max == UINT32_MAX) ? ((uint32_t)((a)-(b))) : ( \
|
||||
(a) >= (b) ? (a) - (b) : (max) + 1 - (b) + (a) ))))
|
||||
#define TIMER_DIFF(a, b, max) ((max == UINT8_MAX) ? ((uint8_t)((a) - (b))) : ((max == UINT16_MAX) ? ((uint16_t)((a) - (b))) : ((max == UINT32_MAX) ? ((uint32_t)((a) - (b))) : ((a) >= (b) ? (a) - (b) : (max) + 1 - (b) + (a)))))
|
||||
#define TIMER_DIFF_8(a, b) TIMER_DIFF(a, b, UINT8_MAX)
|
||||
#define TIMER_DIFF_16(a, b) TIMER_DIFF(a, b, UINT16_MAX)
|
||||
#define TIMER_DIFF_32(a, b) TIMER_DIFF(a, b, UINT32_MAX)
|
||||
|
|
Loading…
Reference in a new issue