added driver for one inverting charge pump

This commit is contained in:
Daniel Knüttel 2019-04-10 11:45:10 +02:00
parent d8bdcc3eed
commit 8506b6ad39
2 changed files with 20 additions and 0 deletions

13
analogout.c Normal file
View File

@ -0,0 +1,13 @@
#include "analogout.h"
#include <avr/io.h>
void
analogout_init(void)
{
DDRD |= _BV(PD5);
TCCR0A = _BV(COM0B1) | _BV(WGM01) | _BV(WGM00);
TCCR0B = _BV(CS00);
OCR0B = 0xff / 2;
}

7
analogout.h Normal file
View File

@ -0,0 +1,7 @@
#ifndef _ANALOGOUT_H_
#define _ANALOGOUT_H_
void
analogout_init(void);
#endif