Subversion Repositories group.electronics

Rev

Rev 128 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
126 pfowler 1
/*
2
 * oled.h
3
 *
4
 *  Created on: 27/11/2013
5
 *      Author: pfowler
6
 */
7
 
8
#ifndef OLED_H_
9
#define OLED_H_
10
 
11
#include <avr/pgmspace.h>
12
 
13
#define	OLED_EXTERNALVCC			0x00
14
#define	OLED_SWITCHCAPVCC			0x01
15
 
16
 
17
 
18
 
19
struct {
20
  uint8_t i2c_addr;
21
 
22
  uint8_t width;
23
  uint8_t height;
24
  uint8_t* buffer;
25
} oled;
26
 
27
void oled_drawPixel(uint8_t* buffer, uint16_t x, uint16_t y, uint8_t color);
28
void oled_invert(uint8_t i);
29
uint8_t* oled_getBuffer(void);
30
uint8_t* oled_init(uint8_t width, uint8_t height, uint8_t vccstate, uint8_t address);
31
inline void oled_cmd(uint8_t cmd);
32
inline void oled_data(uint8_t data);
33
void oled_write(uint8_t control, uint8_t data);
34
void oled_display(void);
35
void oled_clear(void);
36
void oled_power(uint8_t pwr);
37
 
38
#endif /* OLED_H_ */