GlobLib
HAL and API libraries for MCUs and hardware.
attiny13a_core.c
Go to the documentation of this file.
1 
17 #include "attiny13a_core.h"
18 
19 void delayms(uint16_t delay){
20 
21  //Delay is initially multiplied by two so an uint8_t can
22  //be used in the delay loop
23  delay = (delay<<2)>>CLOCK_getSpeedAlternate();
24 
25  while(delay-- > 0){
26 
27  for(volatile uint8_t j = 0; j < 220;j++);
28  }
29 }
Generic header file for all modules.
uint8_t CLOCK_getSpeedAlternate(void)
Get the current clock divisor.
void delayms(uint16_t delay)
Millisecond blocking delay.