X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=Lib%2Fdelay.h;h=19f0425886113f1d564a3d7b8ddab7c0586a9c36;hb=5f262ea4b68a07e9b94ce0a49c0f7196e5f32b3b;hp=17b62cc911b82eb6ff3947636db47e5df65cc501;hpb=1392571bd7c741995ef7feccf08a22c4b4b7d36f;p=kiibohd-controller.git diff --git a/Lib/delay.h b/Lib/delay.h index 17b62cc..19f0425 100644 --- a/Lib/delay.h +++ b/Lib/delay.h @@ -1,7 +1,7 @@ /* Teensyduino Core Library * http://www.pjrc.com/teensy/ * Copyright (c) 2013 PJRC.COM, LLC. - * Modifications by Jacob Alexander 2013-2014 + * Modifications by Jacob Alexander 2013-2015 * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the @@ -29,8 +29,7 @@ * SOFTWARE. */ -#ifndef __DELAY_H -#define __DELAY_H +#pragma once // ----- System Includes ----- @@ -63,6 +62,8 @@ static inline void delayMicroseconds(uint32_t usec) { #if F_CPU == 96000000 uint32_t n = usec << 5; +#elif F_CPU == 72000000 + uint32_t n = usec << 5; // XXX Not accurate, assembly snippet needs to be updated #elif F_CPU == 48000000 uint32_t n = usec << 4; #elif F_CPU == 24000000 @@ -83,5 +84,3 @@ uint32_t micros(void); void delay(uint32_t ms); -#endif -