Skip to content

Commit

Permalink
Commented function, now provided by Teensyduino
Browse files Browse the repository at this point in the history
  • Loading branch information
hjd1964 committed Jul 15, 2021
1 parent 033f16e commit 4eea46a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/HAL/Teensy_3/Teensy_3.h
Original file line number Diff line number Diff line change
Expand Up @@ -81,20 +81,23 @@

//--------------------------------------------------------------------------------------------------
// Nanoseconds delay function
/*
unsigned int _nanosPerPass=1;
void delayNanoseconds(unsigned int n) {
unsigned int np=(n/_nanosPerPass);
for (unsigned int i=0; i<np; i++) { __asm__ volatile ("nop\n\t" "nop\n\t" "nop\n\t" "nop\n\t" "nop\n\t" "nop\n\t" "nop\n\t" "nop\n\t" "nop\n\t" "nop\n\t" "nop\n\t" "nop\n\t" "nop\n\t" "nop\n\t" "nop\n\t" "nop\n\t"); }
}
*/

//--------------------------------------------------------------------------------------------------
// General purpose initialize for HAL
void HAL_Initialize(void) {
/*
// calibrate delayNanoseconds()
uint32_t startTime,npp;
cli(); startTime=micros(); delayNanoseconds(65535); npp=micros(); sei(); npp=((int32_t)(npp-startTime)*1000)/63335;
if (npp<1) npp=1; if (npp>2000) npp=2000; _nanosPerPass=npp;

*/
analogReadResolution(10);
}

Expand Down

0 comments on commit 4eea46a

Please sign in to comment.