Commit 6b6d626f authored by MagoKimbra's avatar MagoKimbra

Update ArduinoAddons

parent b41bf594
...@@ -107,7 +107,55 @@ u8glib ChangeLog ...@@ -107,7 +107,55 @@ u8glib ChangeLog
* Sleep Mode * Sleep Mode
* 4x mode for ST7920 * 4x mode for ST7920
* New C++ interface for ST7920 * New C++ interface for ST7920
2013-03-24 v1.12 Oliver Kraus <olikraus@gmail.com>
* Added touch panel examples
2013-06-30 v1.13 Oliver Kraus <olikraus@gmail.com>
* Fixed missing "Arduino.h" in u8g_delay.c
* Disable interrupt for port/pin access (AVR), issue 19
* Support for HT1632: U8GLIB_HT1632_24X16 u8g(wr, data, cs), issue 165
* Support for SSD1351 OLED, issue 168
* Cleaned up several compiler warnings
* Fixed conflict with scheduler (Arduino Due), issue 155
* HW SPI for Arduino Due, issue 180
* Performance improvement for ST7920, issue 177
* Added ":" to the "n"umeric variant of the fonts, issue 166
* Added additional argument u8g_InitCom(). Use U8G_SPI_CLK_CYCLE_NONE by default.
* Added double buffer option for many ST7565 devices
* Tested with Arduino 1.0.5
2013-10-03 v1.14 Oliver Kraus <olikraus@gmail.com>
* Support for ARM controller
* Support for the A2 micro printer (issue 191)
* Ellipse drawing primitive (issue 187)
* Added software reset for UC1701
* Fixed compiler warning (issue 196)
* Support for Freetronics SSD1351 OLED (issue 195)
* Several other fixes and improvements
2014-01-25 v1.15 Oliver Kraus <olikraus@gmail.com>
* Fixed a bug with the rotation procs: Occupied too much flash ROM (issue 219)
* Fixed issue with more than one SPI controller (SW SPI, issue 227)
* Added "drawTriangle" (issue 226)
* Added support for UC1608 (issue 214)
* Added ProFont family of fonts (issue 234)
* SW SPI support for Teensy 3 (issue 230)
* Removed Arduino/AVR specific files from ARM port (issue 209)
2014-07-05 v1.16 Oliver Kraus <olikraus@gmail.com>
* Added support for LD7032 60x32 OLED
* Added support for SSD1306 OLED, which does not send I2C ACK (issue 239)
* Added support for SH1106 128x64 OLED
* Added support for T6963 128x128 displays
* Added U8GLIB_SSD1306_ADAFRUIT_128X64 constructor
2014-12-21 v1.17 Oliver Kraus <olikraus@gmail.com>
* Added U8GLIB_UC1611_DOGM240 constructor (Issue 284)
* Added U8GLIB_UC1611_DOGXL240 constructor
* Added support for UC1608 controller (Issue 300)
* Added U8GLIB_SSD1306_ADAFRUIT_128X64 for Adafruit OLEDs (Issue 289)
* Bufix in the sleep on/off sequence (CS has not been releases, issue 298)
* helvB and helvR number only fonts (Issue 271)
* 400KHz option for I2C with U8G_I2C_OPT_FAST available for Due and Uno (Issue 303)
* I2C support for Arduino Due. 100KHz/400KHz, TWI & TWI1, ACK will be ignored (issue 285)
* Unifont update (Issue 297)
...@@ -2,10 +2,15 @@ ...@@ -2,10 +2,15 @@
U8GLIB U8GLIB
http://code.google.com/p/u8glib/ http://code.google.com/p/u8glib/
Install instructions for the Arduino environment. Install instructions for the Arduino environment.
1. Unzip u8glib_arduino_vX.XX.zip into the "libraries" folder 1. Start Arduino IDE
2. In the Arduino IDE, import the library from the "Add Library" Menu.
Alternative install instructions for the Arduino environment.
1. Unzip u8glib_arduino_vX.XX.zip into the "libraries" folder of the
Arduino install directory
2. Start Arduino IDE 2. Start Arduino IDE
Install instructions for the Chipkit (Arduino) environment. Install instructions for the Chipkit (Arduino) environment.
......
...@@ -77,4 +77,3 @@ uint8_t U8GLIB::initRW8Bit(u8g_dev_t *dev, uint8_t d0, uint8_t d1, uint8_t d2, u ...@@ -77,4 +77,3 @@ uint8_t U8GLIB::initRW8Bit(u8g_dev_t *dev, uint8_t d0, uint8_t d1, uint8_t d2, u
return u8g_InitRW8Bit(&u8g, dev, d0, d1, d2, d3, d4, d5, d6, d7, cs, a0, wr, rd, reset); return u8g_InitRW8Bit(&u8g, dev, d0, d1, d2, d3, d4, d5, d6, d7, cs, a0, wr, rd, reset);
} }
/*
A2Printer.pde
Special example code for the A2 Mciro Printer (https://www.sparkfun.com/products/10438)
Universal 8bit Graphics Library, http://code.google.com/p/u8glib/
Copyright (c) 2013, olikraus@gmail.com
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this list
of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice, this
list of conditions and the following disclaimer in the documentation and/or other
materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "U8glib.h"
// use this serial interface
#define PRINTER_SERIAL Serial
// #define PRINTER_SERIAL Serial1
uint8_t u8g_com_uart(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void *arg_ptr) {
switch(msg) {
case U8G_COM_MSG_WRITE_BYTE:
PRINTER_SERIAL.write(arg_val);
break;
}
return 1;
}
// setup u8g object, please remove comment from one of the following constructor calls
// half resolution
//U8GLIB u8g(&u8g_dev_a2_micro_printer_192x120_ds, (u8g_com_fnptr)u8g_com_uart);
// full resolution, requires to uncomment U8G_16BIT in u8g.h
//U8GLIB u8g(&u8g_dev_a2_micro_printer_384x240, (u8g_com_fnptr)u8g_com_uart);
// half resolution, extra log, requires to uncomment U8G_16BIT in u8g.h
//U8GLIB u8g(&u8g_dev_a2_micro_printer_192x360_ds, (u8g_com_fnptr)u8g_com_uart);
U8GLIB u8g(&u8g_dev_a2_micro_printer_192x720_ds, (u8g_com_fnptr)u8g_com_uart);
void drawLogo(uint8_t d) {
u8g.setFont(u8g_font_gdr25r);
u8g.drawStr(0+d, 30+d, "U");
u8g.setFont(u8g_font_gdr30n);
u8g.drawStr90(23+d,10+d,"8");
u8g.setFont(u8g_font_gdr25r);
u8g.drawStr(53+d,30+d,"g");
u8g.drawHLine(2+d, 35+d, 47);
u8g.drawVLine(45+d, 32+d, 12);
}
void drawURL(void) {
u8g.setFont(u8g_font_4x6);
if ( u8g.getHeight() < 59 ) {
u8g.drawStr(53,9,"code.google.com");
u8g.drawStr(77,18,"/p/u8glib");
}
else {
u8g.drawStr(1,54,"code.google.com/p/u8glib");
}
}
void draw(void) {
// graphic commands to redraw the complete screen should be placed here
drawLogo(0);
drawURL();
u8g.drawFrame(0,0,u8g.getWidth(), u8g.getHeight());
u8g.setFont(u8g_font_helvR24r);
u8g.setPrintPos(0, 100);
u8g.print(u8g.getWidth(), DEC);
u8g.print("x");
u8g.print(u8g.getHeight(), DEC);
}
void setup(void) {
PRINTER_SERIAL.begin(19200);
// flip screen, if required
// u8g.setRot180();
// assign default color value
u8g.setColorIndex(1); // pixel on
}
void loop(void) {
// picture loop: This will print the picture
u8g.firstPage();
do {
draw();
} while( u8g.nextPage() );
// send manual CR to the printer
PRINTER_SERIAL.write('\n');
// reprint the picture after 10 seconds
delay(10000);
}
This diff is collapsed.
...@@ -78,3 +78,4 @@ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, ...@@ -78,3 +78,4 @@ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
...@@ -72,7 +72,7 @@ ...@@ -72,7 +72,7 @@
- Castling: Need to check for fields under attack - Castling: Need to check for fields under attack
--> done --> done
- Check for WIN / LOSE situation, perhaps call ce_Eval() once on the top-level board setup - Check for WIN / LOOSE situation, perhaps call ce_Eval() once on the top-level board setup
just after the real move just after the real move
- cleanup cu_Move - cleanup cu_Move
--> almost done --> almost done
......
...@@ -50,7 +50,7 @@ ...@@ -50,7 +50,7 @@
uint8_t u8g_is_intersection_boolean(u8g_uint_t a0, u8g_uint_t a1, u8g_uint_t v0, u8g_uint_t v1) uint8_t u8g_is_intersection_boolean(u8g_uint_t a0, u8g_uint_t a1, u8g_uint_t v0, u8g_uint_t v1)
However, this is slower than a decision tree version: However, this is slower than a decision tree version:
static uint8_t u8g_is_intersection_decision_tree(u8g_uint_t a0, u8g_uint_t a1, u8g_uint_t v0, u8g_uint_t v1) static uint8_t u8g_is_intersection_decision_tree(u8g_uint_t a0, u8g_uint_t a1, u8g_uint_t v0, u8g_uint_t v1)
Also suprising is, that he the macro implementation is slower than the inlined version. Also suprising is, that the macro implementation is slower than the inlined version.
The decision tree is based on the expansion of the truth table. The decision tree is based on the expansion of the truth table.
...@@ -59,7 +59,7 @@ ...@@ -59,7 +59,7 @@
#include "u8g.h" #include "u8g.h"
#ifdef __GNUC__ #ifdef __GNUC__
#define U8G_ALWAYS_INLINE __attribute__((always_inline)) #define U8G_ALWAYS_INLINE __inline__ __attribute__((always_inline))
#else #else
#define U8G_ALWAYS_INLINE #define U8G_ALWAYS_INLINE
#endif #endif
...@@ -94,8 +94,8 @@ static uint8_t u8g_is_intersection_boolean(u8g_uint_t a0, u8g_uint_t a1, u8g_uin ...@@ -94,8 +94,8 @@ static uint8_t u8g_is_intersection_boolean(u8g_uint_t a0, u8g_uint_t a1, u8g_uin
#define U8G_IS_INTERSECTION_MACRO(a0,a1,v0,v1) ((uint8_t)( (v0) <= (a1) ) ? ( ( (v1) >= (a0) ) ? ( 1 ) : ( (v0) > (v1) ) ) : ( ( (v1) >= (a0) ) ? ( (v0) > (v1) ) : ( 0 ) )) #define U8G_IS_INTERSECTION_MACRO(a0,a1,v0,v1) ((uint8_t)( (v0) <= (a1) ) ? ( ( (v1) >= (a0) ) ? ( 1 ) : ( (v0) > (v1) ) ) : ( ( (v1) >= (a0) ) ? ( (v0) > (v1) ) : ( 0 ) ))
static uint8_t u8g_is_intersection_decision_tree(u8g_uint_t a0, u8g_uint_t a1, u8g_uint_t v0, u8g_uint_t v1) U8G_ALWAYS_INLINE; //static uint8_t u8g_is_intersection_decision_tree(u8g_uint_t a0, u8g_uint_t a1, u8g_uint_t v0, u8g_uint_t v1) U8G_ALWAYS_INLINE;
static uint8_t u8g_is_intersection_decision_tree(u8g_uint_t a0, u8g_uint_t a1, u8g_uint_t v0, u8g_uint_t v1) static uint8_t U8G_ALWAYS_INLINE u8g_is_intersection_decision_tree(u8g_uint_t a0, u8g_uint_t a1, u8g_uint_t v0, u8g_uint_t v1)
{ {
/* surprisingly the macro leads to larger code */ /* surprisingly the macro leads to larger code */
/* return U8G_IS_INTERSECTION_MACRO(a0,a1,v0,v1); */ /* return U8G_IS_INTERSECTION_MACRO(a0,a1,v0,v1); */
......
...@@ -36,9 +36,9 @@ ...@@ -36,9 +36,9 @@
#include "u8g.h" #include "u8g.h"
uint8_t u8g_InitCom(u8g_t *u8g, u8g_dev_t *dev) uint8_t u8g_InitCom(u8g_t *u8g, u8g_dev_t *dev, uint8_t clk_cycle_time)
{ {
return dev->com_fn(u8g, U8G_COM_MSG_INIT, 0, NULL); return dev->com_fn(u8g, U8G_COM_MSG_INIT, clk_cycle_time, NULL);
} }
void u8g_StopCom(u8g_t *u8g, u8g_dev_t *dev) void u8g_StopCom(u8g_t *u8g, u8g_dev_t *dev)
......
...@@ -49,6 +49,12 @@ ...@@ -49,6 +49,12 @@
u8g_Init8Bit(u8g, dev, d0, d1, d2, d3, d4, d5, d6, d7, en, cs1, cs2, di, rw, reset) u8g_Init8Bit(u8g, dev, d0, d1, d2, d3, d4, d5, d6, d7, en, cs1, cs2, di, rw, reset)
u8g_Init8Bit(u8g, dev, 8, 9, 10, 11, 4, 5, 6, 7, 18, 14, 15, 17, 16, U8G_PIN_NONE) u8g_Init8Bit(u8g, dev, 8, 9, 10, 11, 4, 5, 6, 7, 18, 14, 15, 17, 16, U8G_PIN_NONE)
Update for ATOMIC operation done (01 Jun 2013)
U8G_ATOMIC_OR(ptr, val)
U8G_ATOMIC_AND(ptr, val)
U8G_ATOMIC_START();
U8G_ATOMIC_END();
*/ */
#include "u8g.h" #include "u8g.h"
...@@ -114,7 +120,8 @@ static void u8g_com_arduino_fast_parallel_init(u8g_t *u8g) ...@@ -114,7 +120,8 @@ static void u8g_com_arduino_fast_parallel_init(u8g_t *u8g)
u8g_data_mask[7] = digitalPinToBitMask(u8g->pin_list[U8G_PI_D7]); u8g_data_mask[7] = digitalPinToBitMask(u8g->pin_list[U8G_PI_D7]);
} }
void u8g_com_arduino_fast_write_data_pin(uint8_t pin, uint8_t val) /* atomic protection must be done by calling function */
static void u8g_com_arduino_fast_write_data_pin(uint8_t pin, uint8_t val)
{ {
if ( val != 0 ) if ( val != 0 )
*u8g_data_port[pin] |= u8g_data_mask[pin]; *u8g_data_port[pin] |= u8g_data_mask[pin];
...@@ -125,6 +132,7 @@ void u8g_com_arduino_fast_write_data_pin(uint8_t pin, uint8_t val) ...@@ -125,6 +132,7 @@ void u8g_com_arduino_fast_write_data_pin(uint8_t pin, uint8_t val)
void u8g_com_arduino_fast_parallel_write(u8g_t *u8g, uint8_t val) void u8g_com_arduino_fast_parallel_write(u8g_t *u8g, uint8_t val)
{ {
U8G_ATOMIC_START();
u8g_com_arduino_fast_write_data_pin( 0, val&1 ); u8g_com_arduino_fast_write_data_pin( 0, val&1 );
val >>= 1; val >>= 1;
u8g_com_arduino_fast_write_data_pin( 1, val&1 ); u8g_com_arduino_fast_write_data_pin( 1, val&1 );
...@@ -142,6 +150,7 @@ void u8g_com_arduino_fast_parallel_write(u8g_t *u8g, uint8_t val) ...@@ -142,6 +150,7 @@ void u8g_com_arduino_fast_parallel_write(u8g_t *u8g, uint8_t val)
val >>= 1; val >>= 1;
u8g_com_arduino_fast_write_data_pin( 7, val&1 ); u8g_com_arduino_fast_write_data_pin( 7, val&1 );
val >>= 1; val >>= 1;
U8G_ATOMIC_END();
/* EN cycle time must be 1 micro second */ /* EN cycle time must be 1 micro second */
u8g_com_arduino_digital_write(u8g, U8G_PI_EN, HIGH); u8g_com_arduino_digital_write(u8g, U8G_PI_EN, HIGH);
......
...@@ -48,6 +48,12 @@ ...@@ -48,6 +48,12 @@
u8g_Init8Bit(u8g, dev, d0, d1, d2, d3, d4, d5, d6, d7, en, cs1, cs2, di, rw, reset) u8g_Init8Bit(u8g, dev, d0, d1, d2, d3, d4, d5, d6, d7, en, cs1, cs2, di, rw, reset)
u8g_Init8Bit(u8g, dev, 8, 9, 10, 11, 4, 5, 6, 7, 18, 14, 15, 17, 16, U8G_PIN_NONE) u8g_Init8Bit(u8g, dev, 8, 9, 10, 11, 4, 5, 6, 7, 18, 14, 15, 17, 16, U8G_PIN_NONE)
Update for ATOMIC operation done (01 Jun 2013)
U8G_ATOMIC_OR(ptr, val)
U8G_ATOMIC_AND(ptr, val)
U8G_ATOMIC_START();
U8G_ATOMIC_END();
*/ */
...@@ -97,17 +103,23 @@ static void u8g_com_arduino_no_en_parallel_init(u8g_t *u8g) ...@@ -97,17 +103,23 @@ static void u8g_com_arduino_no_en_parallel_init(u8g_t *u8g)
u8g_data_mask[7] = digitalPinToBitMask(u8g->pin_list[U8G_PI_D7]); u8g_data_mask[7] = digitalPinToBitMask(u8g->pin_list[U8G_PI_D7]);
} }
void u8g_com_arduino_no_en_write_data_pin(uint8_t pin, uint8_t val) /* No atomic protcetion. This is done by caller */
static void u8g_com_arduino_no_en_write_data_pin(uint8_t pin, uint8_t val)
{ {
if ( val != 0 ) if ( val != 0 )
*u8g_data_port[pin] |= u8g_data_mask[pin]; {
*u8g_data_port[pin] |= u8g_data_mask[pin];
}
else else
{
*u8g_data_port[pin] &= ~u8g_data_mask[pin]; *u8g_data_port[pin] &= ~u8g_data_mask[pin];
}
} }
void u8g_com_arduino_no_en_parallel_write(u8g_t *u8g, uint8_t val) void u8g_com_arduino_no_en_parallel_write(u8g_t *u8g, uint8_t val)
{ {
U8G_ATOMIC_START();
u8g_com_arduino_no_en_write_data_pin( 0, val&1 ); u8g_com_arduino_no_en_write_data_pin( 0, val&1 );
val >>= 1; val >>= 1;
u8g_com_arduino_no_en_write_data_pin( 1, val&1 ); u8g_com_arduino_no_en_write_data_pin( 1, val&1 );
...@@ -125,6 +137,7 @@ void u8g_com_arduino_no_en_parallel_write(u8g_t *u8g, uint8_t val) ...@@ -125,6 +137,7 @@ void u8g_com_arduino_no_en_parallel_write(u8g_t *u8g, uint8_t val)
val >>= 1; val >>= 1;
u8g_com_arduino_no_en_write_data_pin( 7, val&1 ); u8g_com_arduino_no_en_write_data_pin( 7, val&1 );
val >>= 1; val >>= 1;
U8G_ATOMIC_END();
/* EN cycle time must be 1 micro second, digitalWrite is slow enough to do this */ /* EN cycle time must be 1 micro second, digitalWrite is slow enough to do this */
if ( u8g->pin_list[U8G_PI_CS_STATE] == 1 ) if ( u8g->pin_list[U8G_PI_CS_STATE] == 1 )
......
/* /*
u8g_arduino_parallel.c u8g_com_arduino_parallel.c
Universal 8bit Graphics Library Universal 8bit Graphics Library
...@@ -87,13 +87,10 @@ void u8g_com_arduino_parallel_write(u8g_t *u8g, uint8_t val) ...@@ -87,13 +87,10 @@ void u8g_com_arduino_parallel_write(u8g_t *u8g, uint8_t val)
u8g_com_arduino_digital_write(u8g, U8G_PI_D7, val&1); u8g_com_arduino_digital_write(u8g, U8G_PI_D7, val&1);
/* EN cycle time must be 1 micro second, digitalWrite is slow enough to do this */ /* EN cycle time must be 1 micro second, digitalWrite is slow enough to do this */
//u8g_Delay(1);
u8g_com_arduino_digital_write(u8g, U8G_PI_EN, HIGH); u8g_com_arduino_digital_write(u8g, U8G_PI_EN, HIGH);
//u8g_Delay(1);
u8g_MicroDelay(); /* delay by 1000ns, reference: ST7920: 140ns, SBN1661: 100ns */ u8g_MicroDelay(); /* delay by 1000ns, reference: ST7920: 140ns, SBN1661: 100ns */
u8g_com_arduino_digital_write(u8g, U8G_PI_EN, LOW); u8g_com_arduino_digital_write(u8g, U8G_PI_EN, LOW);
u8g_10MicroDelay(); /* ST7920 commands: 72us */ u8g_10MicroDelay(); /* ST7920 commands: 72us */
//u8g_Delay(2);
} }
......
...@@ -42,6 +42,13 @@ ...@@ -42,6 +42,13 @@
u8g_Init8Bit(u8g, dev, d0, d1, d2, d3, d4, d5, d6, d7, en, cs1, cs2, di, rw, reset) u8g_Init8Bit(u8g, dev, d0, d1, d2, d3, d4, d5, d6, d7, en, cs1, cs2, di, rw, reset)
u8g_Init8Bit(u8g, dev, 8, 9, 10, 11, 4, 5, 6, 7, 18, 14, 15, 17, 16, U8G_PIN_NONE) u8g_Init8Bit(u8g, dev, 8, 9, 10, 11, 4, 5, 6, 7, 18, 14, 15, 17, 16, U8G_PIN_NONE)
Update for ATOMIC operation done (01 Jun 2013)
U8G_ATOMIC_OR(ptr, val)
U8G_ATOMIC_AND(ptr, val)
U8G_ATOMIC_START();
U8G_ATOMIC_END();
*/ */
#include "u8g.h" #include "u8g.h"
...@@ -80,8 +87,10 @@ uint8_t u8g_com_arduino_port_d_wr_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, v ...@@ -80,8 +87,10 @@ uint8_t u8g_com_arduino_port_d_wr_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, v
#ifdef UCSR0B #ifdef UCSR0B
UCSR0B = 0; // disable USART 0 UCSR0B = 0; // disable USART 0
#endif #endif
U8G_ATOMIC_START();
DDRD = 0x0ff; DDRD = 0x0ff;
PORTD = 0x0ff; PORTD = 0x0ff;
U8G_ATOMIC_END();
/* setup the RW pin as output and force it to low */ /* setup the RW pin as output and force it to low */
if ( u8g->pin_list[U8G_PI_RW] != U8G_PIN_NONE ) if ( u8g->pin_list[U8G_PI_RW] != U8G_PIN_NONE )
......
...@@ -31,7 +31,6 @@ ...@@ -31,7 +31,6 @@
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/ */
#include "u8g.h" #include "u8g.h"
......
/* /*
u8g_atmega_parallel.c u8g_com_atmega_parallel.c
Universal 8bit Graphics Library Universal 8bit Graphics Library
......
...@@ -78,7 +78,7 @@ uint8_t u8g_dev_flipdisc_2x7_bw_fn(u8g_t *u8g, u8g_dev_t *dev, uint8_t msg, void ...@@ -78,7 +78,7 @@ uint8_t u8g_dev_flipdisc_2x7_bw_fn(u8g_t *u8g, u8g_dev_t *dev, uint8_t msg, void
/* current page: pb->p.page */ /* current page: pb->p.page */
/* ptr to the buffer: pb->buf */ /* ptr to the buffer: pb->buf */
(*u8g_write_flip_disc_matrix)(0, pb->p.page, WIDTH, pb->buf, pb->buf+WIDTH); (*u8g_write_flip_disc_matrix)(0, pb->p.page, WIDTH, pb->buf, (uint8_t *)(pb->buf)+WIDTH);
} }
break; break;
case U8G_DEV_MSG_CONTRAST: case U8G_DEV_MSG_CONTRAST:
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment