16 changed files with 5346 additions and 77 deletions
-
6.vscode/settings.json
-
7README.md
-
182app/app.uvoptx
-
30app/app.uvprojx
-
0app/src/basic/m24m02/m24m02.c
-
0app/src/basic/m24m02/m24m02.h
-
2356app/src/basic/ssd1306/driver_ssd1306.c
-
1105app/src/basic/ssd1306/driver_ssd1306.h
-
577app/src/basic/ssd1306/driver_ssd1306_basic.c
-
203app/src/basic/ssd1306/driver_ssd1306_basic.h
-
350app/src/basic/ssd1306/driver_ssd1306_font.h
-
68app/src/basic/ssd1306/driver_ssd1306_interface.c
-
192app/src/basic/ssd1306/driver_ssd1306_interface.h
-
280app/src/one_conduction/one_conduction_board.c
-
61app/src/one_conduction/one_conduction_board.h
-
BINm24m02-dr.pdf
2356
app/src/basic/ssd1306/driver_ssd1306.c
File diff suppressed because it is too large
View File
File diff suppressed because it is too large
View File
1105
app/src/basic/ssd1306/driver_ssd1306.h
File diff suppressed because it is too large
View File
File diff suppressed because it is too large
View File
@ -0,0 +1,577 @@ |
|||
/** |
|||
* Copyright (c) 2015 - present LibDriver All rights reserved |
|||
* |
|||
* The MIT License (MIT) |
|||
* |
|||
* Permission is hereby granted, free of charge, to any person obtaining a copy |
|||
* of this software and associated documentation files (the "Software"), to deal |
|||
* in the Software without restriction, including without limitation the rights |
|||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
|||
* copies of the Software, and to permit persons to whom the Software is |
|||
* furnished to do so, subject to the following conditions: |
|||
* |
|||
* The above copyright notice and this permission notice shall be included in all |
|||
* copies or substantial portions of the Software. |
|||
* |
|||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
|||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
|||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
|||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
|||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
|||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE |
|||
* SOFTWARE. |
|||
* |
|||
* @file driver_ssd1306_basic.c |
|||
* @brief driver ssd1306 basic source file |
|||
* @version 2.0.0 |
|||
* @author Shifeng Li |
|||
* @date 2021-03-30 |
|||
* |
|||
* <h3>history</h3> |
|||
* <table> |
|||
* <tr><th>Date <th>Version <th>Author <th>Description |
|||
* <tr><td>2021/03/30 <td>2.0 <td>Shifeng Li <td>format the code |
|||
* <tr><td>2020/12/10 <td>1.0 <td>Shifeng Li <td>first upload |
|||
* </table> |
|||
*/ |
|||
|
|||
#include "driver_ssd1306_basic.h" |
|||
|
|||
static ssd1306_handle_t gs_handle; /**< ssd1306 handle */ |
|||
|
|||
/** |
|||
* @brief basic example init |
|||
* @param[in] interface is the interface type |
|||
* @param[in] addr is the iic device address |
|||
* @return status code |
|||
* - 0 success |
|||
* - 1 init failed |
|||
* @note none |
|||
*/ |
|||
uint8_t ssd1306_basic_init(ssd1306_interface_t interface, ssd1306_address_t addr) |
|||
{ |
|||
uint8_t res; |
|||
|
|||
/* link functions */ |
|||
DRIVER_SSD1306_LINK_INIT(&gs_handle, ssd1306_handle_t); |
|||
DRIVER_SSD1306_LINK_IIC_INIT(&gs_handle, ssd1306_interface_iic_init); |
|||
DRIVER_SSD1306_LINK_IIC_DEINIT(&gs_handle, ssd1306_interface_iic_deinit); |
|||
DRIVER_SSD1306_LINK_IIC_WRITE(&gs_handle, ssd1306_interface_iic_write); |
|||
DRIVER_SSD1306_LINK_SPI_INIT(&gs_handle, ssd1306_interface_spi_init); |
|||
DRIVER_SSD1306_LINK_SPI_DEINIT(&gs_handle, ssd1306_interface_spi_deinit); |
|||
DRIVER_SSD1306_LINK_SPI_WRITE_COMMAND(&gs_handle, ssd1306_interface_spi_write_cmd); |
|||
DRIVER_SSD1306_LINK_SPI_COMMAND_DATA_GPIO_INIT(&gs_handle, ssd1306_interface_spi_cmd_data_gpio_init); |
|||
DRIVER_SSD1306_LINK_SPI_COMMAND_DATA_GPIO_DEINIT(&gs_handle, ssd1306_interface_spi_cmd_data_gpio_deinit); |
|||
DRIVER_SSD1306_LINK_SPI_COMMAND_DATA_GPIO_WRITE(&gs_handle, ssd1306_interface_spi_cmd_data_gpio_write); |
|||
DRIVER_SSD1306_LINK_RESET_GPIO_INIT(&gs_handle, ssd1306_interface_reset_gpio_init); |
|||
DRIVER_SSD1306_LINK_RESET_GPIO_DEINIT(&gs_handle, ssd1306_interface_reset_gpio_deinit); |
|||
DRIVER_SSD1306_LINK_RESET_GPIO_WRITE(&gs_handle, ssd1306_interface_reset_gpio_write); |
|||
DRIVER_SSD1306_LINK_DELAY_MS(&gs_handle, ssd1306_interface_delay_ms); |
|||
DRIVER_SSD1306_LINK_DEBUG_PRINT(&gs_handle, ssd1306_interface_debug_print); |
|||
|
|||
/* set interface */ |
|||
res = ssd1306_set_interface(&gs_handle, interface); |
|||
if (res != 0) |
|||
{ |
|||
ssd1306_interface_debug_print("ssd1306: set interface failed.\n"); |
|||
|
|||
return 1; |
|||
} |
|||
|
|||
/* set addr pin */ |
|||
res = ssd1306_set_addr_pin(&gs_handle, addr); |
|||
if (res != 0) |
|||
{ |
|||
ssd1306_interface_debug_print("ssd1306: set addr failed.\n"); |
|||
|
|||
return 1; |
|||
} |
|||
|
|||
/* ssd1306 init */ |
|||
res = ssd1306_init(&gs_handle); |
|||
if (res != 0) |
|||
{ |
|||
ssd1306_interface_debug_print("ssd1306: init failed.\n"); |
|||
|
|||
return 1; |
|||
} |
|||
|
|||
/* close display */ |
|||
res = ssd1306_set_display(&gs_handle, SSD1306_DISPLAY_OFF); |
|||
if (res != 0) |
|||
{ |
|||
ssd1306_interface_debug_print("ssd1306: set display failed.\n"); |
|||
(void)ssd1306_deinit(&gs_handle); |
|||
|
|||
return 1; |
|||
} |
|||
|
|||
/* set column address range */ |
|||
res = ssd1306_set_column_address_range(&gs_handle, SSD1306_BASIC_DEFAULT_COLUMN_ADDRESS_RANGE_START, SSD1306_BASIC_DEFAULT_COLUMN_ADDRESS_RANGE_END); |
|||
if (res != 0) |
|||
{ |
|||
ssd1306_interface_debug_print("ssd1306: set column address range failed.\n"); |
|||
(void)ssd1306_deinit(&gs_handle); |
|||
|
|||
return 1; |
|||
} |
|||
|
|||
/* set page address range */ |
|||
res = ssd1306_set_page_address_range(&gs_handle, SSD1306_BASIC_DEFAULT_PAGE_ADDRESS_RANGE_START, SSD1306_BASIC_DEFAULT_PAGE_ADDRESS_RANGE_END); |
|||
if (res != 0) |
|||
{ |
|||
ssd1306_interface_debug_print("ssd1306: set page address range failed.\n"); |
|||
(void)ssd1306_deinit(&gs_handle); |
|||
|
|||
return 1; |
|||
} |
|||
|
|||
/* set low column start address */ |
|||
res = ssd1306_set_low_column_start_address(&gs_handle, SSD1306_BASIC_DEFAULT_LOW_COLUMN_START_ADDRESS); |
|||
if (res != 0) |
|||
{ |
|||
ssd1306_interface_debug_print("ssd1306: set low column start address failed.\n"); |
|||
(void)ssd1306_deinit(&gs_handle); |
|||
|
|||
return 1; |
|||
} |
|||
|
|||
/* set high column start address */ |
|||
res = ssd1306_set_high_column_start_address(&gs_handle, SSD1306_BASIC_DEFAULT_HIGH_COLUMN_START_ADDRESS); |
|||
if (res != 0) |
|||
{ |
|||
ssd1306_interface_debug_print("ssd1306: set high column start address failed.\n"); |
|||
(void)ssd1306_deinit(&gs_handle); |
|||
|
|||
return 1; |
|||
} |
|||
|
|||
/* set display start line */ |
|||
res = ssd1306_set_display_start_line(&gs_handle, SSD1306_BASIC_DEFAULT_DISPLAY_START_LINE); |
|||
if (res != 0) |
|||
{ |
|||
ssd1306_interface_debug_print("ssd1306: set display start line failed.\n"); |
|||
(void)ssd1306_deinit(&gs_handle); |
|||
|
|||
return 1; |
|||
} |
|||
|
|||
/* set fade blinking mode */ |
|||
res = ssd1306_set_fade_blinking_mode(&gs_handle, SSD1306_BASIC_DEFAULT_FADE_BLINKING_MODE, SSD1306_BASIC_DEFAULT_FADE_FRAMES); |
|||
if (res != 0) |
|||
{ |
|||
ssd1306_interface_debug_print("ssd1306: set fade blinking failed.\n"); |
|||
(void)ssd1306_deinit(&gs_handle); |
|||
|
|||
return 1; |
|||
} |
|||
|
|||
/* deactivate scroll */ |
|||
res = ssd1306_deactivate_scroll(&gs_handle); |
|||
if (res != 0) |
|||
{ |
|||
ssd1306_interface_debug_print("ssd1306: set deactivate scroll failed.\n"); |
|||
(void)ssd1306_deinit(&gs_handle); |
|||
|
|||
return 1; |
|||
} |
|||
|
|||
/* set zoom in */ |
|||
res = ssd1306_set_zoom_in(&gs_handle, SSD1306_BASIC_DEFAULT_ZOOM_IN); |
|||
if (res != 0) |
|||
{ |
|||
ssd1306_interface_debug_print("ssd1306: set set zoom in failed.\n"); |
|||
(void)ssd1306_deinit(&gs_handle); |
|||
|
|||
return 1; |
|||
} |
|||
|
|||
/* set contrast */ |
|||
res = ssd1306_set_contrast(&gs_handle, SSD1306_BASIC_DEFAULT_CONTRAST); |
|||
if (res != 0) |
|||
{ |
|||
ssd1306_interface_debug_print("ssd1306: set contrast failed.\n"); |
|||
(void)ssd1306_deinit(&gs_handle); |
|||
|
|||
return 1; |
|||
} |
|||
|
|||
/* set segment remap */ |
|||
res = ssd1306_set_segment_remap(&gs_handle, SSD1306_BASIC_DEFAULT_SEGMENT); |
|||
if (res != 0) |
|||
{ |
|||
ssd1306_interface_debug_print("ssd1306: set segment remap failed.\n"); |
|||
(void)ssd1306_deinit(&gs_handle); |
|||
|
|||
return 1; |
|||
} |
|||
|
|||
/* set scan direction */ |
|||
res = ssd1306_set_scan_direction(&gs_handle, SSD1306_BASIC_DEFAULT_SCAN_DIRECTION); |
|||
if (res != 0) |
|||
{ |
|||
ssd1306_interface_debug_print("ssd1306: set scan direction failed.\n"); |
|||
(void)ssd1306_deinit(&gs_handle); |
|||
|
|||
return 1; |
|||
} |
|||
|
|||
/* set display mode */ |
|||
res = ssd1306_set_display_mode(&gs_handle, SSD1306_BASIC_DEFAULT_DISPLAY_MODE); |
|||
if (res != 0) |
|||
{ |
|||
ssd1306_interface_debug_print("ssd1306: set display mode failed.\n"); |
|||
(void)ssd1306_deinit(&gs_handle); |
|||
|
|||
return 1; |
|||
} |
|||
|
|||
/* set multiplex ratio */ |
|||
res = ssd1306_set_multiplex_ratio(&gs_handle, SSD1306_BASIC_DEFAULT_MULTIPLEX_RATIO); |
|||
if (res != 0) |
|||
{ |
|||
ssd1306_interface_debug_print("ssd1306: set multiplex ratio failed.\n"); |
|||
(void)ssd1306_deinit(&gs_handle); |
|||
|
|||
return 1; |
|||
} |
|||
|
|||
/* set display offset */ |
|||
res = ssd1306_set_display_offset(&gs_handle, SSD1306_BASIC_DEFAULT_DISPLAY_OFFSET); |
|||
if (res != 0) |
|||
{ |
|||
ssd1306_interface_debug_print("ssd1306: set display offset failed.\n"); |
|||
(void)ssd1306_deinit(&gs_handle); |
|||
|
|||
return 1; |
|||
} |
|||
|
|||
/* set display clock */ |
|||
res = ssd1306_set_display_clock(&gs_handle, SSD1306_BASIC_DEFAULT_OSCILLATOR_FREQUENCY, SSD1306_BASIC_DEFAULT_CLOCK_DIVIDE); |
|||
if (res != 0) |
|||
{ |
|||
ssd1306_interface_debug_print("ssd1306: set display clock failed.\n"); |
|||
(void)ssd1306_deinit(&gs_handle); |
|||
|
|||
return 1; |
|||
} |
|||
|
|||
/* set pre charge period */ |
|||
res = ssd1306_set_precharge_period(&gs_handle, SSD1306_BASIC_DEFAULT_PHASE1_PERIOD, SSD1306_BASIC_DEFAULT_PHASE2_PERIOD); |
|||
if (res != 0) |
|||
{ |
|||
ssd1306_interface_debug_print("ssd1306: set pre charge period failed.\n"); |
|||
(void)ssd1306_deinit(&gs_handle); |
|||
|
|||
return 1; |
|||
} |
|||
|
|||
/* set hardware pins conf */ |
|||
res = ssd1306_set_com_pins_hardware_conf(&gs_handle, SSD1306_BASIC_DEFAULT_PIN_CONF, SSD1306_BASIC_DEFAULT_LEFT_RIGHT_REMAP); |
|||
if (res != 0) |
|||
{ |
|||
ssd1306_interface_debug_print("ssd1306: set com pins hardware conf failed.\n"); |
|||
(void)ssd1306_deinit(&gs_handle); |
|||
|
|||
return 1; |
|||
} |
|||
|
|||
/* set deselect level 0.77 */ |
|||
res = ssd1306_set_deselect_level(&gs_handle, SSD1306_BASIC_DEFAULT_DESELECT_LEVEL); |
|||
if (res != 0) |
|||
{ |
|||
ssd1306_interface_debug_print("ssd1306: set deselect level failed.\n"); |
|||
(void)ssd1306_deinit(&gs_handle); |
|||
|
|||
return 1; |
|||
} |
|||
|
|||
/* set page memory addressing mode */ |
|||
res = ssd1306_set_memory_addressing_mode(&gs_handle, SSD1306_MEMORY_ADDRESSING_MODE_PAGE); |
|||
if (res != 0) |
|||
{ |
|||
ssd1306_interface_debug_print("ssd1306: set memory addressing level failed.\n"); |
|||
(void)ssd1306_deinit(&gs_handle); |
|||
|
|||
return 1; |
|||
} |
|||
|
|||
/* enable charge pump */ |
|||
res = ssd1306_set_charge_pump(&gs_handle, SSD1306_CHARGE_PUMP_ENABLE); |
|||
if (res != 0) |
|||
{ |
|||
ssd1306_interface_debug_print("ssd1306: set charge pump failed.\n"); |
|||
(void)ssd1306_deinit(&gs_handle); |
|||
|
|||
return 1; |
|||
} |
|||
|
|||
/* entire display off */ |
|||
res = ssd1306_set_entire_display(&gs_handle, SSD1306_ENTIRE_DISPLAY_OFF); |
|||
if (res != 0) |
|||
{ |
|||
ssd1306_interface_debug_print("ssd1306: set entire display failed.\n"); |
|||
(void)ssd1306_deinit(&gs_handle); |
|||
|
|||
return 1; |
|||
} |
|||
|
|||
/* enable display */ |
|||
res = ssd1306_set_display(&gs_handle, SSD1306_DISPLAY_ON); |
|||
if (res != 0) |
|||
{ |
|||
ssd1306_interface_debug_print("ssd1306: set display failed.\n"); |
|||
(void)ssd1306_deinit(&gs_handle); |
|||
|
|||
return 1; |
|||
} |
|||
|
|||
/* clear screen */ |
|||
res = ssd1306_clear(&gs_handle); |
|||
if (res != 0) |
|||
{ |
|||
ssd1306_interface_debug_print("ssd1306: clear failed.\n"); |
|||
(void)ssd1306_deinit(&gs_handle); |
|||
|
|||
return 1; |
|||
} |
|||
|
|||
return 0; |
|||
} |
|||
|
|||
/** |
|||
* @brief basic example deinit |
|||
* @return status code |
|||
* - 0 success |
|||
* - 1 deinit failed |
|||
* @note none |
|||
*/ |
|||
uint8_t ssd1306_basic_deinit(void) |
|||
{ |
|||
/* deinit ssd1306 */ |
|||
if (ssd1306_deinit(&gs_handle) != 0) |
|||
{ |
|||
return 1; |
|||
} |
|||
else |
|||
{ |
|||
return 0; |
|||
} |
|||
} |
|||
|
|||
/** |
|||
* @brief basic example display on |
|||
* @return status code |
|||
* - 0 success |
|||
* - 1 display on failed |
|||
* @note none |
|||
*/ |
|||
uint8_t ssd1306_basic_display_on(void) |
|||
{ |
|||
uint8_t res; |
|||
|
|||
/* display on */ |
|||
res = ssd1306_set_display(&gs_handle, SSD1306_DISPLAY_ON); |
|||
if (res != 0) |
|||
{ |
|||
return 1; |
|||
} |
|||
else |
|||
{ |
|||
return 0; |
|||
} |
|||
} |
|||
|
|||
/** |
|||
* @brief basic example display off |
|||
* @return status code |
|||
* - 0 success |
|||
* - 1 display off failed |
|||
* @note none |
|||
*/ |
|||
uint8_t ssd1306_basic_display_off(void) |
|||
{ |
|||
uint8_t res; |
|||
|
|||
/* display off */ |
|||
res = ssd1306_set_display(&gs_handle, SSD1306_DISPLAY_OFF); |
|||
if (res != 0) |
|||
{ |
|||
return 1; |
|||
} |
|||
else |
|||
{ |
|||
return 0; |
|||
} |
|||
} |
|||
|
|||
/** |
|||
* @brief basic example clear |
|||
* @return status code |
|||
* - 0 success |
|||
* - 1 clear failed |
|||
* @note none |
|||
*/ |
|||
uint8_t ssd1306_basic_clear(void) |
|||
{ |
|||
/* clear */ |
|||
if (ssd1306_clear(&gs_handle) != 0) |
|||
{ |
|||
return 1; |
|||
} |
|||
else |
|||
{ |
|||
return 0; |
|||
} |
|||
} |
|||
|
|||
/** |
|||
* @brief basic example write a point |
|||
* @param[in] x is the coordinate x |
|||
* @param[in] y is the coordinate y |
|||
* @param[in] data is the written data |
|||
* @return status code |
|||
* - 0 success |
|||
* - 1 write point failed |
|||
* @note none |
|||
*/ |
|||
uint8_t ssd1306_basic_write_point(uint8_t x, uint8_t y, uint8_t data) |
|||
{ |
|||
uint8_t res; |
|||
|
|||
/* write point */ |
|||
res = ssd1306_write_point(&gs_handle, x, y, data); |
|||
if (res != 0) |
|||
{ |
|||
return 1; |
|||
} |
|||
|
|||
return 0; |
|||
} |
|||
|
|||
/** |
|||
* @brief basic example read a point |
|||
* @param[in] x is the coordinate x |
|||
* @param[in] y is the coordinate y |
|||
* @param[out] *data points to a data buffer |
|||
* @return status code |
|||
* - 0 success |
|||
* - 1 read point failed |
|||
* @note none |
|||
*/ |
|||
uint8_t ssd1306_basic_read_point(uint8_t x, uint8_t y, uint8_t *data) |
|||
{ |
|||
uint8_t res; |
|||
|
|||
/* read point in gram */ |
|||
res = ssd1306_read_point(&gs_handle, x, y, data); |
|||
if (res != 0) |
|||
{ |
|||
return 1; |
|||
} |
|||
|
|||
return 0; |
|||
} |
|||
|
|||
/** |
|||
* @brief basic example draw a string |
|||
* @param[in] x is the coordinate x |
|||
* @param[in] y is the coordinate y |
|||
* @param[in] *str points to a written string address |
|||
* @param[in] len is the length of the string |
|||
* @param[in] color is the display color |
|||
* @param[in] font is the display font size |
|||
* @return status code |
|||
* - 0 success |
|||
* - 1 write string failed |
|||
* @note none |
|||
*/ |
|||
uint8_t ssd1306_basic_string(uint8_t x, uint8_t y, char *str, uint16_t len, uint8_t color, ssd1306_font_t font) |
|||
{ |
|||
uint8_t res; |
|||
|
|||
/* write string in gram */ |
|||
res = ssd1306_gram_write_string(&gs_handle, x, y, str, len, color, font); |
|||
if (res != 0) |
|||
{ |
|||
return 1; |
|||
} |
|||
|
|||
/* update gram */ |
|||
if (ssd1306_gram_update(&gs_handle) != 0) |
|||
{ |
|||
return 1; |
|||
} |
|||
else |
|||
{ |
|||
return 0; |
|||
} |
|||
} |
|||
|
|||
/** |
|||
* @brief basic example fill a rectangle |
|||
* @param[in] left is the left coordinate x |
|||
* @param[in] top is the top coordinate y |
|||
* @param[in] right is the right coordinate x |
|||
* @param[in] bottom is the bottom coordinate y |
|||
* @param[in] color is the display color |
|||
* @return status code |
|||
* - 0 success |
|||
* - 1 fill rect failed |
|||
* @note none |
|||
*/ |
|||
uint8_t ssd1306_basic_rect(uint8_t left, uint8_t top, uint8_t right, uint8_t bottom, uint8_t color) |
|||
{ |
|||
uint8_t res; |
|||
|
|||
/* fill rect in gram */ |
|||
res = ssd1306_gram_fill_rect(&gs_handle, left, top, right, bottom, color); |
|||
if (res != 0) |
|||
{ |
|||
return 1; |
|||
} |
|||
|
|||
/* update gram */ |
|||
if (ssd1306_gram_update(&gs_handle) != 0) |
|||
{ |
|||
return 1; |
|||
} |
|||
else |
|||
{ |
|||
return 0; |
|||
} |
|||
} |
|||
|
|||
/** |
|||
* @brief basic example draw a picture |
|||
* @param[in] left is the left coordinate x |
|||
* @param[in] top is the top coordinate y |
|||
* @param[in] right is the right coordinate x |
|||
* @param[in] bottom is the bottom coordinate y |
|||
* @param[in] *img points to a image buffer |
|||
* @return status code |
|||
* - 0 success |
|||
* - 1 draw picture failed |
|||
* @note none |
|||
*/ |
|||
uint8_t ssd1306_basic_picture(uint8_t left, uint8_t top, uint8_t right, uint8_t bottom, uint8_t *img) |
|||
{ |
|||
uint8_t res; |
|||
|
|||
/* draw picture in gram */ |
|||
res = ssd1306_gram_draw_picture(&gs_handle, left, top, right, bottom, img); |
|||
if (res != 0) |
|||
{ |
|||
return 1; |
|||
} |
|||
|
|||
/* update gram */ |
|||
if (ssd1306_gram_update(&gs_handle) != 0) |
|||
{ |
|||
return 1; |
|||
} |
|||
else |
|||
{ |
|||
return 0; |
|||
} |
|||
} |
@ -0,0 +1,203 @@ |
|||
/** |
|||
* Copyright (c) 2015 - present LibDriver All rights reserved |
|||
* |
|||
* The MIT License (MIT) |
|||
* |
|||
* Permission is hereby granted, free of charge, to any person obtaining a copy |
|||
* of this software and associated documentation files (the "Software"), to deal |
|||
* in the Software without restriction, including without limitation the rights |
|||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
|||
* copies of the Software, and to permit persons to whom the Software is |
|||
* furnished to do so, subject to the following conditions: |
|||
* |
|||
* The above copyright notice and this permission notice shall be included in all |
|||
* copies or substantial portions of the Software. |
|||
* |
|||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
|||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
|||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
|||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
|||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
|||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE |
|||
* SOFTWARE. |
|||
* |
|||
* @file driver_ssd1306_basic.h |
|||
* @brief driver ssd1306 basic header file |
|||
* @version 2.0.0 |
|||
* @author Shifeng Li |
|||
* @date 2021-03-30 |
|||
* |
|||
* <h3>history</h3> |
|||
* <table> |
|||
* <tr><th>Date <th>Version <th>Author <th>Description |
|||
* <tr><td>2021/03/30 <td>2.0 <td>Shifeng Li <td>format the code |
|||
* <tr><td>2020/12/10 <td>1.0 <td>Shifeng Li <td>first upload |
|||
* </table> |
|||
*/ |
|||
|
|||
#ifndef DRIVER_SSD1306_BASIC_H |
|||
#define DRIVER_SSD1306_BASIC_H |
|||
|
|||
#include "driver_ssd1306_interface.h" |
|||
|
|||
#ifdef __cplusplus |
|||
extern "C"{ |
|||
#endif |
|||
|
|||
/** |
|||
* @defgroup ssd1306_example_driver ssd1306 example driver function |
|||
* @brief ssd1306 example driver modules |
|||
* @ingroup ssd1306_driver |
|||
* @{ |
|||
*/ |
|||
|
|||
/** |
|||
* @brief ssd1306 basic example default definition |
|||
*/ |
|||
#define SSD1306_BASIC_DEFAULT_DESELECT_LEVEL SSD1306_DESELECT_LEVEL_0P77 /**< set deselect level 0.77 */ |
|||
#define SSD1306_BASIC_DEFAULT_LEFT_RIGHT_REMAP SSD1306_LEFT_RIGHT_REMAP_DISABLE /**< disable remap */ |
|||
#define SSD1306_BASIC_DEFAULT_PIN_CONF SSD1306_PIN_CONF_ALTERNATIVE /**< set alternative */ |
|||
#define SSD1306_BASIC_DEFAULT_PHASE1_PERIOD 0x01 /**< set phase 1 */ |
|||
#define SSD1306_BASIC_DEFAULT_PHASE2_PERIOD 0x0F /**< set phase F */ |
|||
#define SSD1306_BASIC_DEFAULT_OSCILLATOR_FREQUENCY 0x08 /**< set 8 */ |
|||
#define SSD1306_BASIC_DEFAULT_CLOCK_DIVIDE 0x00 /**< set clock div 0 */ |
|||
#define SSD1306_BASIC_DEFAULT_DISPLAY_OFFSET 0x00 /**< set display offset */ |
|||
#define SSD1306_BASIC_DEFAULT_MULTIPLEX_RATIO 0x3F /**< set ratio */ |
|||
#define SSD1306_BASIC_DEFAULT_DISPLAY_MODE SSD1306_DISPLAY_MODE_NORMAL /**< set normal mode */ |
|||
#define SSD1306_BASIC_DEFAULT_SCAN_DIRECTION SSD1306_SCAN_DIRECTION_COMN_1_START /**< set scan 1 */ |
|||
#define SSD1306_BASIC_DEFAULT_SEGMENT SSD1306_SEGMENT_COLUMN_ADDRESS_127 /**< set column 127 */ |
|||
#define SSD1306_BASIC_DEFAULT_CONTRAST 0xCF /**< set contrast CF */ |
|||
#define SSD1306_BASIC_DEFAULT_ZOOM_IN SSD1306_ZOOM_IN_DISABLE /**< disable zoom in */ |
|||
#define SSD1306_BASIC_DEFAULT_FADE_BLINKING_MODE SSD1306_FADE_BLINKING_MODE_DISABLE /**< disable fade */ |
|||
#define SSD1306_BASIC_DEFAULT_FADE_FRAMES 0x00 /**< set frame 0 */ |
|||
#define SSD1306_BASIC_DEFAULT_DISPLAY_START_LINE 0x00 /**< set start line 0 */ |
|||
#define SSD1306_BASIC_DEFAULT_HIGH_COLUMN_START_ADDRESS 0x00 /**< set high start 0 */ |
|||
#define SSD1306_BASIC_DEFAULT_LOW_COLUMN_START_ADDRESS 0x00 /**< set low start 0 */ |
|||
#define SSD1306_BASIC_DEFAULT_PAGE_ADDRESS_RANGE_START 0x00 /**< set page range start */ |
|||
#define SSD1306_BASIC_DEFAULT_PAGE_ADDRESS_RANGE_END 0x07 /**< set page range end */ |
|||
#define SSD1306_BASIC_DEFAULT_COLUMN_ADDRESS_RANGE_START 0x00 /**< set range start */ |
|||
#define SSD1306_BASIC_DEFAULT_COLUMN_ADDRESS_RANGE_END 0x7F /**< set range end */ |
|||
|
|||
/** |
|||
* @brief basic example init |
|||
* @param[in] interface is the interface type |
|||
* @param[in] addr is the iic device address |
|||
* @return status code |
|||
* - 0 success |
|||
* - 1 init failed |
|||
* @note none |
|||
*/ |
|||
uint8_t ssd1306_basic_init(ssd1306_interface_t interface, ssd1306_address_t addr); |
|||
|
|||
/** |
|||
* @brief basic example deinit |
|||
* @return status code |
|||
* - 0 success |
|||
* - 1 deinit failed |
|||
* @note none |
|||
*/ |
|||
uint8_t ssd1306_basic_deinit(void); |
|||
|
|||
/** |
|||
* @brief basic example display on |
|||
* @return status code |
|||
* - 0 success |
|||
* - 1 display on failed |
|||
* @note none |
|||
*/ |
|||
uint8_t ssd1306_basic_display_on(void); |
|||
|
|||
/** |
|||
* @brief basic example display off |
|||
* @return status code |
|||
* - 0 success |
|||
* - 1 display off failed |
|||
* @note none |
|||
*/ |
|||
uint8_t ssd1306_basic_display_off(void); |
|||
|
|||
/** |
|||
* @brief basic example clear |
|||
* @return status code |
|||
* - 0 success |
|||
* - 1 clear failed |
|||
* @note none |
|||
*/ |
|||
uint8_t ssd1306_basic_clear(void); |
|||
|
|||
/** |
|||
* @brief basic example write a point |
|||
* @param[in] x is the coordinate x |
|||
* @param[in] y is the coordinate y |
|||
* @param[in] data is the written data |
|||
* @return status code |
|||
* - 0 success |
|||
* - 1 write point failed |
|||
* @note none |
|||
*/ |
|||
uint8_t ssd1306_basic_write_point(uint8_t x, uint8_t y, uint8_t data); |
|||
|
|||
/** |
|||
* @brief basic example read a point |
|||
* @param[in] x is the coordinate x |
|||
* @param[in] y is the coordinate y |
|||
* @param[out] *data points to a data buffer |
|||
* @return status code |
|||
* - 0 success |
|||
* - 1 read point failed |
|||
* @note none |
|||
*/ |
|||
uint8_t ssd1306_basic_read_point(uint8_t x, uint8_t y, uint8_t *data); |
|||
|
|||
/** |
|||
* @brief basic example draw a string |
|||
* @param[in] x is the coordinate x |
|||
* @param[in] y is the coordinate y |
|||
* @param[in] *str points to a written string address |
|||
* @param[in] len is the length of the string |
|||
* @param[in] color is the display color |
|||
* @param[in] font is the display font size |
|||
* @return status code |
|||
* - 0 success |
|||
* - 1 write string failed |
|||
* @note none |
|||
*/ |
|||
uint8_t ssd1306_basic_string(uint8_t x, uint8_t y, char *str, uint16_t len, uint8_t color, ssd1306_font_t font); |
|||
|
|||
/** |
|||
* @brief basic example fill a rectangle |
|||
* @param[in] left is the left coordinate x |
|||
* @param[in] top is the top coordinate y |
|||
* @param[in] right is the right coordinate x |
|||
* @param[in] bottom is the bottom coordinate y |
|||
* @param[in] color is the display color |
|||
* @return status code |
|||
* - 0 success |
|||
* - 1 fill rect failed |
|||
* @note none |
|||
*/ |
|||
uint8_t ssd1306_basic_rect(uint8_t left, uint8_t top, uint8_t right, uint8_t bottom, uint8_t color); |
|||
|
|||
/** |
|||
* @brief basic example draw a picture |
|||
* @param[in] left is the left coordinate x |
|||
* @param[in] top is the top coordinate y |
|||
* @param[in] right is the right coordinate x |
|||
* @param[in] bottom is the bottom coordinate y |
|||
* @param[in] *img points to a image buffer |
|||
* @return status code |
|||
* - 0 success |
|||
* - 1 draw picture failed |
|||
* @note none |
|||
*/ |
|||
uint8_t ssd1306_basic_picture(uint8_t left, uint8_t top, uint8_t right, uint8_t bottom, uint8_t *img); |
|||
|
|||
/** |
|||
* @} |
|||
*/ |
|||
|
|||
#ifdef __cplusplus |
|||
} |
|||
#endif |
|||
|
|||
#endif |
@ -0,0 +1,350 @@ |
|||
/** |
|||
* Copyright (c) 2015 - present LibDriver All rights reserved |
|||
* |
|||
* The MIT License (MIT) |
|||
* |
|||
* Permission is hereby granted, free of charge, to any person obtaining a copy |
|||
* of this software and associated documentation files (the "Software"), to deal |
|||
* in the Software without restriction, including without limitation the rights |
|||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
|||
* copies of the Software, and to permit persons to whom the Software is |
|||
* furnished to do so, subject to the following conditions: |
|||
* |
|||
* The above copyright notice and this permission notice shall be included in all |
|||
* copies or substantial portions of the Software. |
|||
* |
|||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
|||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
|||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
|||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
|||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
|||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE |
|||
* SOFTWARE. |
|||
* |
|||
* @file driver_ssd1306_font.h |
|||
* @brief driver ssd1306 font header file |
|||
* @version 2.0.0 |
|||
* @author Shifeng Li |
|||
* @date 2021-03-30 |
|||
* |
|||
* <h3>history</h3> |
|||
* <table> |
|||
* <tr><th>Date <th>Version <th>Author <th>Description |
|||
* <tr><td>2021/03/30 <td>2.0 <td>Shifeng Li <td>format the code |
|||
* <tr><td>2020/12/10 <td>1.0 <td>Shifeng Li <td>first upload |
|||
* </table> |
|||
*/ |
|||
|
|||
#ifndef DRIVER_SSD1306_FONT_H |
|||
#define DRIVER_SSD1306_FONT_H |
|||
|
|||
#include <stdint.h> |
|||
#include <stdio.h> |
|||
#include <string.h> |
|||
|
|||
#ifdef __cplusplus |
|||
extern "C"{ |
|||
#endif |
|||
|
|||
static const uint8_t gsc_ssd1306_ascii_1206[95][12] = |
|||
{ |
|||
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, /*" ", 0*/ |
|||
{0x00, 0x00, 0x00, 0x00, 0x3F, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, /*"!", 1*/ |
|||
{0x00, 0x00, 0x30, 0x00, 0x40, 0x00, 0x30, 0x00, 0x40, 0x00, 0x00, 0x00}, /*""", 2*/ |
|||
{0x09, 0x00, 0x0B, 0xC0, 0x3D, 0x00, 0x0B, 0xC0, 0x3D, 0x00, 0x09, 0x00}, /*"#", 3*/ |
|||
{0x18, 0xC0, 0x24, 0x40, 0x7F, 0xE0, 0x22, 0x40, 0x31, 0x80, 0x00, 0x00}, /*"$", 4*/ |
|||
{0x18, 0x00, 0x24, 0xC0, 0x1B, 0x00, 0x0D, 0x80, 0x32, 0x40, 0x01, 0x80}, /*"%", 5*/ |
|||
{0x03, 0x80, 0x1C, 0x40, 0x27, 0x40, 0x1C, 0x80, 0x07, 0x40, 0x00, 0x40}, /*"&", 6*/ |
|||
{0x10, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, /*"'", 7*/ |
|||
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x80, 0x20, 0x40, 0x40, 0x20}, /*"(", 8*/ |
|||
{0x00, 0x00, 0x40, 0x20, 0x20, 0x40, 0x1F, 0x80, 0x00, 0x00, 0x00, 0x00}, /*")", 9*/ |
|||
{0x09, 0x00, 0x06, 0x00, 0x1F, 0x80, 0x06, 0x00, 0x09, 0x00, 0x00, 0x00}, /*"*", 10*/ |
|||
{0x04, 0x00, 0x04, 0x00, 0x3F, 0x80, 0x04, 0x00, 0x04, 0x00, 0x00, 0x00}, /*"+", 11*/ |
|||
{0x00, 0x10, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, /*", ", 12*/ |
|||
{0x04, 0x00, 0x04, 0x00, 0x04, 0x00, 0x04, 0x00, 0x04, 0x00, 0x00, 0x00}, /*"-", 13*/ |
|||
{0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, /*".", 14*/ |
|||
{0x00, 0x20, 0x01, 0xC0, 0x06, 0x00, 0x38, 0x00, 0x40, 0x00, 0x00, 0x00}, /*"/", 15*/ |
|||
{0x1F, 0x80, 0x20, 0x40, 0x20, 0x40, 0x20, 0x40, 0x1F, 0x80, 0x00, 0x00}, /*"0", 16*/ |
|||
{0x00, 0x00, 0x10, 0x40, 0x3F, 0xC0, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00}, /*"1", 17*/ |
|||
{0x18, 0xC0, 0x21, 0x40, 0x22, 0x40, 0x24, 0x40, 0x18, 0x40, 0x00, 0x00}, /*"2", 18*/ |
|||
{0x10, 0x80, 0x20, 0x40, 0x24, 0x40, 0x24, 0x40, 0x1B, 0x80, 0x00, 0x00}, /*"3", 19*/ |
|||
{0x02, 0x00, 0x0D, 0x00, 0x11, 0x00, 0x3F, 0xC0, 0x01, 0x40, 0x00, 0x00}, /*"4", 20*/ |
|||
{0x3C, 0x80, 0x24, 0x40, 0x24, 0x40, 0x24, 0x40, 0x23, 0x80, 0x00, 0x00}, /*"5", 21*/ |
|||
{0x1F, 0x80, 0x24, 0x40, 0x24, 0x40, 0x34, 0x40, 0x03, 0x80, 0x00, 0x00}, /*"6", 22*/ |
|||
{0x30, 0x00, 0x20, 0x00, 0x27, 0xC0, 0x38, 0x00, 0x20, 0x00, 0x00, 0x00}, /*"7", 23*/ |
|||
{0x1B, 0x80, 0x24, 0x40, 0x24, 0x40, 0x24, 0x40, 0x1B, 0x80, 0x00, 0x00}, /*"8", 24*/ |
|||
{0x1C, 0x00, 0x22, 0xC0, 0x22, 0x40, 0x22, 0x40, 0x1F, 0x80, 0x00, 0x00}, /*"9", 25*/ |
|||
{0x00, 0x00, 0x00, 0x00, 0x08, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, /*":", 26*/ |
|||
{0x00, 0x00, 0x00, 0x00, 0x04, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, /*";", 27*/ |
|||
{0x00, 0x00, 0x04, 0x00, 0x0A, 0x00, 0x11, 0x00, 0x20, 0x80, 0x40, 0x40}, /*"<", 28*/ |
|||
{0x09, 0x00, 0x09, 0x00, 0x09, 0x00, 0x09, 0x00, 0x09, 0x00, 0x00, 0x00}, /*"=", 29*/ |
|||
{0x00, 0x00, 0x40, 0x40, 0x20, 0x80, 0x11, 0x00, 0x0A, 0x00, 0x04, 0x00}, /*">", 30*/ |
|||
{0x18, 0x00, 0x20, 0x00, 0x23, 0x40, 0x24, 0x00, 0x18, 0x00, 0x00, 0x00}, /*"?", 31*/ |
|||
{0x1F, 0x80, 0x20, 0x40, 0x27, 0x40, 0x29, 0x40, 0x1F, 0x40, 0x00, 0x00}, /*"@", 32*/ |
|||
{0x00, 0x40, 0x07, 0xC0, 0x39, 0x00, 0x0F, 0x00, 0x01, 0xC0, 0x00, 0x40}, /*"A", 33*/ |
|||
{0x20, 0x40, 0x3F, 0xC0, 0x24, 0x40, 0x24, 0x40, 0x1B, 0x80, 0x00, 0x00}, /*"B", 34*/ |
|||
{0x1F, 0x80, 0x20, 0x40, 0x20, 0x40, 0x20, 0x40, 0x30, 0x80, 0x00, 0x00}, /*"C", 35*/ |
|||
{0x20, 0x40, 0x3F, 0xC0, 0x20, 0x40, 0x20, 0x40, 0x1F, 0x80, 0x00, 0x00}, /*"D", 36*/ |
|||
{0x20, 0x40, 0x3F, 0xC0, 0x24, 0x40, 0x2E, 0x40, 0x30, 0xC0, 0x00, 0x00}, /*"E", 37*/ |
|||
{0x20, 0x40, 0x3F, 0xC0, 0x24, 0x40, 0x2E, 0x00, 0x30, 0x00, 0x00, 0x00}, /*"F", 38*/ |
|||
{0x0F, 0x00, 0x10, 0x80, 0x20, 0x40, 0x22, 0x40, 0x33, 0x80, 0x02, 0x00}, /*"G", 39*/ |
|||
{0x20, 0x40, 0x3F, 0xC0, 0x04, 0x00, 0x04, 0x00, 0x3F, 0xC0, 0x20, 0x40}, /*"H", 40*/ |
|||
{0x20, 0x40, 0x20, 0x40, 0x3F, 0xC0, 0x20, 0x40, 0x20, 0x40, 0x00, 0x00}, /*"I", 41*/ |
|||
{0x00, 0x60, 0x20, 0x20, 0x20, 0x20, 0x3F, 0xC0, 0x20, 0x00, 0x20, 0x00}, /*"J", 42*/ |
|||
{0x20, 0x40, 0x3F, 0xC0, 0x24, 0x40, 0x0B, 0x00, 0x30, 0xC0, 0x20, 0x40}, /*"K", 43*/ |
|||
{0x20, 0x40, 0x3F, 0xC0, 0x20, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0xC0}, /*"L", 44*/ |
|||
{0x3F, 0xC0, 0x3C, 0x00, 0x03, 0xC0, 0x3C, 0x00, 0x3F, 0xC0, 0x00, 0x00}, /*"M", 45*/ |
|||
{0x20, 0x40, 0x3F, 0xC0, 0x0C, 0x40, 0x23, 0x00, 0x3F, 0xC0, 0x20, 0x00}, /*"N", 46*/ |
|||
{0x1F, 0x80, 0x20, 0x40, 0x20, 0x40, 0x20, 0x40, 0x1F, 0x80, 0x00, 0x00}, /*"O", 47*/ |
|||
{0x20, 0x40, 0x3F, 0xC0, 0x24, 0x40, 0x24, 0x00, 0x18, 0x00, 0x00, 0x00}, /*"P", 48*/ |
|||
{0x1F, 0x80, 0x21, 0x40, 0x21, 0x40, 0x20, 0xE0, 0x1F, 0xA0, 0x00, 0x00}, /*"Q", 49*/ |
|||
{0x20, 0x40, 0x3F, 0xC0, 0x24, 0x40, 0x26, 0x00, 0x19, 0xC0, 0x00, 0x40}, /*"R", 50*/ |
|||
{0x18, 0xC0, 0x24, 0x40, 0x24, 0x40, 0x22, 0x40, 0x31, 0x80, 0x00, 0x00}, /*"S", 51*/ |
|||
{0x30, 0x00, 0x20, 0x40, 0x3F, 0xC0, 0x20, 0x40, 0x30, 0x00, 0x00, 0x00}, /*"T", 52*/ |
|||
{0x20, 0x00, 0x3F, 0x80, 0x00, 0x40, 0x00, 0x40, 0x3F, 0x80, 0x20, 0x00}, /*"U", 53*/ |
|||
{0x20, 0x00, 0x3E, 0x00, 0x01, 0xC0, 0x07, 0x00, 0x38, 0x00, 0x20, 0x00}, /*"V", 54*/ |
|||
{0x38, 0x00, 0x07, 0xC0, 0x3C, 0x00, 0x07, 0xC0, 0x38, 0x00, 0x00, 0x00}, /*"W", 55*/ |
|||
{0x20, 0x40, 0x39, 0xC0, 0x06, 0x00, 0x39, 0xC0, 0x20, 0x40, 0x00, 0x00}, /*"X", 56*/ |
|||
{0x20, 0x00, 0x38, 0x40, 0x07, 0xC0, 0x38, 0x40, 0x20, 0x00, 0x00, 0x00}, /*"Y", 57*/ |
|||
{0x30, 0x40, 0x21, 0xC0, 0x26, 0x40, 0x38, 0x40, 0x20, 0xC0, 0x00, 0x00}, /*"Z", 58*/ |
|||
{0x00, 0x00, 0x00, 0x00, 0x7F, 0xE0, 0x40, 0x20, 0x40, 0x20, 0x00, 0x00}, /*"[", 59*/ |
|||
{0x00, 0x00, 0x70, 0x00, 0x0C, 0x00, 0x03, 0x80, 0x00, 0x40, 0x00, 0x00}, /*"\", 60*/ |
|||
{0x00, 0x00, 0x40, 0x20, 0x40, 0x20, 0x7F, 0xE0, 0x00, 0x00, 0x00, 0x00}, /*"]", 61*/ |
|||
{0x00, 0x00, 0x20, 0x00, 0x40, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00}, /*"^", 62*/ |
|||
{0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10}, /*"_", 63*/ |
|||
{0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, /*"`", 64*/ |
|||
{0x00, 0x00, 0x02, 0x80, 0x05, 0x40, 0x05, 0x40, 0x03, 0xC0, 0x00, 0x40}, /*"a", 65*/ |
|||
{0x20, 0x00, 0x3F, 0xC0, 0x04, 0x40, 0x04, 0x40, 0x03, 0x80, 0x00, 0x00}, /*"b", 66*/ |
|||
{0x00, 0x00, 0x03, 0x80, 0x04, 0x40, 0x04, 0x40, 0x06, 0x40, 0x00, 0x00}, /*"c", 67*/ |
|||
{0x00, 0x00, 0x03, 0x80, 0x04, 0x40, 0x24, 0x40, 0x3F, 0xC0, 0x00, 0x40}, /*"d", 68*/ |
|||
{0x00, 0x00, 0x03, 0x80, 0x05, 0x40, 0x05, 0x40, 0x03, 0x40, 0x00, 0x00}, /*"e", 69*/ |
|||
{0x00, 0x00, 0x04, 0x40, 0x1F, 0xC0, 0x24, 0x40, 0x24, 0x40, 0x20, 0x00}, /*"f", 70*/ |
|||
{0x00, 0x00, 0x02, 0xE0, 0x05, 0x50, 0x05, 0x50, 0x06, 0x50, 0x04, 0x20}, /*"g", 71*/ |
|||
{0x20, 0x40, 0x3F, 0xC0, 0x04, 0x40, 0x04, 0x00, 0x03, 0xC0, 0x00, 0x40}, /*"h", 72*/ |
|||
{0x00, 0x00, 0x04, 0x40, 0x27, 0xC0, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00}, /*"i", 73*/ |
|||
{0x00, 0x10, 0x00, 0x10, 0x04, 0x10, 0x27, 0xE0, 0x00, 0x00, 0x00, 0x00}, /*"j", 74*/ |
|||
{0x20, 0x40, 0x3F, 0xC0, 0x01, 0x40, 0x07, 0x00, 0x04, 0xC0, 0x04, 0x40}, /*"k", 75*/ |
|||
{0x20, 0x40, 0x20, 0x40, 0x3F, 0xC0, 0x00, 0x40, 0x00, 0x40, 0x00, 0x00}, /*"l", 76*/ |
|||
{0x07, 0xC0, 0x04, 0x00, 0x07, 0xC0, 0x04, 0x00, 0x03, 0xC0, 0x00, 0x00}, /*"m", 77*/ |
|||
{0x04, 0x40, 0x07, 0xC0, 0x04, 0x40, 0x04, 0x00, 0x03, 0xC0, 0x00, 0x40}, /*"n", 78*/ |
|||
{0x00, 0x00, 0x03, 0x80, 0x04, 0x40, 0x04, 0x40, 0x03, 0x80, 0x00, 0x00}, /*"o", 79*/ |
|||
{0x04, 0x10, 0x07, 0xF0, 0x04, 0x50, 0x04, 0x40, 0x03, 0x80, 0x00, 0x00}, /*"p", 80*/ |
|||
{0x00, 0x00, 0x03, 0x80, 0x04, 0x40, 0x04, 0x50, 0x07, 0xF0, 0x00, 0x10}, /*"q", 81*/ |
|||
{0x04, 0x40, 0x07, 0xC0, 0x02, 0x40, 0x04, 0x00, 0x04, 0x00, 0x00, 0x00}, /*"r", 82*/ |
|||
{0x00, 0x00, 0x06, 0x40, 0x05, 0x40, 0x05, 0x40, 0x04, 0xC0, 0x00, 0x00}, /*"s", 83*/ |
|||
{0x00, 0x00, 0x04, 0x00, 0x1F, 0x80, 0x04, 0x40, 0x00, 0x40, 0x00, 0x00}, /*"t", 84*/ |
|||
{0x04, 0x00, 0x07, 0x80, 0x00, 0x40, 0x04, 0x40, 0x07, 0xC0, 0x00, 0x40}, /*"u", 85*/ |
|||
{0x04, 0x00, 0x07, 0x00, 0x04, 0xC0, 0x01, 0x80, 0x06, 0x00, 0x04, 0x00}, /*"v", 86*/ |
|||
{0x06, 0x00, 0x01, 0xC0, 0x07, 0x00, 0x01, 0xC0, 0x06, 0x00, 0x00, 0x00}, /*"w", 87*/ |
|||
{0x04, 0x40, 0x06, 0xC0, 0x01, 0x00, 0x06, 0xC0, 0x04, 0x40, 0x00, 0x00}, /*"x", 88*/ |
|||
{0x04, 0x10, 0x07, 0x10, 0x04, 0xE0, 0x01, 0x80, 0x06, 0x00, 0x04, 0x00}, /*"y", 89*/ |
|||
{0x00, 0x00, 0x04, 0x40, 0x05, 0xC0, 0x06, 0x40, 0x04, 0x40, 0x00, 0x00}, /*"z", 90*/ |
|||
{0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x7B, 0xE0, 0x40, 0x20, 0x00, 0x00}, /*"{", 91*/ |
|||
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xF0, 0x00, 0x00, 0x00, 0x00}, /*"|", 92*/ |
|||
{0x00, 0x00, 0x40, 0x20, 0x7B, 0xE0, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00}, /*"}", 93*/ |
|||
{0x40, 0x00, 0x80, 0x00, 0x40, 0x00, 0x20, 0x00, 0x20, 0x00, 0x40, 0x00}, /*"~", 94*/ |
|||
}; |
|||
|
|||
static const uint8_t gsc_ssd1306_ascii_1608[95][16] = |
|||
{ |
|||
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, /*" ", 0*/ |
|||
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1F, 0xCC, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, /*"!", 1*/ |
|||
{0x00, 0x00, 0x08, 0x00, 0x30, 0x00, 0x60, 0x00, 0x08, 0x00, 0x30, 0x00, 0x60, 0x00, 0x00, 0x00}, /*""", 2*/ |
|||
{0x02, 0x20, 0x03, 0xFC, 0x1E, 0x20, 0x02, 0x20, 0x03, 0xFC, 0x1E, 0x20, 0x02, 0x20, 0x00, 0x00}, /*"#", 3*/ |
|||
{0x00, 0x00, 0x0E, 0x18, 0x11, 0x04, 0x3F, 0xFF, 0x10, 0x84, 0x0C, 0x78, 0x00, 0x00, 0x00, 0x00}, /*"$", 4*/ |
|||
{0x0F, 0x00, 0x10, 0x84, 0x0F, 0x38, 0x00, 0xC0, 0x07, 0x78, 0x18, 0x84, 0x00, 0x78, 0x00, 0x00}, /*"%", 5*/ |
|||
{0x00, 0x78, 0x0F, 0x84, 0x10, 0xC4, 0x11, 0x24, 0x0E, 0x98, 0x00, 0xE4, 0x00, 0x84, 0x00, 0x08}, /*"&", 6*/ |
|||
{0x08, 0x00, 0x68, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, /*"'", 7*/ |
|||
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xE0, 0x18, 0x18, 0x20, 0x04, 0x40, 0x02, 0x00, 0x00}, /*"(", 8*/ |
|||
{0x00, 0x00, 0x40, 0x02, 0x20, 0x04, 0x18, 0x18, 0x07, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, /*")", 9*/ |
|||
{0x02, 0x40, 0x02, 0x40, 0x01, 0x80, 0x0F, 0xF0, 0x01, 0x80, 0x02, 0x40, 0x02, 0x40, 0x00, 0x00}, /*"*", 10*/ |
|||
{0x00, 0x80, 0x00, 0x80, 0x00, 0x80, 0x0F, 0xF8, 0x00, 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, 0x00}, /*"+", 11*/ |
|||
{0x00, 0x01, 0x00, 0x0D, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, /*", ", 12*/ |
|||
{0x00, 0x00, 0x00, 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, 0x80}, /*"-", 13*/ |
|||
{0x00, 0x00, 0x00, 0x0C, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, /*".", 14*/ |
|||
{0x00, 0x00, 0x00, 0x06, 0x00, 0x18, 0x00, 0x60, 0x01, 0x80, 0x06, 0x00, 0x18, 0x00, 0x20, 0x00}, /*"/", 15*/ |
|||
{0x00, 0x00, 0x07, 0xF0, 0x08, 0x08, 0x10, 0x04, 0x10, 0x04, 0x08, 0x08, 0x07, 0xF0, 0x00, 0x00}, /*"0", 16*/ |
|||
{0x00, 0x00, 0x08, 0x04, 0x08, 0x04, 0x1F, 0xFC, 0x00, 0x04, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00}, /*"1", 17*/ |
|||
{0x00, 0x00, 0x0E, 0x0C, 0x10, 0x14, 0x10, 0x24, 0x10, 0x44, 0x11, 0x84, 0x0E, 0x0C, 0x00, 0x00}, /*"2", 18*/ |
|||
{0x00, 0x00, 0x0C, 0x18, 0x10, 0x04, 0x11, 0x04, 0x11, 0x04, 0x12, 0x88, 0x0C, 0x70, 0x00, 0x00}, /*"3", 19*/ |
|||
{0x00, 0x00, 0x00, 0xE0, 0x03, 0x20, 0x04, 0x24, 0x08, 0x24, 0x1F, 0xFC, 0x00, 0x24, 0x00, 0x00}, /*"4", 20*/ |
|||
{0x00, 0x00, 0x1F, 0x98, 0x10, 0x84, 0x11, 0x04, 0x11, 0x04, 0x10, 0x88, 0x10, 0x70, 0x00, 0x00}, /*"5", 21*/ |
|||
{0x00, 0x00, 0x07, 0xF0, 0x08, 0x88, 0x11, 0x04, 0x11, 0x04, 0x18, 0x88, 0x00, 0x70, 0x00, 0x00}, /*"6", 22*/ |
|||
{0x00, 0x00, 0x1C, 0x00, 0x10, 0x00, 0x10, 0xFC, 0x13, 0x00, 0x1C, 0x00, 0x10, 0x00, 0x00, 0x00}, /*"7", 23*/ |
|||
{0x00, 0x00, 0x0E, 0x38, 0x11, 0x44, 0x10, 0x84, 0x10, 0x84, 0x11, 0x44, 0x0E, 0x38, 0x00, 0x00}, /*"8", 24*/ |
|||
{0x00, 0x00, 0x07, 0x00, 0x08, 0x8C, 0x10, 0x44, 0x10, 0x44, 0x08, 0x88, 0x07, 0xF0, 0x00, 0x00}, /*"9", 25*/ |
|||
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x0C, 0x03, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, /*":", 26*/ |
|||
{0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, /*";", 27*/ |
|||
{0x00, 0x00, 0x00, 0x80, 0x01, 0x40, 0x02, 0x20, 0x04, 0x10, 0x08, 0x08, 0x10, 0x04, 0x00, 0x00}, /*"<", 28*/ |
|||
{0x02, 0x20, 0x02, 0x20, 0x02, 0x20, 0x02, 0x20, 0x02, 0x20, 0x02, 0x20, 0x02, 0x20, 0x00, 0x00}, /*"=", 29*/ |
|||
{0x00, 0x00, 0x10, 0x04, 0x08, 0x08, 0x04, 0x10, 0x02, 0x20, 0x01, 0x40, 0x00, 0x80, 0x00, 0x00}, /*">", 30*/ |
|||
{0x00, 0x00, 0x0E, 0x00, 0x12, 0x00, 0x10, 0x0C, 0x10, 0x6C, 0x10, 0x80, 0x0F, 0x00, 0x00, 0x00}, /*"?", 31*/ |
|||
{0x03, 0xE0, 0x0C, 0x18, 0x13, 0xE4, 0x14, 0x24, 0x17, 0xC4, 0x08, 0x28, 0x07, 0xD0, 0x00, 0x00}, /*"@", 32*/ |
|||
{0x00, 0x04, 0x00, 0x3C, 0x03, 0xC4, 0x1C, 0x40, 0x07, 0x40, 0x00, 0xE4, 0x00, 0x1C, 0x00, 0x04}, /*"A", 33*/ |
|||
{0x10, 0x04, 0x1F, 0xFC, 0x11, 0x04, 0x11, 0x04, 0x11, 0x04, 0x0E, 0x88, 0x00, 0x70, 0x00, 0x00}, /*"B", 34*/ |
|||
{0x03, 0xE0, 0x0C, 0x18, 0x10, 0x04, 0x10, 0x04, 0x10, 0x04, 0x10, 0x08, 0x1C, 0x10, 0x00, 0x00}, /*"C", 35*/ |
|||
{0x10, 0x04, 0x1F, 0xFC, 0x10, 0x04, 0x10, 0x04, 0x10, 0x04, 0x08, 0x08, 0x07, 0xF0, 0x00, 0x00}, /*"D", 36*/ |
|||
{0x10, 0x04, 0x1F, 0xFC, 0x11, 0x04, 0x11, 0x04, 0x17, 0xC4, 0x10, 0x04, 0x08, 0x18, 0x00, 0x00}, /*"E", 37*/ |
|||
{0x10, 0x04, 0x1F, 0xFC, 0x11, 0x04, 0x11, 0x00, 0x17, 0xC0, 0x10, 0x00, 0x08, 0x00, 0x00, 0x00}, /*"F", 38*/ |
|||
{0x03, 0xE0, 0x0C, 0x18, 0x10, 0x04, 0x10, 0x04, 0x10, 0x44, 0x1C, 0x78, 0x00, 0x40, 0x00, 0x00}, /*"G", 39*/ |
|||
{0x10, 0x04, 0x1F, 0xFC, 0x10, 0x84, 0x00, 0x80, 0x00, 0x80, 0x10, 0x84, 0x1F, 0xFC, 0x10, 0x04}, /*"H", 40*/ |
|||
{0x00, 0x00, 0x10, 0x04, 0x10, 0x04, 0x1F, 0xFC, 0x10, 0x04, 0x10, 0x04, 0x00, 0x00, 0x00, 0x00}, /*"I", 41*/ |
|||
{0x00, 0x03, 0x00, 0x01, 0x10, 0x01, 0x10, 0x01, 0x1F, 0xFE, 0x10, 0x00, 0x10, 0x00, 0x00, 0x00}, /*"J", 42*/ |
|||
{0x10, 0x04, 0x1F, 0xFC, 0x11, 0x04, 0x03, 0x80, 0x14, 0x64, 0x18, 0x1C, 0x10, 0x04, 0x00, 0x00}, /*"K", 43*/ |
|||
{0x10, 0x04, 0x1F, 0xFC, 0x10, 0x04, 0x00, 0x04, 0x00, 0x04, 0x00, 0x04, 0x00, 0x0C, 0x00, 0x00}, /*"L", 44*/ |
|||
{0x10, 0x04, 0x1F, 0xFC, 0x1F, 0x00, 0x00, 0xFC, 0x1F, 0x00, 0x1F, 0xFC, 0x10, 0x04, 0x00, 0x00}, /*"M", 45*/ |
|||
{0x10, 0x04, 0x1F, 0xFC, 0x0C, 0x04, 0x03, 0x00, 0x00, 0xE0, 0x10, 0x18, 0x1F, 0xFC, 0x10, 0x00}, /*"N", 46*/ |
|||
{0x07, 0xF0, 0x08, 0x08, 0x10, 0x04, 0x10, 0x04, 0x10, 0x04, 0x08, 0x08, 0x07, 0xF0, 0x00, 0x00}, /*"O", 47*/ |
|||
{0x10, 0x04, 0x1F, 0xFC, 0x10, 0x84, 0x10, 0x80, 0x10, 0x80, 0x10, 0x80, 0x0F, 0x00, 0x00, 0x00}, /*"P", 48*/ |
|||
{0x07, 0xF0, 0x08, 0x18, 0x10, 0x24, 0x10, 0x24, 0x10, 0x1C, 0x08, 0x0A, 0x07, 0xF2, 0x00, 0x00}, /*"Q", 49*/ |
|||
{0x10, 0x04, 0x1F, 0xFC, 0x11, 0x04, 0x11, 0x00, 0x11, 0xC0, 0x11, 0x30, 0x0E, 0x0C, 0x00, 0x04}, /*"R", 50*/ |
|||
{0x00, 0x00, 0x0E, 0x1C, 0x11, 0x04, 0x10, 0x84, 0x10, 0x84, 0x10, 0x44, 0x1C, 0x38, 0x00, 0x00}, /*"S", 51*/ |
|||
{0x18, 0x00, 0x10, 0x00, 0x10, 0x04, 0x1F, 0xFC, 0x10, 0x04, 0x10, 0x00, 0x18, 0x00, 0x00, 0x00}, /*"T", 52*/ |
|||
{0x10, 0x00, 0x1F, 0xF8, 0x10, 0x04, 0x00, 0x04, 0x00, 0x04, 0x10, 0x04, 0x1F, 0xF8, 0x10, 0x00}, /*"U", 53*/ |
|||
{0x10, 0x00, 0x1E, 0x00, 0x11, 0xE0, 0x00, 0x1C, 0x00, 0x70, 0x13, 0x80, 0x1C, 0x00, 0x10, 0x00}, /*"V", 54*/ |
|||
{0x1F, 0xC0, 0x10, 0x3C, 0x00, 0xE0, 0x1F, 0x00, 0x00, 0xE0, 0x10, 0x3C, 0x1F, 0xC0, 0x00, 0x00}, /*"W", 55*/ |
|||
{0x10, 0x04, 0x18, 0x0C, 0x16, 0x34, 0x01, 0xC0, 0x01, 0xC0, 0x16, 0x34, 0x18, 0x0C, 0x10, 0x04}, /*"X", 56*/ |
|||
{0x10, 0x00, 0x1C, 0x00, 0x13, 0x04, 0x00, 0xFC, 0x13, 0x04, 0x1C, 0x00, 0x10, 0x00, 0x00, 0x00}, /*"Y", 57*/ |
|||
{0x08, 0x04, 0x10, 0x1C, 0x10, 0x64, 0x10, 0x84, 0x13, 0x04, 0x1C, 0x04, 0x10, 0x18, 0x00, 0x00}, /*"Z", 58*/ |
|||
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0xFE, 0x40, 0x02, 0x40, 0x02, 0x40, 0x02, 0x00, 0x00}, /*"[", 59*/ |
|||
{0x00, 0x00, 0x30, 0x00, 0x0C, 0x00, 0x03, 0x80, 0x00, 0x60, 0x00, 0x1C, 0x00, 0x03, 0x00, 0x00}, /*"\", 60*/ |
|||
{0x00, 0x00, 0x40, 0x02, 0x40, 0x02, 0x40, 0x02, 0x7F, 0xFE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, /*"]", 61*/ |
|||
{0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x20, 0x00, 0x00, 0x00}, /*"^", 62*/ |
|||
{0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01}, /*"_", 63*/ |
|||
{0x00, 0x00, 0x40, 0x00, 0x40, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, /*"`", 64*/ |
|||
{0x00, 0x00, 0x00, 0x98, 0x01, 0x24, 0x01, 0x44, 0x01, 0x44, 0x01, 0x44, 0x00, 0xFC, 0x00, 0x04}, /*"a", 65*/ |
|||
{0x10, 0x00, 0x1F, 0xFC, 0x00, 0x88, 0x01, 0x04, 0x01, 0x04, 0x00, 0x88, 0x00, 0x70, 0x00, 0x00}, /*"b", 66*/ |
|||
{0x00, 0x00, 0x00, 0x70, 0x00, 0x88, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x00, 0x88, 0x00, 0x00}, /*"c", 67*/ |
|||
{0x00, 0x00, 0x00, 0x70, 0x00, 0x88, 0x01, 0x04, 0x01, 0x04, 0x11, 0x08, 0x1F, 0xFC, 0x00, 0x04}, /*"d", 68*/ |
|||
{0x00, 0x00, 0x00, 0xF8, 0x01, 0x44, 0x01, 0x44, 0x01, 0x44, 0x01, 0x44, 0x00, 0xC8, 0x00, 0x00}, /*"e", 69*/ |
|||
{0x00, 0x00, 0x01, 0x04, 0x01, 0x04, 0x0F, 0xFC, 0x11, 0x04, 0x11, 0x04, 0x11, 0x00, 0x18, 0x00}, /*"f", 70*/ |
|||
{0x00, 0x00, 0x00, 0xD6, 0x01, 0x29, 0x01, 0x29, 0x01, 0x29, 0x01, 0xC9, 0x01, 0x06, 0x00, 0x00}, /*"g", 71*/ |
|||
{0x10, 0x04, 0x1F, 0xFC, 0x00, 0x84, 0x01, 0x00, 0x01, 0x00, 0x01, 0x04, 0x00, 0xFC, 0x00, 0x04}, /*"h", 72*/ |
|||
{0x00, 0x00, 0x01, 0x04, 0x19, 0x04, 0x19, 0xFC, 0x00, 0x04, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00}, /*"i", 73*/ |
|||
{0x00, 0x00, 0x00, 0x03, 0x00, 0x01, 0x01, 0x01, 0x19, 0x01, 0x19, 0xFE, 0x00, 0x00, 0x00, 0x00}, /*"j", 74*/ |
|||
{0x10, 0x04, 0x1F, 0xFC, 0x00, 0x24, 0x00, 0x40, 0x01, 0xB4, 0x01, 0x0C, 0x01, 0x04, 0x00, 0x00}, /*"k", 75*/ |
|||
{0x00, 0x00, 0x10, 0x04, 0x10, 0x04, 0x1F, 0xFC, 0x00, 0x04, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00}, /*"l", 76*/ |
|||
{0x01, 0x04, 0x01, 0xFC, 0x01, 0x04, 0x01, 0x00, 0x01, 0xFC, 0x01, 0x04, 0x01, 0x00, 0x00, 0xFC}, /*"m", 77*/ |
|||
{0x01, 0x04, 0x01, 0xFC, 0x00, 0x84, 0x01, 0x00, 0x01, 0x00, 0x01, 0x04, 0x00, 0xFC, 0x00, 0x04}, /*"n", 78*/ |
|||
{0x00, 0x00, 0x00, 0xF8, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x00, 0xF8, 0x00, 0x00}, /*"o", 79*/ |
|||
{0x01, 0x01, 0x01, 0xFF, 0x00, 0x85, 0x01, 0x04, 0x01, 0x04, 0x00, 0x88, 0x00, 0x70, 0x00, 0x00}, /*"p", 80*/ |
|||
{0x00, 0x00, 0x00, 0x70, 0x00, 0x88, 0x01, 0x04, 0x01, 0x04, 0x01, 0x05, 0x01, 0xFF, 0x00, 0x01}, /*"q", 81*/ |
|||
{0x01, 0x04, 0x01, 0x04, 0x01, 0xFC, 0x00, 0x84, 0x01, 0x04, 0x01, 0x00, 0x01, 0x80, 0x00, 0x00}, /*"r", 82*/ |
|||
{0x00, 0x00, 0x00, 0xCC, 0x01, 0x24, 0x01, 0x24, 0x01, 0x24, 0x01, 0x24, 0x01, 0x98, 0x00, 0x00}, /*"s", 83*/ |
|||
{0x00, 0x00, 0x01, 0x00, 0x01, 0x00, 0x07, 0xF8, 0x01, 0x04, 0x01, 0x04, 0x00, 0x00, 0x00, 0x00}, /*"t", 84*/ |
|||
{0x01, 0x00, 0x01, 0xF8, 0x00, 0x04, 0x00, 0x04, 0x00, 0x04, 0x01, 0x08, 0x01, 0xFC, 0x00, 0x04}, /*"u", 85*/ |
|||
{0x01, 0x00, 0x01, 0x80, 0x01, 0x70, 0x00, 0x0C, 0x00, 0x10, 0x01, 0x60, 0x01, 0x80, 0x01, 0x00}, /*"v", 86*/ |
|||
{0x01, 0xF0, 0x01, 0x0C, 0x00, 0x30, 0x01, 0xC0, 0x00, 0x30, 0x01, 0x0C, 0x01, 0xF0, 0x01, 0x00}, /*"w", 87*/ |
|||
{0x00, 0x00, 0x01, 0x04, 0x01, 0x8C, 0x00, 0x74, 0x01, 0x70, 0x01, 0x8C, 0x01, 0x04, 0x00, 0x00}, /*"x", 88*/ |
|||
{0x01, 0x01, 0x01, 0x81, 0x01, 0x71, 0x00, 0x0E, 0x00, 0x18, 0x01, 0x60, 0x01, 0x80, 0x01, 0x00}, /*"y", 89*/ |
|||
{0x00, 0x00, 0x01, 0x84, 0x01, 0x0C, 0x01, 0x34, 0x01, 0x44, 0x01, 0x84, 0x01, 0x0C, 0x00, 0x00}, /*"z", 90*/ |
|||
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x3E, 0xFC, 0x40, 0x02, 0x40, 0x02}, /*"{", 91*/ |
|||
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, /*"|", 92*/ |
|||
{0x00, 0x00, 0x40, 0x02, 0x40, 0x02, 0x3E, 0xFC, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, /*"}", 93*/ |
|||
{0x00, 0x00, 0x60, 0x00, 0x80, 0x00, 0x80, 0x00, 0x40, 0x00, 0x40, 0x00, 0x20, 0x00, 0x20, 0x00}, /*"~", 94*/ |
|||
}; |
|||
|
|||
static const uint8_t gsc_ssd1306_ascii_2412[95][36] = |
|||
{ |
|||
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, /*" ", 0*/ |
|||
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0F, 0x80, 0x38, 0x0F, 0xFE, 0x38, 0x0F, 0x80, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, /*"!", 1*/ |
|||
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x06, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x38, 0x00, 0x00, 0x31, 0x00, 0x00, 0x06, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x38, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00}, /*""", 2*/ |
|||
{0x00, 0x00, 0x00, 0x00, 0x61, 0x80, 0x00, 0x67, 0xF8, 0x07, 0xF9, 0x80, 0x00, 0x61, 0x80, 0x00, 0x61, 0x80, 0x00, 0x61, 0x80, 0x00, 0x61, 0x80, 0x00, 0x67, 0xF8, 0x07, 0xF9, 0x80, 0x00, 0x61, 0x80, 0x00, 0x00, 0x00}, /*"#", 3*/ |
|||
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xC0, 0xE0, 0x03, 0xE0, 0xF0, 0x06, 0x30, 0x08, 0x04, 0x18, 0x08, 0x1F, 0xFF, 0xFE, 0x04, 0x0E, 0x08, 0x07, 0x87, 0xF0, 0x03, 0x81, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, /*"$", 4*/ |
|||
{0x01, 0xF0, 0x00, 0x06, 0x0C, 0x00, 0x04, 0x04, 0x08, 0x06, 0x0C, 0x70, 0x01, 0xF9, 0xC0, 0x00, 0x0E, 0x00, 0x00, 0x3B, 0xE0, 0x00, 0xEC, 0x18, 0x07, 0x08, 0x08, 0x04, 0x0C, 0x18, 0x00, 0x03, 0xE0, 0x00, 0x00, 0x00}, /*"%", 5*/ |
|||
{0x00, 0x01, 0xE0, 0x00, 0x07, 0xF0, 0x03, 0xF8, 0x18, 0x04, 0x1C, 0x08, 0x04, 0x17, 0x08, 0x07, 0xE1, 0xD0, 0x03, 0xC0, 0xE0, 0x00, 0x23, 0xB0, 0x00, 0x3C, 0x08, 0x00, 0x20, 0x08, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00}, /*"&", 6*/ |
|||
{0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x31, 0x00, 0x00, 0x32, 0x00, 0x00, 0x1C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, /*"'", 7*/ |
|||
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x00, 0x01, 0xFF, 0xC0, 0x07, 0x80, 0xF0, 0x0C, 0x00, 0x18, 0x10, 0x00, 0x04, 0x20, 0x00, 0x02, 0x00, 0x00, 0x00}, /*"(", 8*/ |
|||
{0x00, 0x00, 0x00, 0x20, 0x00, 0x02, 0x10, 0x00, 0x04, 0x0C, 0x00, 0x18, 0x07, 0x80, 0xF0, 0x01, 0xFF, 0xC0, 0x00, 0x7F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, /*")", 9*/ |
|||
{0x00, 0x00, 0x00, 0x00, 0x42, 0x00, 0x00, 0x66, 0x00, 0x00, 0x66, 0x00, 0x00, 0x3C, 0x00, 0x00, 0x18, 0x00, 0x03, 0xFF, 0xC0, 0x00, 0x18, 0x00, 0x00, 0x3C, 0x00, 0x00, 0x66, 0x00, 0x00, 0x66, 0x00, 0x00, 0x42, 0x00}, /*"*", 10*/ |
|||
{0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x08, 0x00, 0x00, 0x08, 0x00, 0x00, 0x08, 0x00, 0x00, 0x08, 0x00, 0x01, 0xFF, 0xC0, 0x00, 0x08, 0x00, 0x00, 0x08, 0x00, 0x00, 0x08, 0x00, 0x00, 0x08, 0x00, 0x00, 0x08, 0x00}, /*"+", 11*/ |
|||
{0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x31, 0x00, 0x00, 0x32, 0x00, 0x00, 0x1C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, /*", ", 12*/ |
|||
{0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x08, 0x00, 0x00, 0x08, 0x00, 0x00, 0x08, 0x00, 0x00, 0x08, 0x00, 0x00, 0x08, 0x00, 0x00, 0x08, 0x00, 0x00, 0x08, 0x00, 0x00, 0x08, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00}, /*"-", 13*/ |
|||
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x38, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, /*".", 14*/ |
|||
{0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x1C, 0x00, 0x00, 0x70, 0x00, 0x01, 0x80, 0x00, 0x0E, 0x00, 0x00, 0x38, 0x00, 0x00, 0xC0, 0x00, 0x07, 0x00, 0x00, 0x1C, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00}, /*"/", 15*/ |
|||
{0x00, 0x00, 0x00, 0x00, 0x7F, 0x80, 0x01, 0xFF, 0xE0, 0x03, 0x80, 0x70, 0x06, 0x00, 0x18, 0x04, 0x00, 0x08, 0x04, 0x00, 0x08, 0x06, 0x00, 0x18, 0x03, 0x80, 0x70, 0x01, 0xFF, 0xE0, 0x00, 0x7F, 0x80, 0x00, 0x00, 0x00}, /*"0", 16*/ |
|||
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x08, 0x01, 0x00, 0x08, 0x01, 0x00, 0x08, 0x03, 0xFF, 0xF8, 0x07, 0xFF, 0xF8, 0x00, 0x00, 0x08, 0x00, 0x00, 0x08, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, /*"1", 17*/ |
|||
{0x00, 0x00, 0x00, 0x01, 0xC0, 0x38, 0x02, 0xC0, 0x58, 0x04, 0x00, 0x98, 0x04, 0x01, 0x18, 0x04, 0x02, 0x18, 0x04, 0x04, 0x18, 0x06, 0x1C, 0x18, 0x03, 0xF8, 0x18, 0x01, 0xE0, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, /*"2", 18*/ |
|||
{0x00, 0x00, 0x00, 0x01, 0xC0, 0xE0, 0x03, 0xC0, 0xF0, 0x04, 0x00, 0x08, 0x04, 0x08, 0x08, 0x04, 0x08, 0x08, 0x06, 0x18, 0x08, 0x03, 0xF4, 0x18, 0x01, 0xE7, 0xF0, 0x00, 0x01, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, /*"3", 19*/ |
|||
{0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x0D, 0x00, 0x00, 0x11, 0x00, 0x00, 0x61, 0x00, 0x00, 0x81, 0x08, 0x03, 0x01, 0x08, 0x07, 0xFF, 0xF8, 0x0F, 0xFF, 0xF8, 0x00, 0x01, 0x08, 0x00, 0x01, 0x08, 0x00, 0x00, 0x00}, /*"4", 20*/ |
|||
{0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0x07, 0xFC, 0xD0, 0x06, 0x08, 0x08, 0x06, 0x10, 0x08, 0x06, 0x10, 0x08, 0x06, 0x10, 0x08, 0x06, 0x18, 0x38, 0x06, 0x0F, 0xF0, 0x06, 0x07, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, /*"5", 21*/ |
|||
{0x00, 0x00, 0x00, 0x00, 0x3F, 0x80, 0x01, 0xFF, 0xE0, 0x03, 0x84, 0x30, 0x02, 0x08, 0x18, 0x04, 0x10, 0x08, 0x04, 0x10, 0x08, 0x04, 0x10, 0x08, 0x07, 0x18, 0x10, 0x03, 0x0F, 0xF0, 0x00, 0x07, 0xC0, 0x00, 0x00, 0x00}, /*"6", 22*/ |
|||
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0xC0, 0x00, 0x07, 0x00, 0x00, 0x06, 0x00, 0x00, 0x06, 0x00, 0xF8, 0x06, 0x07, 0xF8, 0x06, 0x18, 0x00, 0x06, 0xE0, 0x00, 0x07, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00}, /*"7", 23*/ |
|||
{0x00, 0x00, 0x00, 0x01, 0xE1, 0xE0, 0x03, 0xF7, 0xF0, 0x06, 0x34, 0x10, 0x04, 0x18, 0x08, 0x04, 0x18, 0x08, 0x04, 0x0C, 0x08, 0x04, 0x0C, 0x08, 0x06, 0x16, 0x18, 0x03, 0xF3, 0xF0, 0x01, 0xC1, 0xE0, 0x00, 0x00, 0x00}, /*"8", 24*/ |
|||
{0x00, 0x00, 0x00, 0x00, 0xF8, 0x00, 0x03, 0xFC, 0x30, 0x03, 0x06, 0x38, 0x04, 0x02, 0x08, 0x04, 0x02, 0x08, 0x04, 0x02, 0x08, 0x04, 0x04, 0x10, 0x03, 0x08, 0xF0, 0x01, 0xFF, 0xC0, 0x00, 0x7F, 0x00, 0x00, 0x00, 0x00}, /*"9", 25*/ |
|||
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x38, 0x00, 0x70, 0x38, 0x00, 0x70, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, /*":", 26*/ |
|||
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x1A, 0x00, 0x30, 0x1C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, /*";", 27*/ |
|||
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x14, 0x00, 0x00, 0x22, 0x00, 0x00, 0x41, 0x00, 0x00, 0x80, 0x80, 0x01, 0x00, 0x40, 0x02, 0x00, 0x20, 0x04, 0x00, 0x10, 0x08, 0x00, 0x08, 0x00, 0x00, 0x00}, /*"<", 28*/ |
|||
{0x00, 0x00, 0x00, 0x00, 0x21, 0x00, 0x00, 0x21, 0x00, 0x00, 0x21, 0x00, 0x00, 0x21, 0x00, 0x00, 0x21, 0x00, 0x00, 0x21, 0x00, 0x00, 0x21, 0x00, 0x00, 0x21, 0x00, 0x00, 0x21, 0x00, 0x00, 0x21, 0x00, 0x00, 0x00, 0x00}, /*"=", 29*/ |
|||
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x08, 0x04, 0x00, 0x10, 0x02, 0x00, 0x20, 0x01, 0x00, 0x40, 0x00, 0x80, 0x80, 0x00, 0x41, 0x00, 0x00, 0x22, 0x00, 0x00, 0x14, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00}, /*">", 30*/ |
|||
{0x00, 0x00, 0x00, 0x03, 0xC0, 0x00, 0x04, 0xC0, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 0x38, 0x08, 0x0F, 0x38, 0x08, 0x08, 0x38, 0x08, 0x10, 0x00, 0x0C, 0x30, 0x00, 0x07, 0xE0, 0x00, 0x03, 0xC0, 0x00, 0x00, 0x00, 0x00}, /*"?", 31*/ |
|||
{0x00, 0x00, 0x00, 0x00, 0x3F, 0x80, 0x00, 0xFF, 0xE0, 0x03, 0x80, 0x70, 0x02, 0x0F, 0x10, 0x06, 0x70, 0x88, 0x04, 0xC0, 0x88, 0x04, 0x83, 0x08, 0x04, 0x7F, 0x88, 0x02, 0xC0, 0x90, 0x03, 0x01, 0x20, 0x00, 0xFE, 0x40}, /*"@", 32*/ |
|||
{0x00, 0x00, 0x08, 0x00, 0x00, 0x18, 0x00, 0x01, 0xF8, 0x00, 0x3E, 0x08, 0x01, 0xC2, 0x00, 0x07, 0x02, 0x00, 0x07, 0xE2, 0x00, 0x00, 0xFE, 0x00, 0x00, 0x1F, 0xC8, 0x00, 0x01, 0xF8, 0x00, 0x00, 0x38, 0x00, 0x00, 0x08}, /*"A", 33*/ |
|||
{0x04, 0x00, 0x08, 0x07, 0xFF, 0xF8, 0x07, 0xFF, 0xF8, 0x04, 0x08, 0x08, 0x04, 0x08, 0x08, 0x04, 0x08, 0x08, 0x04, 0x08, 0x08, 0x06, 0x18, 0x08, 0x03, 0xF4, 0x18, 0x01, 0xE7, 0xF0, 0x00, 0x01, 0xE0, 0x00, 0x00, 0x00}, /*"B", 34*/ |
|||
{0x00, 0x00, 0x00, 0x00, 0x3F, 0x80, 0x01, 0xFF, 0xE0, 0x03, 0x80, 0x70, 0x02, 0x00, 0x18, 0x04, 0x00, 0x08, 0x04, 0x00, 0x08, 0x04, 0x00, 0x08, 0x04, 0x00, 0x10, 0x06, 0x00, 0x20, 0x07, 0x80, 0xC0, 0x00, 0x00, 0x00}, /*"C", 35*/ |
|||
{0x04, 0x00, 0x08, 0x07, 0xFF, 0xF8, 0x07, 0xFF, 0xF8, 0x04, 0x00, 0x08, 0x04, 0x00, 0x08, 0x04, 0x00, 0x08, 0x04, 0x00, 0x18, 0x02, 0x00, 0x10, 0x03, 0x80, 0x70, 0x01, 0xFF, 0xE0, 0x00, 0x7F, 0x80, 0x00, 0x00, 0x00}, /*"D", 36*/ |
|||
{0x04, 0x00, 0x08, 0x07, 0xFF, 0xF8, 0x07, 0xFF, 0xF8, 0x04, 0x08, 0x08, 0x04, 0x08, 0x08, 0x04, 0x08, 0x08, 0x04, 0x08, 0x08, 0x04, 0x3E, 0x08, 0x04, 0x00, 0x08, 0x06, 0x00, 0x18, 0x01, 0x00, 0x60, 0x00, 0x00, 0x00}, /*"E", 37*/ |
|||
{0x04, 0x00, 0x08, 0x07, 0xFF, 0xF8, 0x07, 0xFF, 0xF8, 0x04, 0x08, 0x08, 0x04, 0x08, 0x00, 0x04, 0x08, 0x00, 0x04, 0x08, 0x00, 0x04, 0x3E, 0x00, 0x06, 0x00, 0x00, 0x06, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x00, 0x00}, /*"F", 38*/ |
|||
{0x00, 0x00, 0x00, 0x00, 0x3F, 0x80, 0x01, 0xFF, 0xE0, 0x03, 0x80, 0x70, 0x06, 0x00, 0x18, 0x04, 0x00, 0x08, 0x04, 0x02, 0x08, 0x04, 0x02, 0x08, 0x02, 0x03, 0xF0, 0x07, 0x83, 0xF0, 0x00, 0x02, 0x00, 0x00, 0x02, 0x00}, /*"G", 39*/ |
|||
{0x04, 0x00, 0x08, 0x07, 0xFF, 0xF8, 0x07, 0xFF, 0xF8, 0x04, 0x08, 0x08, 0x00, 0x08, 0x00, 0x00, 0x08, 0x00, 0x00, 0x08, 0x00, 0x00, 0x08, 0x00, 0x04, 0x08, 0x08, 0x07, 0xFF, 0xF8, 0x07, 0xFF, 0xF8, 0x04, 0x00, 0x08}, /*"H", 40*/ |
|||
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x08, 0x04, 0x00, 0x08, 0x04, 0x00, 0x08, 0x07, 0xFF, 0xF8, 0x07, 0xFF, 0xF8, 0x04, 0x00, 0x08, 0x04, 0x00, 0x08, 0x04, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, /*"I", 41*/ |
|||
{0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x07, 0x00, 0x00, 0x01, 0x04, 0x00, 0x01, 0x04, 0x00, 0x01, 0x04, 0x00, 0x03, 0x07, 0xFF, 0xFE, 0x07, 0xFF, 0xFC, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00}, /*"J", 42*/ |
|||
{0x04, 0x00, 0x08, 0x07, 0xFF, 0xF8, 0x07, 0xFF, 0xF8, 0x04, 0x0C, 0x08, 0x00, 0x18, 0x00, 0x00, 0x3E, 0x00, 0x04, 0xC7, 0x80, 0x05, 0x03, 0xC8, 0x06, 0x00, 0xF8, 0x04, 0x00, 0x38, 0x04, 0x00, 0x18, 0x00, 0x00, 0x08}, /*"K", 43*/ |
|||
{0x04, 0x00, 0x08, 0x07, 0xFF, 0xF8, 0x07, 0xFF, 0xF8, 0x04, 0x00, 0x08, 0x00, 0x00, 0x08, 0x00, 0x00, 0x08, 0x00, 0x00, 0x08, 0x00, 0x00, 0x08, 0x00, 0x00, 0x08, 0x00, 0x00, 0x18, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00}, /*"L", 44*/ |
|||
{0x04, 0x00, 0x08, 0x07, 0xFF, 0xF8, 0x07, 0x80, 0x08, 0x07, 0xFC, 0x00, 0x00, 0x7F, 0xC0, 0x00, 0x03, 0xF8, 0x00, 0x07, 0xC0, 0x00, 0x78, 0x00, 0x07, 0x80, 0x08, 0x07, 0xFF, 0xF8, 0x07, 0xFF, 0xF8, 0x04, 0x00, 0x08}, /*"M", 45*/ |
|||
{0x04, 0x00, 0x08, 0x07, 0xFF, 0xF8, 0x07, 0x00, 0x08, 0x03, 0xC0, 0x00, 0x00, 0xE0, 0x00, 0x00, 0x38, 0x00, 0x00, 0x1E, 0x00, 0x00, 0x07, 0x00, 0x00, 0x01, 0xC0, 0x04, 0x00, 0xF0, 0x07, 0xFF, 0xF8, 0x04, 0x00, 0x00}, /*"N", 46*/ |
|||
{0x00, 0x00, 0x00, 0x00, 0x7F, 0x80, 0x01, 0xFF, 0xE0, 0x03, 0x80, 0x70, 0x06, 0x00, 0x18, 0x04, 0x00, 0x08, 0x04, 0x00, 0x08, 0x06, 0x00, 0x18, 0x03, 0x00, 0x30, 0x01, 0xFF, 0xE0, 0x00, 0x7F, 0x80, 0x00, 0x00, 0x00}, /*"O", 47*/ |
|||
{0x04, 0x00, 0x08, 0x07, 0xFF, 0xF8, 0x07, 0xFF, 0xF8, 0x04, 0x04, 0x08, 0x04, 0x04, 0x00, 0x04, 0x04, 0x00, 0x04, 0x04, 0x00, 0x04, 0x04, 0x00, 0x06, 0x0C, 0x00, 0x03, 0xF8, 0x00, 0x01, 0xF0, 0x00, 0x00, 0x00, 0x00}, /*"P", 48*/ |
|||
{0x00, 0x00, 0x00, 0x00, 0x7F, 0x80, 0x01, 0xFF, 0xE0, 0x03, 0x80, 0x70, 0x06, 0x00, 0x88, 0x04, 0x00, 0x88, 0x04, 0x00, 0xC8, 0x06, 0x00, 0x3C, 0x03, 0x00, 0x3E, 0x01, 0xFF, 0xE6, 0x00, 0x7F, 0x84, 0x00, 0x00, 0x00}, /*"Q", 49*/ |
|||
{0x04, 0x00, 0x08, 0x07, 0xFF, 0xF8, 0x07, 0xFF, 0xF8, 0x04, 0x08, 0x08, 0x04, 0x08, 0x00, 0x04, 0x0C, 0x00, 0x04, 0x0F, 0x00, 0x04, 0x0B, 0xC0, 0x06, 0x10, 0xF0, 0x03, 0xF0, 0x38, 0x01, 0xE0, 0x08, 0x00, 0x00, 0x08}, /*"R", 50*/ |
|||
{0x00, 0x00, 0x00, 0x01, 0xE0, 0xF8, 0x03, 0xF0, 0x30, 0x06, 0x30, 0x10, 0x04, 0x18, 0x08, 0x04, 0x18, 0x08, 0x04, 0x0C, 0x08, 0x04, 0x0C, 0x08, 0x02, 0x06, 0x18, 0x02, 0x07, 0xF0, 0x07, 0x81, 0xE0, 0x00, 0x00, 0x00}, /*"S", 51*/ |
|||
{0x01, 0x80, 0x00, 0x06, 0x00, 0x00, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x04, 0x00, 0x08, 0x07, 0xFF, 0xF8, 0x07, 0xFF, 0xF8, 0x04, 0x00, 0x08, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x06, 0x00, 0x00, 0x01, 0x80, 0x00}, /*"T", 52*/ |
|||
{0x04, 0x00, 0x00, 0x07, 0xFF, 0xE0, 0x07, 0xFF, 0xF0, 0x04, 0x00, 0x18, 0x00, 0x00, 0x08, 0x00, 0x00, 0x08, 0x00, 0x00, 0x08, 0x00, 0x00, 0x08, 0x00, 0x00, 0x08, 0x04, 0x00, 0x10, 0x07, 0xFF, 0xE0, 0x04, 0x00, 0x00}, /*"U", 53*/ |
|||
{0x04, 0x00, 0x00, 0x06, 0x00, 0x00, 0x07, 0xE0, 0x00, 0x07, 0xFE, 0x00, 0x04, 0x1F, 0xE0, 0x00, 0x01, 0xF8, 0x00, 0x00, 0x38, 0x00, 0x01, 0xE0, 0x04, 0x3E, 0x00, 0x07, 0xC0, 0x00, 0x06, 0x00, 0x00, 0x04, 0x00, 0x00}, /*"V", 54*/ |
|||
{0x04, 0x00, 0x00, 0x07, 0xE0, 0x00, 0x07, 0xFF, 0xC0, 0x04, 0x1F, 0xF8, 0x00, 0x07, 0xC0, 0x07, 0xF8, 0x00, 0x07, 0xFF, 0x80, 0x04, 0x3F, 0xF8, 0x00, 0x07, 0xC0, 0x04, 0xF8, 0x00, 0x07, 0x00, 0x00, 0x04, 0x00, 0x00}, /*"W", 55*/ |
|||
{0x00, 0x00, 0x00, 0x04, 0x00, 0x08, 0x06, 0x00, 0x18, 0x07, 0xC0, 0x78, 0x05, 0xF1, 0xC8, 0x00, 0x3E, 0x00, 0x00, 0x1F, 0x80, 0x04, 0x63, 0xE8, 0x07, 0x80, 0xF8, 0x06, 0x00, 0x18, 0x04, 0x00, 0x08, 0x00, 0x00, 0x00}, /*"X", 56*/ |
|||
{0x04, 0x00, 0x00, 0x06, 0x00, 0x00, 0x07, 0x80, 0x00, 0x07, 0xE0, 0x08, 0x04, 0x7C, 0x08, 0x00, 0x1F, 0xF8, 0x00, 0x07, 0xF8, 0x00, 0x18, 0x08, 0x04, 0xE0, 0x08, 0x07, 0x00, 0x00, 0x06, 0x00, 0x00, 0x04, 0x00, 0x00}, /*"Y", 57*/ |
|||
{0x00, 0x00, 0x00, 0x01, 0x00, 0x08, 0x06, 0x00, 0x38, 0x04, 0x00, 0xF8, 0x04, 0x03, 0xE8, 0x04, 0x0F, 0x08, 0x04, 0x7C, 0x08, 0x05, 0xF0, 0x08, 0x07, 0xC0, 0x08, 0x07, 0x00, 0x18, 0x04, 0x00, 0x60, 0x00, 0x00, 0x00}, /*"Z", 58*/ |
|||
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3F, 0xFF, 0xFE, 0x20, 0x00, 0x02, 0x20, 0x00, 0x02, 0x20, 0x00, 0x02, 0x20, 0x00, 0x02, 0x20, 0x00, 0x02, 0x00, 0x00, 0x00}, /*"[", 59*/ |
|||
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x38, 0x00, 0x00, 0x06, 0x00, 0x00, 0x01, 0xC0, 0x00, 0x00, 0x30, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00}, /*"\", 60*/ |
|||
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x02, 0x20, 0x00, 0x02, 0x20, 0x00, 0x02, 0x20, 0x00, 0x02, 0x20, 0x00, 0x02, 0x3F, 0xFF, 0xFE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, /*"]", 61*/ |
|||
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x10, 0x00, 0x00, 0x30, 0x00, 0x00, 0x20, 0x00, 0x00, 0x30, 0x00, 0x00, 0x10, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, /*"^", 62*/ |
|||
{0x00, 0x00, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x01}, /*"_", 63*/ |
|||
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x20, 0x00, 0x00, 0x10, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, /*"`", 64*/ |
|||
{0x00, 0x00, 0x00, 0x00, 0x00, 0xF0, 0x00, 0x19, 0xF8, 0x00, 0x1B, 0x18, 0x00, 0x22, 0x08, 0x00, 0x26, 0x08, 0x00, 0x24, 0x08, 0x00, 0x24, 0x10, 0x00, 0x3F, 0xF8, 0x00, 0x1F, 0xF8, 0x00, 0x00, 0x08, 0x00, 0x00, 0x18}, /*"a", 65*/ |
|||
{0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x07, 0xFF, 0xF8, 0x0F, 0xFF, 0xF0, 0x00, 0x18, 0x18, 0x00, 0x10, 0x08, 0x00, 0x20, 0x08, 0x00, 0x20, 0x08, 0x00, 0x30, 0x18, 0x00, 0x1F, 0xF0, 0x00, 0x0F, 0xC0, 0x00, 0x00, 0x00}, /*"b", 66*/ |
|||
{0x00, 0x00, 0x00, 0x00, 0x07, 0xC0, 0x00, 0x1F, 0xF0, 0x00, 0x18, 0x30, 0x00, 0x20, 0x08, 0x00, 0x20, 0x08, 0x00, 0x20, 0x08, 0x00, 0x3C, 0x08, 0x00, 0x1C, 0x10, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, /*"c", 67*/ |
|||
{0x00, 0x00, 0x00, 0x00, 0x07, 0xC0, 0x00, 0x1F, 0xF0, 0x00, 0x38, 0x18, 0x00, 0x20, 0x08, 0x00, 0x20, 0x08, 0x00, 0x20, 0x08, 0x04, 0x10, 0x10, 0x07, 0xFF, 0xF8, 0x0F, 0xFF, 0xF0, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00}, /*"d", 68*/ |
|||
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xC0, 0x00, 0x1F, 0xF0, 0x00, 0x12, 0x30, 0x00, 0x22, 0x18, 0x00, 0x22, 0x08, 0x00, 0x22, 0x08, 0x00, 0x32, 0x08, 0x00, 0x1E, 0x10, 0x00, 0x0E, 0x20, 0x00, 0x00, 0x00}, /*"e", 69*/ |
|||
{0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x20, 0x08, 0x00, 0x20, 0x08, 0x01, 0xFF, 0xF8, 0x03, 0xFF, 0xF8, 0x06, 0x20, 0x08, 0x04, 0x20, 0x08, 0x04, 0x20, 0x08, 0x07, 0x20, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00}, /*"f", 70*/ |
|||
{0x00, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x0E, 0x6E, 0x00, 0x1F, 0xF3, 0x00, 0x31, 0xB1, 0x00, 0x20, 0xB1, 0x00, 0x20, 0xB1, 0x00, 0x31, 0x91, 0x00, 0x1F, 0x13, 0x00, 0x2E, 0x1E, 0x00, 0x20, 0x0E, 0x00, 0x30, 0x00}, /*"g", 71*/ |
|||
{0x00, 0x00, 0x00, 0x04, 0x00, 0x08, 0x07, 0xFF, 0xF8, 0x0F, 0xFF, 0xF8, 0x00, 0x10, 0x08, 0x00, 0x20, 0x00, 0x00, 0x20, 0x00, 0x00, 0x20, 0x08, 0x00, 0x3F, 0xF8, 0x00, 0x1F, 0xF8, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00}, /*"h", 72*/ |
|||
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x08, 0x00, 0x20, 0x08, 0x00, 0x20, 0x08, 0x06, 0x3F, 0xF8, 0x06, 0x3F, 0xF8, 0x00, 0x00, 0x08, 0x00, 0x00, 0x08, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, /*"i", 73*/ |
|||
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x03, 0x00, 0x20, 0x01, 0x00, 0x20, 0x01, 0x00, 0x20, 0x03, 0x06, 0x3F, 0xFE, 0x06, 0x3F, 0xFC, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, /*"j", 74*/ |
|||
{0x00, 0x00, 0x00, 0x04, 0x00, 0x08, 0x07, 0xFF, 0xF8, 0x0F, 0xFF, 0xF8, 0x00, 0x01, 0x88, 0x00, 0x03, 0x00, 0x00, 0x2F, 0xC0, 0x00, 0x38, 0xF8, 0x00, 0x20, 0x38, 0x00, 0x20, 0x08, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00}, /*"k", 75*/ |
|||
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x08, 0x04, 0x00, 0x08, 0x04, 0x00, 0x08, 0x07, 0xFF, 0xF8, 0x0F, 0xFF, 0xF8, 0x00, 0x00, 0x08, 0x00, 0x00, 0x08, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, /*"l", 76*/ |
|||
{0x00, 0x20, 0x08, 0x00, 0x3F, 0xF8, 0x00, 0x3F, 0xF8, 0x00, 0x10, 0x08, 0x00, 0x20, 0x00, 0x00, 0x3F, 0xF8, 0x00, 0x3F, 0xF8, 0x00, 0x10, 0x08, 0x00, 0x20, 0x00, 0x00, 0x3F, 0xF8, 0x00, 0x3F, 0xF8, 0x00, 0x00, 0x08}, /*"m", 77*/ |
|||
{0x00, 0x00, 0x00, 0x00, 0x20, 0x08, 0x00, 0x3F, 0xF8, 0x00, 0x3F, 0xF8, 0x00, 0x10, 0x08, 0x00, 0x10, 0x00, 0x00, 0x20, 0x00, 0x00, 0x20, 0x08, 0x00, 0x3F, 0xF8, 0x00, 0x1F, 0xF8, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00}, /*"n", 78*/ |
|||
{0x00, 0x00, 0x00, 0x00, 0x07, 0xC0, 0x00, 0x0F, 0xF0, 0x00, 0x18, 0x30, 0x00, 0x30, 0x08, 0x00, 0x20, 0x08, 0x00, 0x20, 0x08, 0x00, 0x30, 0x08, 0x00, 0x18, 0x30, 0x00, 0x0F, 0xF0, 0x00, 0x07, 0xC0, 0x00, 0x00, 0x00}, /*"o", 79*/ |
|||
{0x00, 0x00, 0x00, 0x00, 0x20, 0x01, 0x00, 0x3F, 0xFF, 0x00, 0x3F, 0xFF, 0x00, 0x10, 0x11, 0x00, 0x20, 0x09, 0x00, 0x20, 0x08, 0x00, 0x20, 0x08, 0x00, 0x30, 0x38, 0x00, 0x1F, 0xF0, 0x00, 0x0F, 0xC0, 0x00, 0x00, 0x00}, /*"p", 80*/ |
|||
{0x00, 0x00, 0x00, 0x00, 0x07, 0xC0, 0x00, 0x1F, 0xF0, 0x00, 0x38, 0x18, 0x00, 0x20, 0x08, 0x00, 0x20, 0x08, 0x00, 0x20, 0x09, 0x00, 0x10, 0x11, 0x00, 0x1F, 0xFF, 0x00, 0x3F, 0xFF, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00}, /*"q", 81*/ |
|||
{0x00, 0x20, 0x08, 0x00, 0x20, 0x08, 0x00, 0x20, 0x08, 0x00, 0x3F, 0xF8, 0x00, 0x3F, 0xF8, 0x00, 0x08, 0x08, 0x00, 0x10, 0x08, 0x00, 0x20, 0x08, 0x00, 0x20, 0x00, 0x00, 0x30, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00}, /*"r", 82*/ |
|||
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0C, 0x78, 0x00, 0x1E, 0x18, 0x00, 0x33, 0x08, 0x00, 0x23, 0x08, 0x00, 0x21, 0x08, 0x00, 0x21, 0x88, 0x00, 0x21, 0x98, 0x00, 0x30, 0xF0, 0x00, 0x38, 0x60, 0x00, 0x00, 0x00}, /*"s", 83*/ |
|||
{0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x20, 0x00, 0x00, 0x20, 0x00, 0x00, 0xFF, 0xF0, 0x03, 0xFF, 0xF8, 0x00, 0x20, 0x08, 0x00, 0x20, 0x08, 0x00, 0x20, 0x08, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, /*"t", 84*/ |
|||
{0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x3F, 0xF0, 0x00, 0x7F, 0xF8, 0x00, 0x00, 0x18, 0x00, 0x00, 0x08, 0x00, 0x00, 0x08, 0x00, 0x20, 0x10, 0x00, 0x3F, 0xF8, 0x00, 0x7F, 0xF0, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00}, /*"u", 85*/ |
|||
{0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x30, 0x00, 0x00, 0x3C, 0x00, 0x00, 0x3F, 0x80, 0x00, 0x23, 0xF0, 0x00, 0x00, 0x78, 0x00, 0x00, 0x70, 0x00, 0x23, 0x80, 0x00, 0x3C, 0x00, 0x00, 0x30, 0x00, 0x00, 0x20, 0x00}, /*"v", 86*/ |
|||
{0x00, 0x20, 0x00, 0x00, 0x3C, 0x00, 0x00, 0x3F, 0xE0, 0x00, 0x23, 0xF8, 0x00, 0x00, 0xE0, 0x00, 0x27, 0x00, 0x00, 0x3E, 0x00, 0x00, 0x3F, 0xE0, 0x00, 0x21, 0xF8, 0x00, 0x01, 0xE0, 0x00, 0x3E, 0x00, 0x00, 0x20, 0x00}, /*"w", 87*/ |
|||
{0x00, 0x00, 0x00, 0x00, 0x20, 0x08, 0x00, 0x20, 0x08, 0x00, 0x38, 0x38, 0x00, 0x3E, 0x68, 0x00, 0x27, 0x80, 0x00, 0x03, 0xC8, 0x00, 0x2C, 0xF8, 0x00, 0x38, 0x38, 0x00, 0x20, 0x18, 0x00, 0x20, 0x08, 0x00, 0x00, 0x00}, /*"x", 88*/ |
|||
{0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x30, 0x03, 0x00, 0x3C, 0x01, 0x00, 0x3F, 0x83, 0x00, 0x23, 0xEC, 0x00, 0x00, 0x70, 0x00, 0x23, 0x80, 0x00, 0x3C, 0x00, 0x00, 0x20, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00}, /*"y", 89*/ |
|||
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x08, 0x00, 0x20, 0x38, 0x00, 0x20, 0xF8, 0x00, 0x23, 0xE8, 0x00, 0x2F, 0x88, 0x00, 0x3E, 0x08, 0x00, 0x38, 0x08, 0x00, 0x20, 0x18, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00}, /*"z", 90*/ |
|||
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x14, 0x00, 0x1F, 0xF7, 0xFC, 0x30, 0x00, 0x06, 0x20, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, /*"{", 91*/ |
|||
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, /*"|", 92*/ |
|||
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x02, 0x30, 0x00, 0x06, 0x1F, 0xF7, 0xFC, 0x00, 0x14, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, /*"}", 93*/ |
|||
{0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x60, 0x00, 0x00, 0x40, 0x00, 0x00, 0x40, 0x00, 0x00, 0x20, 0x00, 0x00, 0x10, 0x00, 0x00, 0x08, 0x00, 0x00, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x10, 0x00, 0x00}, /*"~", 94*/ |
|||
}; |
|||
|
|||
#ifdef __cplusplus |
|||
} |
|||
#endif |
|||
|
|||
#endif |
@ -0,0 +1,68 @@ |
|||
/** |
|||
* Copyright (c) 2015 - present LibDriver All rights reserved |
|||
* |
|||
* The MIT License (MIT) |
|||
* |
|||
* Permission is hereby granted, free of charge, to any person obtaining a copy |
|||
* of this software and associated documentation files (the "Software"), to deal |
|||
* in the Software without restriction, including without limitation the rights |
|||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
|||
* copies of the Software, and to permit persons to whom the Software is |
|||
* furnished to do so, subject to the following conditions: |
|||
* |
|||
* The above copyright notice and this permission notice shall be included in all |
|||
* copies or substantial portions of the Software. |
|||
* |
|||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
|||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
|||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
|||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
|||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
|||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE |
|||
* SOFTWARE. |
|||
* |
|||
* @file driver_ssd1306_interface_template.c |
|||
* @brief driver ssd1306 interface template source file |
|||
* @version 2.0.0 |
|||
* @author Shifeng Li |
|||
* @date 2021-03-30 |
|||
* |
|||
* <h3>history</h3> |
|||
* <table> |
|||
* <tr><th>Date <th>Version <th>Author <th>Description |
|||
* <tr><td>2021/03/30 <td>2.0 <td>Shifeng Li <td>format the code |
|||
* <tr><td>2020/12/10 <td>1.0 <td>Shifeng Li <td>first upload |
|||
* </table> |
|||
*/ |
|||
|
|||
#include "basic/ssd1306/driver_ssd1306_interface.h" |
|||
|
|||
|
|||
extern uint8_t SingleLeadECG_spi_init(void); |
|||
extern uint8_t SingleLeadECG_spi_deinit(void); |
|||
extern uint8_t SingleLeadECG_spi_write_cmd(uint8_t *buf, uint16_t len); |
|||
extern void SingleLeadECG_delay_ms(uint32_t ms); |
|||
extern void SingleLeadECG_debug_print(const char *const fmt, ...); |
|||
extern uint8_t SingleLeadECG_spi_cmd_data_gpio_init(void); |
|||
extern uint8_t SingleLeadECG_spi_cmd_data_gpio_deinit(void); |
|||
extern uint8_t SingleLeadECG_spi_cmd_data_gpio_write(uint8_t value); |
|||
extern uint8_t SingleLeadECG_reset_gpio_init(void); |
|||
extern uint8_t SingleLeadECG_reset_gpio_deinit(void); |
|||
extern uint8_t SingleLeadECG_reset_gpio_write(uint8_t value); |
|||
|
|||
|
|||
uint8_t ssd1306_interface_iic_init(void) { return 0; } |
|||
uint8_t ssd1306_interface_iic_deinit(void) { return 0; } |
|||
uint8_t ssd1306_interface_iic_write(uint8_t addr, uint8_t reg, uint8_t *buf, uint16_t len) { return 0; } |
|||
|
|||
uint8_t ssd1306_interface_spi_init(void) { return SingleLeadECG_spi_init(); } |
|||
uint8_t ssd1306_interface_spi_deinit(void) { return SingleLeadECG_spi_deinit(); } |
|||
uint8_t ssd1306_interface_spi_write_cmd(uint8_t *buf, uint16_t len) { return SingleLeadECG_spi_write_cmd(buf, len); } |
|||
void ssd1306_interface_delay_ms(uint32_t ms) { SingleLeadECG_delay_ms(ms); } |
|||
void ssd1306_interface_debug_print(const char *const fmt, ...) { SingleLeadECG_debug_print(fmt); } |
|||
uint8_t ssd1306_interface_spi_cmd_data_gpio_init(void) { return SingleLeadECG_spi_cmd_data_gpio_init(); } |
|||
uint8_t ssd1306_interface_spi_cmd_data_gpio_deinit(void) { return SingleLeadECG_spi_cmd_data_gpio_deinit(); } |
|||
uint8_t ssd1306_interface_spi_cmd_data_gpio_write(uint8_t value) { return SingleLeadECG_spi_cmd_data_gpio_write(value); } |
|||
uint8_t ssd1306_interface_reset_gpio_init(void) { return SingleLeadECG_reset_gpio_init(); } |
|||
uint8_t ssd1306_interface_reset_gpio_deinit(void) { return SingleLeadECG_reset_gpio_deinit(); } |
|||
uint8_t ssd1306_interface_reset_gpio_write(uint8_t value) { return SingleLeadECG_reset_gpio_write(value); } |
@ -0,0 +1,192 @@ |
|||
/** |
|||
* Copyright (c) 2015 - present LibDriver All rights reserved |
|||
* |
|||
* The MIT License (MIT) |
|||
* |
|||
* Permission is hereby granted, free of charge, to any person obtaining a copy |
|||
* of this software and associated documentation files (the "Software"), to deal |
|||
* in the Software without restriction, including without limitation the rights |
|||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
|||
* copies of the Software, and to permit persons to whom the Software is |
|||
* furnished to do so, subject to the following conditions: |
|||
* |
|||
* The above copyright notice and this permission notice shall be included in all |
|||
* copies or substantial portions of the Software. |
|||
* |
|||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
|||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
|||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
|||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
|||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
|||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE |
|||
* SOFTWARE. |
|||
* |
|||
* @file driver_ssd1306_interface.h |
|||
* @brief driver ssd1306 interface header file |
|||
* @version 2.0.0 |
|||
* @author Shifeng Li |
|||
* @date 2021-03-30 |
|||
* |
|||
* <h3>history</h3> |
|||
* <table> |
|||
* <tr><th>Date <th>Version <th>Author <th>Description |
|||
* <tr><td>2021/03/30 <td>2.0 <td>Shifeng Li <td>format the code |
|||
* <tr><td>2020/12/10 <td>1.0 <td>Shifeng Li <td>first upload |
|||
* </table> |
|||
*/ |
|||
|
|||
#ifndef DRIVER_SSD1306_INTERFACE_H |
|||
#define DRIVER_SSD1306_INTERFACE_H |
|||
|
|||
#include "driver_ssd1306.h" |
|||
|
|||
#ifdef __cplusplus |
|||
extern "C"{ |
|||
#endif |
|||
|
|||
/** |
|||
* @defgroup ssd1306_interface_driver ssd1306 interface driver function |
|||
* @brief ssd1306 interface driver modules |
|||
* @ingroup ssd1306_driver |
|||
* @{ |
|||
*/ |
|||
|
|||
/** |
|||
* @brief interface iic bus init |
|||
* @return status code |
|||
* - 0 success |
|||
* - 1 iic init failed |
|||
* @note none |
|||
*/ |
|||
uint8_t ssd1306_interface_iic_init(void); |
|||
|
|||
/** |
|||
* @brief interface iic bus deinit |
|||
* @return status code |
|||
* - 0 success |
|||
* - 1 iic deinit failed |
|||
* @note none |
|||
*/ |
|||
uint8_t ssd1306_interface_iic_deinit(void); |
|||
|
|||
/** |
|||
* @brief interface iic bus write |
|||
* @param[in] addr is the iic device write address |
|||
* @param[in] reg is the iic register address |
|||
* @param[in] *buf points to a data buffer |
|||
* @param[in] len is the length of the data buffer |
|||
* @return status code |
|||
* - 0 success |
|||
* - 1 write failed |
|||
* @note none |
|||
*/ |
|||
uint8_t ssd1306_interface_iic_write(uint8_t addr, uint8_t reg, uint8_t *buf, uint16_t len); |
|||
|
|||
/** |
|||
* @brief interface spi bus init |
|||
* @return status code |
|||
* - 0 success |
|||
* - 1 spi init failed |
|||
* @note none |
|||
*/ |
|||
uint8_t ssd1306_interface_spi_init(void); |
|||
|
|||
/** |
|||
* @brief interface spi bus deinit |
|||
* @return status code |
|||
* - 0 success |
|||
* - 1 spi deinit failed |
|||
* @note none |
|||
*/ |
|||
uint8_t ssd1306_interface_spi_deinit(void); |
|||
|
|||
/** |
|||
* @brief interface spi bus write |
|||
* @param[in] *buf points to a data buffer |
|||
* @param[in] len is the length of data buffer |
|||
* @return status code |
|||
* - 0 success |
|||
* - 1 write failed |
|||
* @note none |
|||
*/ |
|||
uint8_t ssd1306_interface_spi_write_cmd(uint8_t *buf, uint16_t len); |
|||
|
|||
/** |
|||
* @brief interface delay ms |
|||
* @param[in] ms |
|||
* @note none |
|||
*/ |
|||
void ssd1306_interface_delay_ms(uint32_t ms); |
|||
|
|||
/** |
|||
* @brief interface print format data |
|||
* @param[in] fmt is the format data |
|||
* @note none |
|||
*/ |
|||
void ssd1306_interface_debug_print(const char *const fmt, ...); |
|||
|
|||
/** |
|||
* @brief interface command && data gpio init |
|||
* @return status code |
|||
* - 0 success |
|||
* - 1 gpio init failed |
|||
* @note none |
|||
*/ |
|||
uint8_t ssd1306_interface_spi_cmd_data_gpio_init(void); |
|||
|
|||
/** |
|||
* @brief interface command && data gpio deinit |
|||
* @return status code |
|||
* - 0 success |
|||
* - 1 gpio deinit failed |
|||
* @note none |
|||
*/ |
|||
uint8_t ssd1306_interface_spi_cmd_data_gpio_deinit(void); |
|||
|
|||
/** |
|||
* @brief interface command && data gpio write |
|||
* @param[in] value is the written value |
|||
* @return status code |
|||
* - 0 success |
|||
* - 1 gpio write failed |
|||
* @note none |
|||
*/ |
|||
uint8_t ssd1306_interface_spi_cmd_data_gpio_write(uint8_t value); |
|||
|
|||
/** |
|||
* @brief interface reset gpio init |
|||
* @return status code |
|||
* - 0 success |
|||
* - 1 gpio init failed |
|||
* @note none |
|||
*/ |
|||
uint8_t ssd1306_interface_reset_gpio_init(void); |
|||
|
|||
/** |
|||
* @brief interface reset gpio deinit |
|||
* @return status code |
|||
* - 0 success |
|||
* - 1 gpio deinit failed |
|||
* @note none |
|||
*/ |
|||
uint8_t ssd1306_interface_reset_gpio_deinit(void); |
|||
|
|||
/** |
|||
* @brief interface reset gpio write |
|||
* @param[in] value is the written value |
|||
* @return status code |
|||
* - 0 success |
|||
* - 1 gpio write failed |
|||
* @note none |
|||
*/ |
|||
uint8_t ssd1306_interface_reset_gpio_write(uint8_t value); |
|||
|
|||
/** |
|||
* @} |
|||
*/ |
|||
|
|||
#ifdef __cplusplus |
|||
} |
|||
#endif |
|||
|
|||
#endif |
@ -0,0 +1,280 @@ |
|||
#include "one_conduction_board.h" |
|||
|
|||
#include "sys.h" |
|||
// |
|||
#include "app_timer.h" |
|||
#include "diskio_blkdev.h" |
|||
#include "ff.h" |
|||
#include "nrf_block_dev_sdc.h" |
|||
#include "nrf_delay.h" |
|||
#include "nrf_drv_pwm.h" |
|||
#include "nrf_drv_saadc.h" |
|||
#include "nrf_drv_twi.h" |
|||
#include "nrf_drv_wdt.h" |
|||
#include "nrf_gpio.h" |
|||
|
|||
#define SCREEN_SPI_INSTANCE 0 |
|||
#define SCREEN_RESET_PIN 20 |
|||
#define SCREEN_POWER_PIN 30 |
|||
#define SCREEN_A0PIN 31 |
|||
#define SCREEN_CS_PIN 29 |
|||
#define SCREEN_CLK_PIN 4 |
|||
#define SCREEN_MOSI_PIN 11 |
|||
|
|||
#define LED_GREEN_PIN 9 |
|||
#define LED_BLUE_PIN 10 |
|||
|
|||
#define ECG_NLOD_PIN 3 |
|||
#define ECG_PLOD_PIN 28 |
|||
#define ECG_ADC_PIN NRF_SAADC_INPUT_AIN2 |
|||
#define ECG_ADC_CHANNEL 0 // 不重复即可 |
|||
|
|||
#define BATTERY_ADC_PIN NRF_SAADC_INPUT_VDD |
|||
#define BATTERY_ADC_CHANNEL 1 // 不重复即可 |
|||
|
|||
#define EEPROM_I2C_SCL_M 15 // I2C SCL引脚 |
|||
#define EEPROM_I2C_SDA_M 17 // I2C SDA引脚 |
|||
#define EEPROM_I2C_INSTANCE 1 // I2C使用的硬件控制器ID |
|||
|
|||
/******************************************************************************* |
|||
* TOOLS * |
|||
*******************************************************************************/ |
|||
|
|||
static void znrf_gpio_cfg_output(uint32_t pin_number, nrf_gpio_pin_pull_t pull) { // |
|||
nrf_gpio_cfg(pin_number, NRF_GPIO_PIN_DIR_OUTPUT, NRF_GPIO_PIN_INPUT_DISCONNECT, pull, NRF_GPIO_PIN_S0S1, NRF_GPIO_PIN_NOSENSE); |
|||
} |
|||
|
|||
static int16_t adc_channel_read_val(uint16_t channel) { |
|||
nrf_saadc_value_t value; |
|||
ret_code_t err_code; |
|||
err_code = nrfx_saadc_sample_convert(channel, &value); |
|||
if (err_code != NRF_SUCCESS) { |
|||
ZLOGE("nrfx_saadc_sample_convert(%d) fail err_code:%d", channel, err_code); |
|||
return 0; |
|||
} |
|||
return value; |
|||
} |
|||
|
|||
/******************************************************************************* |
|||
* ADC * |
|||
*******************************************************************************/ |
|||
void SingleLeadECG_adc_module_init() { |
|||
nrf_drv_saadc_config_t adccfg = NRFX_SAADC_DEFAULT_CONFIG; |
|||
adccfg.resolution = NRF_SAADC_RESOLUTION_12BIT; // 4096 等于满采样率 |
|||
ZERROR_CHECK(nrf_drv_saadc_init(&adccfg, NULL)); |
|||
} |
|||
|
|||
/******************************************************************************* |
|||
* 蜂鸣器 * |
|||
*******************************************************************************/ |
|||
static nrf_drv_pwm_t m_beep_pwm0 = NRF_DRV_PWM_INSTANCE(0); |
|||
static nrf_pwm_values_individual_t m_beep_pwm0_seq_values = {0}; |
|||
static nrf_pwm_sequence_t const m_beep_pwm0_seq = { |
|||
.values.p_individual = &m_beep_pwm0_seq_values, |
|||
.length = NRF_PWM_VALUES_LENGTH(m_beep_pwm0_seq_values), |
|||
.repeats = 0, |
|||
.end_delay = 0, |
|||
}; |
|||
static nrf_drv_pwm_config_t const m_beep_pwm0_config0 = { |
|||
.output_pins = {11}, |
|||
.irq_priority = APP_IRQ_PRIORITY_LOWEST, |
|||
.base_clock = NRF_PWM_CLK_125kHz, |
|||
.count_mode = NRF_PWM_MODE_UP, |
|||
.top_value = 46, // 125kHz / 46 = 2.717k |
|||
.load_mode = NRF_PWM_LOAD_INDIVIDUAL, |
|||
.step_mode = NRF_PWM_STEP_AUTO, |
|||
}; |
|||
void SingleLeadECG_beep_init() { APP_ERROR_CHECK(nrfx_pwm_init(&m_beep_pwm0, &m_beep_pwm0_config0, NULL)); } |
|||
void SingleLeadECG_beep_set_state(bool state) { |
|||
if (state) { |
|||
m_beep_pwm0_seq_values.channel_0 = 23; // 设置占空比,数值最大不超过 top_value |
|||
nrfx_pwm_simple_playback(&m_beep_pwm0, &m_beep_pwm0_seq, 1, NRF_DRV_PWM_FLAG_LOOP); |
|||
} else { |
|||
nrfx_pwm_stop(&m_beep_pwm0, true); |
|||
} |
|||
} |
|||
/******************************************************************************* |
|||
* SCREEN * |
|||
*******************************************************************************/ |
|||
|
|||
typedef struct { |
|||
// BASIC IF |
|||
uint32_t reset_pin; |
|||
uint32_t power_pin; |
|||
uint32_t a0pin; // cmd/data |
|||
// SPI IF |
|||
uint32_t cs_pin; |
|||
uint32_t clk_pin; |
|||
uint32_t mosi_pin; |
|||
|
|||
} screen_handler_t; |
|||
|
|||
static screen_handler_t m_screen_handler = { |
|||
.reset_pin = SCREEN_RESET_PIN, |
|||
.power_pin = SCREEN_POWER_PIN, |
|||
.a0pin = SCREEN_A0PIN, |
|||
.cs_pin = SCREEN_CS_PIN, |
|||
.clk_pin = SCREEN_CLK_PIN, |
|||
.mosi_pin = SCREEN_MOSI_PIN, |
|||
}; |
|||
static const nrf_drv_spi_t m_screen_spi = NRF_DRV_SPI_INSTANCE(SCREEN_SPI_INSTANCE); /**< SPI instance. */ |
|||
|
|||
void SingleLeadECG_screen_init() { |
|||
znrf_gpio_cfg_output(SCREEN_RESET_PIN, NRF_GPIO_PIN_NOPULL); |
|||
znrf_gpio_cfg_output(SCREEN_POWER_PIN, NRF_GPIO_PIN_NOPULL); |
|||
znrf_gpio_cfg_output(SCREEN_A0PIN, NRF_GPIO_PIN_NOPULL); |
|||
|
|||
nrf_drv_spi_config_t spi_config = NRF_DRV_SPI_DEFAULT_CONFIG; |
|||
spi_config.ss_pin = SCREEN_CS_PIN; // NRF_DRV_SPI_PIN_NOT_USED |
|||
spi_config.miso_pin = NRF_DRV_SPI_PIN_NOT_USED; |
|||
spi_config.mosi_pin = SCREEN_MOSI_PIN; |
|||
spi_config.sck_pin = SCREEN_CLK_PIN; |
|||
spi_config.frequency = NRF_DRV_SPI_FREQ_1M; |
|||
ZERROR_CHECK(nrf_drv_spi_init(&m_screen_spi, &spi_config, NULL, NULL)); |
|||
} |
|||
|
|||
void SingleLeadECG_screen_deinit() { |
|||
// TODO |
|||
} |
|||
uint8_t SingleLeadECG_spi_init(void) { return 0; } |
|||
uint8_t SingleLeadECG_spi_deinit(void) { return 0; } |
|||
uint8_t SingleLeadECG_spi_cmd_data_gpio_init(void) { return 0; } |
|||
uint8_t SingleLeadECG_spi_cmd_data_gpio_deinit(void) { return 0; } |
|||
void SingleLeadECG_debug_print(const char *const fmt, ...) {} |
|||
uint8_t SingleLeadECG_reset_gpio_init(void) { return 0; } |
|||
uint8_t SingleLeadECG_reset_gpio_deinit(void) { return 0; } |
|||
uint8_t SingleLeadECG_spi_write_cmd(uint8_t *buf, uint16_t len) { // |
|||
ZERROR_CHECK(nrf_drv_spi_transfer(&m_screen_spi, buf, len, NULL, 0)); |
|||
return 0; |
|||
} |
|||
void SingleLeadECG_delay_ms(uint32_t ms) { nrf_delay_ms(ms); } |
|||
uint8_t SingleLeadECG_spi_cmd_data_gpio_write(uint8_t value) { |
|||
if (value) { |
|||
nrf_gpio_pin_set(SCREEN_A0PIN); |
|||
} else { |
|||
nrf_gpio_pin_clear(SCREEN_A0PIN); |
|||
} |
|||
return 0; |
|||
} |
|||
uint8_t SingleLeadECG_reset_gpio_write(uint8_t value) { |
|||
if (value) { |
|||
nrf_gpio_pin_set(SCREEN_RESET_PIN); |
|||
} else { |
|||
nrf_gpio_pin_clear(SCREEN_RESET_PIN); |
|||
} |
|||
return 0; |
|||
} |
|||
|
|||
/******************************************************************************* |
|||
* LED * |
|||
*******************************************************************************/ |
|||
void SingleLeadECG_led_init() { |
|||
znrf_gpio_cfg_output(LED_GREEN_PIN, NRF_GPIO_PIN_NOPULL); |
|||
znrf_gpio_cfg_output(LED_BLUE_PIN, NRF_GPIO_PIN_NOPULL); |
|||
} |
|||
void SingleLeadECG_led_green_set_state(bool state) { |
|||
if (state) { |
|||
nrf_gpio_pin_set(LED_GREEN_PIN); |
|||
} else { |
|||
nrf_gpio_pin_clear(LED_GREEN_PIN); |
|||
} |
|||
} |
|||
void SingleLeadECG_led_blue_set_state(bool state) { |
|||
if (state) { |
|||
nrf_gpio_pin_set(LED_BLUE_PIN); |
|||
} else { |
|||
nrf_gpio_pin_clear(LED_BLUE_PIN); |
|||
} |
|||
} |
|||
|
|||
/******************************************************************************* |
|||
* ecg * |
|||
*******************************************************************************/ |
|||
|
|||
void SingleLeadECG_ecg_init() { |
|||
nrf_saadc_channel_config_t channel_config = NRF_DRV_SAADC_DEFAULT_CHANNEL_CONFIG_SE(ECG_ADC_PIN); |
|||
channel_config.acq_time = NRF_SAADC_ACQTIME_40US; |
|||
ZERROR_CHECK(nrfx_saadc_channel_init(ECG_ADC_CHANNEL, &channel_config)); |
|||
|
|||
nrf_gpio_cfg_sense_input(ECG_NLOD_PIN, NRF_GPIO_PIN_NOPULL, NRF_GPIO_PIN_NOSENSE); |
|||
nrf_gpio_cfg_sense_input(ECG_PLOD_PIN, NRF_GPIO_PIN_NOPULL, NRF_GPIO_PIN_NOSENSE); |
|||
} |
|||
|
|||
bool SingleLeadECG_ecg_nlod_get_connected_state() { return nrf_gpio_pin_read(ECG_NLOD_PIN) == 0; } |
|||
bool SingleLeadECG_ecg_plod_get_connected_state() { return nrf_gpio_pin_read(ECG_PLOD_PIN) == 0; } |
|||
int16_t SingleLeadECG_ecg_plod_get_ecg_val() { return adc_channel_read_val(ECG_ADC_CHANNEL); } |
|||
|
|||
/******************************************************************************* |
|||
* BATTERY * |
|||
*******************************************************************************/ |
|||
void SingleLeadECG_battery_init() { |
|||
nrf_saadc_channel_config_t channel_config = NRF_DRV_SAADC_DEFAULT_CHANNEL_CONFIG_SE(BATTERY_ADC_PIN); |
|||
channel_config.acq_time = NRF_SAADC_ACQTIME_10US; |
|||
ZERROR_CHECK(nrfx_saadc_channel_init(BATTERY_ADC_CHANNEL, &channel_config)); |
|||
} |
|||
int16_t SingleLeadECG_battery_get_adc_val() { |
|||
int16_t val = adc_channel_read_val(BATTERY_ADC_CHANNEL); |
|||
return val; |
|||
} |
|||
|
|||
/******************************************************************************* |
|||
* eeprom * |
|||
*******************************************************************************/ |
|||
static const nrf_drv_twi_t m_eeprom_twi_master = NRF_DRV_TWI_INSTANCE(EEPROM_I2C_INSTANCE); |
|||
|
|||
void SingleLeadECG_eeprom_init() { |
|||
const nrf_drv_twi_config_t config = { |
|||
.scl = EEPROM_I2C_SCL_M, |
|||
.sda = EEPROM_I2C_SDA_M, |
|||
.frequency = NRF_DRV_TWI_FREQ_100K, |
|||
.interrupt_priority = APP_IRQ_PRIORITY_HIGH, |
|||
.clear_bus_init = false, |
|||
}; |
|||
|
|||
ZERROR_CHECK(nrf_drv_twi_init(&m_eeprom_twi_master, &config, NULL, NULL)); |
|||
nrf_drv_twi_enable(&m_eeprom_twi_master); |
|||
} |
|||
static uint8_t eeprom_cache[EEPROM_PAGE + 2]; |
|||
|
|||
static void assign_i2c_add(uint32_t add, bool wr, uint8_t *i2cadd, uint8_t *memadd0, uint8_t *memadd1) { |
|||
// DEVICE SELECT |
|||
// bit7 bit6 bit5 bit4 bit3 bit2 bit1 bit0 |
|||
// 1 0 1 0 E2 A17 A16 RW(W=0) |
|||
// |
|||
// PS: E2 参考原理图中的电平为0,所以bit3为0 |
|||
// |
|||
// MEM0 |
|||
// bit15 bit14 bit13 bit12 bit11 bit10 bit9 bit8 |
|||
// MEM1 |
|||
// bit7 bit6 bit5 bit4 bit3 bit2 bit1 bit0 |
|||
// |
|||
|
|||
*i2cadd = 0xA0; |
|||
uint8_t a16a17 = (add >> 16) & 0x03; |
|||
*i2cadd |= a16a17 << 1; |
|||
|
|||
*i2cadd = wr ? *i2cadd & 0xFE : *i2cadd | 0x01; |
|||
|
|||
*memadd0 = add >> 8; |
|||
*memadd1 = add & 0xFF; |
|||
} |
|||
|
|||
void SingleLeadECG_eeprom_write(uint16_t page, uint8_t *data, uint16_t len) { // |
|||
uint32_t addr = page * EEPROM_PAGE; |
|||
len = len > EEPROM_PAGE ? EEPROM_PAGE : len; |
|||
uint8_t deviceSelect = 0; |
|||
|
|||
assign_i2c_add(addr, true, &deviceSelect, &eeprom_cache[0], &eeprom_cache[1]); |
|||
nrf_drv_twi_tx(&m_eeprom_twi_master, deviceSelect, eeprom_cache, len + 2, false); |
|||
} |
|||
|
|||
void SingleLeadECG_eeprom_read(uint32_t add, uint8_t *data, uint16_t len) { |
|||
uint8_t deviceSelect = 0; |
|||
uint8_t wadd[2] = {0}; |
|||
|
|||
assign_i2c_add(add, false, &deviceSelect, &wadd[0], &wadd[1]); |
|||
nrf_drv_twi_tx(&m_eeprom_twi_master, deviceSelect, wadd, 2, false); |
|||
|
|||
deviceSelect |= 0x01; // read |
|||
nrf_drv_twi_rx(&m_eeprom_twi_master, deviceSelect, data, len); |
|||
} |
Write
Preview
Loading…
Cancel
Save
Reference in new issue