Skip to content
Snippets Groups Projects
Commit 36c4d511 authored by gm2g18's avatar gm2g18
Browse files

Merge branch 'gm2g18-master-patch-92617' into 'master'

Deleted lib/led/led.c, lib/led/led.h files

See merge request !1
parents f2cb5946 cf80ef06
No related branches found
No related tags found
1 merge request!1Deleted lib/led/led.c, lib/led/led.h files
/* Author: Steve Gunn
* Licence: This work is licensed under the Creative Commons Attribution License.
* View this license at http://creativecommons.org/about/licenses/
*/
#include <avr/io.h>
#include "led.h"
void init_led()
{
DDRB |= _BV(LED);
PORTB &= ~_BV(LED);
}
void led_on()
{
PORTB |= _BV(LED);
}
void led_off()
{
TCCR0A = 0x00;
TCCR0B = 0x00;
PORTB &= ~_BV(LED);
}
void led_brightness(uint8_t i)
{
/* Configure Timer 0 Fast PWM Mode 3 */
TCCR0A = _BV(COM0A1) | _BV(WGM01) | _BV(WGM00);
TCCR0B = _BV(CS20);
OCR0A = i;
}
/* Author: Steve Gunn
* Licence: This work is licensed under the Creative Commons Attribution License.
* View this license at http://creativecommons.org/about/licenses/
*/
#include <stdint.h>
#define LED PB7
void init_led();
void led_on();
void led_off();
void led_brightness(uint8_t i);
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment