This commit is contained in:
kraus 2018-10-16 20:49:07 +02:00
parent 89ff3927db
commit 5126ca2669
4 changed files with 79 additions and 1 deletions

View File

@ -224,6 +224,72 @@ uint8_t u8x8_d_ssd1305_128x32_noname(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int,
return 1;
}
/*================================================*/
/* adafruit 128x32 SSD1305 OLED, https://www.adafruit.com/product/2675 */
/* issue 724 */
/* timing from SSD1306 */
static const u8x8_display_info_t u8x8_ssd1305_128x32_adafruit_display_info =
{
/* chip_enable_level = */ 0,
/* chip_disable_level = */ 1,
/* post_chip_enable_wait_ns = */ 20,
/* pre_chip_disable_wait_ns = */ 10,
/* reset_pulse_width_ms = */ 100, /* SSD1306: 3 us */
/* post_reset_wait_ms = */ 100, /* far east OLEDs need much longer setup time */
/* sda_setup_time_ns = */ 50, /* SSD1306: 15ns, but cycle time is 100ns, so use 100/2 */
/* sck_pulse_width_ns = */ 50, /* SSD1306: 20ns, but cycle time is 100ns, so use 100/2, AVR: below 70: 8 MHz, >= 70 --> 4MHz clock */
/* sck_clock_hz = */ 4000000UL, /* since Arduino 1.6.0, the SPI bus speed in Hz. Should be 1000000000/sck_pulse_width_ns */
/* spi_mode = */ 0, /* active high, rising edge */
/* i2c_bus_clock_100kHz = */ 4,
/* data_setup_time_ns = */ 40,
/* write_pulse_width_ns = */ 150, /* SSD1306: cycle time is 300ns, so use 300/2 = 150 */
/* tile_width = */ 16,
/* tile_hight = */ 4,
/* default_x_offset = */ 0,
/* flipmode_x_offset = */ 0,
/* pixel_width = */ 128,
/* pixel_height = */ 32
};
uint8_t u8x8_d_ssd1305_128x32_adafruit(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr)
{
if ( u8x8_d_ssd1305_generic(u8x8, msg, arg_int, arg_ptr) != 0 )
return 1;
switch(msg)
{
case U8X8_MSG_DISPLAY_SET_FLIP_MODE:
if ( arg_int == 0 )
{
u8x8_cad_SendSequence(u8x8, u8x8_d_ssd1305_128x32_flip0_seq);
u8x8->x_offset = u8x8->display_info->default_x_offset;
}
else
{
u8x8_cad_SendSequence(u8x8, u8x8_d_ssd1305_128x32_flip1_seq);
u8x8->x_offset = u8x8->display_info->flipmode_x_offset;
}
break;
case U8X8_MSG_DISPLAY_INIT:
u8x8_d_helper_display_init(u8x8);
u8x8_cad_SendSequence(u8x8, u8x8_d_ssd1305_128x32_noname_init_seq);
break;
case U8X8_MSG_DISPLAY_SETUP_MEMORY:
u8x8_d_helper_display_setup_memory(u8x8, &u8x8_ssd1305_128x32_adafruit_display_info);
break;
default:
return 0;
}
return 1;
}
/*================================================*/
/* adafruit SSD1305 OLED */

View File

@ -152,7 +152,7 @@ void boost_converter(void)
TIM21->CCMR1 |= TIM_CCMR1_OC2PE; /* load modified CCR1 during update event only */
TIM21->PSC = 0; /* run with max speed (2 MHz after reset) */
TIM21->ARR = 20; /* period of 20 clocks (100KHz if sys clock is not modified */
TIM21->ARR = 20; /* period of 20 clocks (100KHz if sys clock is not modified) */
TIM21->CCR2 = 5; /* a value between 0 and ARR, which defines the duty cycle */
/* output the result of channel 2 to PA9 */

View File

@ -2,3 +2,13 @@ Oct 2018:
Two problems:
a) Ubuntu arm-none-eabi is broken (latest download from of arm gcc required)
b) stm32flash v0.5 does not support STM32L011, latest stnapshot required instead
12V Bleiakku
Laden mit 13.8V: Aufrechterhaltung/Kompensierung der Selbstentladung
Laden mit 14.4V: Normale Ladung, dabei muss man aber den Strom messen.
Wenn der Strom auf 2% der Nennkapazität fällt, kann man aufhören:
3 Ah * 2% --> 60mA

View File

@ -77,6 +77,7 @@ struct controller controller_list[] =
"", /* is_generate_u8g2_class= */ 1,
{
{ "128x32_noname" },
{ "128x32_adafruit" },
{ NULL }
}
},
@ -85,6 +86,7 @@ struct controller controller_list[] =
"", /* is_generate_u8g2_class= */ 1,
{
{ "128x32_noname" },
{ "128x32_adafruit" },
{ NULL }
}
},