From cf80ef06f6ae1e822d2164d74a29bb4991409299 Mon Sep 17 00:00:00 2001 From: gm2g18 <gm2g18@southampton.ac.uk> Date: Thu, 21 May 2020 16:34:54 +0100 Subject: [PATCH] Deleted lib/led/led.c, lib/led/led.h files --- lib/led/led.c | 36 ------------------------------------ lib/led/led.h | 14 -------------- 2 files changed, 50 deletions(-) delete mode 100644 lib/led/led.c delete mode 100644 lib/led/led.h diff --git a/lib/led/led.c b/lib/led/led.c deleted file mode 100644 index b57f737..0000000 --- a/lib/led/led.c +++ /dev/null @@ -1,36 +0,0 @@ -/* 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; -} - - - diff --git a/lib/led/led.h b/lib/led/led.h deleted file mode 100644 index 76a7008..0000000 --- a/lib/led/led.h +++ /dev/null @@ -1,14 +0,0 @@ -/* 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); - -- GitLab