diff options
Diffstat (limited to 'drivers')
| -rw-r--r-- | drivers/arm/i2c_master.c | 12 | ||||
| -rw-r--r-- | drivers/arm/i2c_master.h | 1 | ||||
| -rw-r--r-- | drivers/haptic/DRV2605L.c | 129 | ||||
| -rw-r--r-- | drivers/haptic/DRV2605L.h | 394 | ||||
| -rw-r--r-- | drivers/qwiic/micro_oled.c | 691 | ||||
| -rw-r--r-- | drivers/qwiic/micro_oled.h | 134 | ||||
| -rw-r--r-- | drivers/qwiic/qwiic.c | 31 | ||||
| -rw-r--r-- | drivers/qwiic/qwiic.h | 28 | ||||
| -rw-r--r-- | drivers/qwiic/qwiic.mk | 18 | ||||
| -rw-r--r-- | drivers/qwiic/util/font5x7.h | 288 | ||||
| -rw-r--r-- | drivers/qwiic/util/font8x16.h | 127 |
11 files changed, 1849 insertions, 4 deletions
diff --git a/drivers/arm/i2c_master.c b/drivers/arm/i2c_master.c index de5843839..ab962ea95 100644 --- a/drivers/arm/i2c_master.c +++ b/drivers/arm/i2c_master.c | |||
| @@ -32,7 +32,7 @@ | |||
| 32 | 32 | ||
| 33 | static uint8_t i2c_address; | 33 | static uint8_t i2c_address; |
| 34 | 34 | ||
| 35 | // This configures the I2C clock to 400Mhz assuming a 72Mhz clock | 35 | // This configures the I2C clock to 400khz assuming a 72Mhz clock |
| 36 | // For more info : https://www.st.com/en/embedded-software/stsw-stm32126.html | 36 | // For more info : https://www.st.com/en/embedded-software/stsw-stm32126.html |
| 37 | static const I2CConfig i2cconfig = { | 37 | static const I2CConfig i2cconfig = { |
| 38 | STM32_TIMINGR_PRESC(15U) | | 38 | STM32_TIMINGR_PRESC(15U) | |
| @@ -45,10 +45,14 @@ static const I2CConfig i2cconfig = { | |||
| 45 | __attribute__ ((weak)) | 45 | __attribute__ ((weak)) |
| 46 | void i2c_init(void) | 46 | void i2c_init(void) |
| 47 | { | 47 | { |
| 48 | setPinInput(B6); // Try releasing special pins for a short time | 48 | //palSetGroupMode(GPIOB, GPIOB_PIN6 | GPIOB_PIN7, 0, PAL_MODE_INPUT); |
| 49 | setPinInput(B7); | 49 | |
| 50 | chThdSleepMilliseconds(10); | 50 | // Try releasing special pins for a short time |
| 51 | palSetPadMode(GPIOB, 6, PAL_MODE_INPUT); | ||
| 52 | palSetPadMode(GPIOB, 7, PAL_MODE_INPUT); | ||
| 51 | 53 | ||
| 54 | chThdSleepMilliseconds(10); | ||
| 55 | |||
| 52 | palSetPadMode(GPIOB, 6, PAL_MODE_ALTERNATE(4) | PAL_STM32_OTYPE_OPENDRAIN | PAL_STM32_PUPDR_PULLUP); | 56 | palSetPadMode(GPIOB, 6, PAL_MODE_ALTERNATE(4) | PAL_STM32_OTYPE_OPENDRAIN | PAL_STM32_PUPDR_PULLUP); |
| 53 | palSetPadMode(GPIOB, 7, PAL_MODE_ALTERNATE(4) | PAL_STM32_OTYPE_OPENDRAIN | PAL_STM32_PUPDR_PULLUP); | 57 | palSetPadMode(GPIOB, 7, PAL_MODE_ALTERNATE(4) | PAL_STM32_OTYPE_OPENDRAIN | PAL_STM32_PUPDR_PULLUP); |
| 54 | 58 | ||
diff --git a/drivers/arm/i2c_master.h b/drivers/arm/i2c_master.h index 591fa7f77..392760328 100644 --- a/drivers/arm/i2c_master.h +++ b/drivers/arm/i2c_master.h | |||
| @@ -34,6 +34,7 @@ void i2c_init(void); | |||
| 34 | uint8_t i2c_start(uint8_t address); | 34 | uint8_t i2c_start(uint8_t address); |
| 35 | uint8_t i2c_transmit(uint8_t address, uint8_t* data, uint16_t length, uint16_t timeout); | 35 | uint8_t i2c_transmit(uint8_t address, uint8_t* data, uint16_t length, uint16_t timeout); |
| 36 | uint8_t i2c_receive(uint8_t address, uint8_t* data, uint16_t length, uint16_t timeout); | 36 | uint8_t i2c_receive(uint8_t address, uint8_t* data, uint16_t length, uint16_t timeout); |
| 37 | uint8_t i2c_transmit_receive(uint8_t address, uint8_t * tx_body, uint16_t tx_length, uint8_t * rx_body, uint16_t rx_length); | ||
| 37 | uint8_t i2c_writeReg(uint8_t devaddr, uint8_t regaddr, uint8_t* data, uint16_t length, uint16_t timeout); | 38 | uint8_t i2c_writeReg(uint8_t devaddr, uint8_t regaddr, uint8_t* data, uint16_t length, uint16_t timeout); |
| 38 | uint8_t i2c_readReg(uint8_t devaddr, uint8_t* regaddr, uint8_t* data, uint16_t length, uint16_t timeout); | 39 | uint8_t i2c_readReg(uint8_t devaddr, uint8_t* regaddr, uint8_t* data, uint16_t length, uint16_t timeout); |
| 39 | uint8_t i2c_stop(uint16_t timeout); | 40 | uint8_t i2c_stop(uint16_t timeout); |
diff --git a/drivers/haptic/DRV2605L.c b/drivers/haptic/DRV2605L.c new file mode 100644 index 000000000..97ca292b9 --- /dev/null +++ b/drivers/haptic/DRV2605L.c | |||
| @@ -0,0 +1,129 @@ | |||
| 1 | /* Copyright 2018 ishtob | ||
| 2 | * Driver for DRV2605L written for QMK | ||
| 3 | * | ||
| 4 | * This program is free software: you can redistribute it and/or modify | ||
| 5 | * it under the terms of the GNU General Public License as published by | ||
| 6 | * the Free Software Foundation, either version 2 of the License, or | ||
| 7 | * (at your option) any later version. | ||
| 8 | * | ||
| 9 | * This program is distributed in the hope that it will be useful, | ||
| 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 12 | * GNU General Public License for more details. | ||
| 13 | * | ||
| 14 | * You should have received a copy of the GNU General Public License | ||
| 15 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
| 16 | */ | ||
| 17 | #include "DRV2605L.h" | ||
| 18 | #include "print.h" | ||
| 19 | #include <stdlib.h> | ||
| 20 | #include <stdio.h> | ||
| 21 | #include <math.h> | ||
| 22 | |||
| 23 | |||
| 24 | uint8_t DRV2605L_transfer_buffer[20]; | ||
| 25 | uint8_t DRV2605L_tx_register[0]; | ||
| 26 | uint8_t DRV2605L_read_buffer[0]; | ||
| 27 | uint8_t DRV2605L_read_register; | ||
| 28 | |||
| 29 | |||
| 30 | void DRV_write(uint8_t drv_register, uint8_t settings) { | ||
| 31 | DRV2605L_transfer_buffer[0] = drv_register; | ||
| 32 | DRV2605L_transfer_buffer[1] = settings; | ||
| 33 | i2c_transmit(DRV2605L_BASE_ADDRESS << 1, DRV2605L_transfer_buffer, 2, 100); | ||
| 34 | } | ||
| 35 | |||
| 36 | uint8_t DRV_read(uint8_t regaddress) { | ||
| 37 | DRV2605L_tx_register[0] = regaddress; | ||
| 38 | if (MSG_OK != i2c_transmit_receive(DRV2605L_BASE_ADDRESS << 1, | ||
| 39 | DRV2605L_tx_register, 1, | ||
| 40 | DRV2605L_read_buffer, 1 | ||
| 41 | )){ | ||
| 42 | printf("err reading reg \n"); | ||
| 43 | } | ||
| 44 | DRV2605L_read_register = (uint8_t)DRV2605L_read_buffer[0]; | ||
| 45 | return DRV2605L_read_register; | ||
| 46 | } | ||
| 47 | |||
| 48 | void DRV_init(void) | ||
| 49 | { | ||
| 50 | i2c_init(); | ||
| 51 | i2c_start(DRV2605L_BASE_ADDRESS); | ||
| 52 | |||
| 53 | /* 0x07 sets DRV2605 into calibration mode */ | ||
| 54 | DRV_write(DRV_MODE,0x07); | ||
| 55 | |||
| 56 | // DRV_write(DRV_FEEDBACK_CTRL,0xB6); | ||
| 57 | |||
| 58 | #if FB_ERM_LRA == 0 | ||
| 59 | /* ERM settings */ | ||
| 60 | DRV_write(DRV_RATED_VOLT, (RATED_VOLTAGE/21.33)*1000); | ||
| 61 | #if ERM_OPEN_LOOP == 0 | ||
| 62 | DRV_write(DRV_OVERDRIVE_CLAMP_VOLT, (((V_PEAK*(DRIVE_TIME+BLANKING_TIME+IDISS_TIME))/0.02133)/(DRIVE_TIME-0.0003))); | ||
| 63 | #elif ERM_OPEN_LOOP == 1 | ||
| 64 | DRV_write(DRV_OVERDRIVE_CLAMP_VOLT, (V_PEAK/0.02196)); | ||
| 65 | #endif | ||
| 66 | #elif FB_ERM_LRA == 1 | ||
| 67 | DRV_write(DRV_RATED_VOLT, ((V_RMS * sqrt(1 - ((4 * ((150+(SAMPLE_TIME*50))*0.000001)) + 0.0003)* F_LRA)/0.02071))); | ||
| 68 | #if LRA_OPEN_LOOP == 0 | ||
| 69 | DRV_write(DRV_OVERDRIVE_CLAMP_VOLT, ((V_PEAK/sqrt(1-(F_LRA*0.0008))/0.02133))); | ||
| 70 | #elif LRA_OPEN_LOOP == 1 | ||
| 71 | DRV_write(DRV_OVERDRIVE_CLAMP_VOLT, (V_PEAK/0.02196)); | ||
| 72 | #endif | ||
| 73 | #endif | ||
| 74 | |||
| 75 | DRVREG_FBR FB_SET; | ||
| 76 | FB_SET.Bits.ERM_LRA = FB_ERM_LRA; | ||
| 77 | FB_SET.Bits.BRAKE_FACTOR = FB_BRAKEFACTOR; | ||
| 78 | FB_SET.Bits.LOOP_GAIN =FB_LOOPGAIN; | ||
| 79 | FB_SET.Bits.BEMF_GAIN = 0; /* auto-calibration populates this field*/ | ||
| 80 | DRV_write(DRV_FEEDBACK_CTRL, (uint8_t) FB_SET.Byte); | ||
| 81 | DRVREG_CTRL1 C1_SET; | ||
| 82 | C1_SET.Bits.C1_DRIVE_TIME = DRIVE_TIME; | ||
| 83 | C1_SET.Bits.C1_AC_COUPLE = AC_COUPLE; | ||
| 84 | C1_SET.Bits.C1_STARTUP_BOOST = STARTUP_BOOST; | ||
| 85 | DRV_write(DRV_CTRL_1, (uint8_t) C1_SET.Byte); | ||
| 86 | DRVREG_CTRL2 C2_SET; | ||
| 87 | C2_SET.Bits.C2_BIDIR_INPUT = BIDIR_INPUT; | ||
| 88 | C2_SET.Bits.C2_BRAKE_STAB = BRAKE_STAB; | ||
| 89 | C2_SET.Bits.C2_SAMPLE_TIME = SAMPLE_TIME; | ||
| 90 | C2_SET.Bits.C2_BLANKING_TIME = BLANKING_TIME; | ||
| 91 | C2_SET.Bits.C2_IDISS_TIME = IDISS_TIME; | ||
| 92 | DRV_write(DRV_CTRL_2, (uint8_t) C2_SET.Byte); | ||
| 93 | DRVREG_CTRL3 C3_SET; | ||
| 94 | C3_SET.Bits.C3_LRA_OPEN_LOOP = LRA_OPEN_LOOP; | ||
| 95 | C3_SET.Bits.C3_N_PWM_ANALOG = N_PWM_ANALOG; | ||
| 96 | C3_SET.Bits.C3_LRA_DRIVE_MODE = LRA_DRIVE_MODE; | ||
| 97 | C3_SET.Bits.C3_DATA_FORMAT_RTO = DATA_FORMAT_RTO; | ||
| 98 | C3_SET.Bits.C3_SUPPLY_COMP_DIS = SUPPLY_COMP_DIS; | ||
| 99 | C3_SET.Bits.C3_ERM_OPEN_LOOP = ERM_OPEN_LOOP; | ||
| 100 | C3_SET.Bits.C3_NG_THRESH = NG_THRESH; | ||
| 101 | DRV_write(DRV_CTRL_3, (uint8_t) C3_SET.Byte); | ||
| 102 | DRVREG_CTRL4 C4_SET; | ||
| 103 | C4_SET.Bits.C4_ZC_DET_TIME = ZC_DET_TIME; | ||
| 104 | C4_SET.Bits.C4_AUTO_CAL_TIME = AUTO_CAL_TIME; | ||
| 105 | DRV_write(DRV_CTRL_4, (uint8_t) C4_SET.Byte); | ||
| 106 | DRV_write(DRV_LIB_SELECTION,LIB_SELECTION); | ||
| 107 | //start autocalibration | ||
| 108 | DRV_write(DRV_GO, 0x01); | ||
| 109 | |||
| 110 | /* 0x00 sets DRV2605 out of standby and to use internal trigger | ||
| 111 | * 0x01 sets DRV2605 out of standby and to use external trigger */ | ||
| 112 | DRV_write(DRV_MODE,0x00); | ||
| 113 | |||
| 114 | /* 0x06: LRA library */ | ||
| 115 | DRV_write(DRV_WAVEFORM_SEQ_1, 0x01); | ||
| 116 | |||
| 117 | /* 0xB9: LRA, 4x brake factor, medium gain, 7.5x back EMF | ||
| 118 | * 0x39: ERM, 4x brake factor, medium gain, 1.365x back EMF */ | ||
| 119 | |||
| 120 | /* TODO: setup auto-calibration as part of initiation */ | ||
| 121 | |||
| 122 | } | ||
| 123 | |||
| 124 | void DRV_pulse(uint8_t sequence) | ||
| 125 | { | ||
| 126 | DRV_write(DRV_GO, 0x00); | ||
| 127 | DRV_write(DRV_WAVEFORM_SEQ_1, sequence); | ||
| 128 | DRV_write(DRV_GO, 0x01); | ||
| 129 | } \ No newline at end of file | ||
diff --git a/drivers/haptic/DRV2605L.h b/drivers/haptic/DRV2605L.h new file mode 100644 index 000000000..de9d294e9 --- /dev/null +++ b/drivers/haptic/DRV2605L.h | |||
| @@ -0,0 +1,394 @@ | |||
| 1 | /* Copyright 2018 ishtob | ||
| 2 | * Driver for DRV2605L written for QMK | ||
| 3 | * | ||
| 4 | * This program is free software: you can redistribute it and/or modify | ||
| 5 | * it under the terms of the GNU General Public License as published by | ||
| 6 | * the Free Software Foundation, either version 2 of the License, or | ||
| 7 | * (at your option) any later version. | ||
| 8 | * | ||
| 9 | * This program is distributed in the hope that it will be useful, | ||
| 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 12 | * GNU General Public License for more details. | ||
| 13 | * | ||
| 14 | * You should have received a copy of the GNU General Public License | ||
| 15 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
| 16 | */ | ||
| 17 | |||
| 18 | #pragma once | ||
| 19 | #include "i2c_master.h" | ||
| 20 | |||
| 21 | /* Initialization settings | ||
| 22 | |||
| 23 | * Feedback Control Settings */ | ||
| 24 | #ifndef FB_ERM_LRA | ||
| 25 | #define FB_ERM_LRA 1 /* For ERM:0 or LRA:1*/ | ||
| 26 | #endif | ||
| 27 | #ifndef FB_BRAKEFACTOR | ||
| 28 | #define FB_BRAKEFACTOR 3 /* For 1x:0, 2x:1, 3x:2, 4x:3, 6x:4, 8x:5, 16x:6, Disable Braking:7 */ | ||
| 29 | #endif | ||
| 30 | #ifndef FB_LOOPGAIN | ||
| 31 | #define FB_LOOPGAIN 1 /* For Low:0, Medium:1, High:2, Very High:3 */ | ||
| 32 | #endif | ||
| 33 | |||
| 34 | #ifndef RATED_VOLTAGE | ||
| 35 | #define RATED_VOLTAGE 2 /* 2v as safe range in case device voltage is not set */ | ||
| 36 | #ifndef V_PEAK | ||
| 37 | #define V_PEAK 2.8 | ||
| 38 | #endif | ||
| 39 | #endif | ||
| 40 | |||
| 41 | /* LRA specific settings */ | ||
| 42 | #if FB_ERM_LRA == 1 | ||
| 43 | #ifndef V_RMS | ||
| 44 | #define V_RMS 2.0 | ||
| 45 | #endif | ||
| 46 | #ifndef V_PEAK | ||
| 47 | #define V_PEAK 2.1 | ||
| 48 | #endif | ||
| 49 | #ifndef F_LRA | ||
| 50 | #define F_LRA 205 | ||
| 51 | #endif | ||
| 52 | #endif | ||
| 53 | |||
| 54 | /* Library Selection */ | ||
| 55 | #ifndef LIB_SELECTION | ||
| 56 | #if FB_ERM_LRA == 1 | ||
| 57 | #define LIB_SELECTION 6 /* For Empty:0' TS2200 library A to D:1-5, LRA Library: 6 */ | ||
| 58 | #else | ||
| 59 | #define LIB_SELECTION 1 | ||
| 60 | #endif | ||
| 61 | #endif | ||
| 62 | |||
| 63 | /* Control 1 register settings */ | ||
| 64 | #ifndef DRIVE_TIME | ||
| 65 | #define DRIVE_TIME 25 | ||
| 66 | #endif | ||
| 67 | #ifndef AC_COUPLE | ||
| 68 | #define AC_COUPLE 0 | ||
| 69 | #endif | ||
| 70 | #ifndef STARTUP_BOOST | ||
| 71 | #define STARTUP_BOOST 1 | ||
| 72 | #endif | ||
| 73 | |||
| 74 | /* Control 2 Settings */ | ||
| 75 | #ifndef BIDIR_INPUT | ||
| 76 | #define BIDIR_INPUT 1 | ||
| 77 | #endif | ||
| 78 | #ifndef BRAKE_STAB | ||
| 79 | #define BRAKE_STAB 1 /* Loopgain is reduced when braking is almost complete to improve stability */ | ||
| 80 | #endif | ||
| 81 | #ifndef SAMPLE_TIME | ||
| 82 | #define SAMPLE_TIME 3 | ||
| 83 | #endif | ||
| 84 | #ifndef BLANKING_TIME | ||
| 85 | #define BLANKING_TIME 1 | ||
| 86 | #endif | ||
| 87 | #ifndef IDISS_TIME | ||
| 88 | #define IDISS_TIME 1 | ||
| 89 | #endif | ||
| 90 | |||
| 91 | /* Control 3 settings */ | ||
| 92 | #ifndef NG_THRESH | ||
| 93 | #define NG_THRESH 2 | ||
| 94 | #endif | ||
| 95 | #ifndef ERM_OPEN_LOOP | ||
| 96 | #define ERM_OPEN_LOOP 1 | ||
| 97 | #endif | ||
| 98 | #ifndef SUPPLY_COMP_DIS | ||
| 99 | #define SUPPLY_COMP_DIS 0 | ||
| 100 | #endif | ||
| 101 | #ifndef DATA_FORMAT_RTO | ||
| 102 | #define DATA_FORMAT_RTO 0 | ||
| 103 | #endif | ||
| 104 | #ifndef LRA_DRIVE_MODE | ||
| 105 | #define LRA_DRIVE_MODE 0 | ||
| 106 | #endif | ||
| 107 | #ifndef N_PWM_ANALOG | ||
| 108 | #define N_PWM_ANALOG 0 | ||
| 109 | #endif | ||
| 110 | #ifndef LRA_OPEN_LOOP | ||
| 111 | #define LRA_OPEN_LOOP 0 | ||
| 112 | #endif | ||
| 113 | |||
| 114 | /* Control 4 settings */ | ||
| 115 | #ifndef ZC_DET_TIME | ||
| 116 | #define ZC_DET_TIME 0 | ||
| 117 | #endif | ||
| 118 | #ifndef AUTO_CAL_TIME | ||
| 119 | #define AUTO_CAL_TIME 3 | ||
| 120 | #endif | ||
| 121 | |||
| 122 | /* register defines -------------------------------------------------------- */ | ||
| 123 | #define DRV2605L_BASE_ADDRESS 0x5A /* DRV2605L Base address */ | ||
| 124 | #define DRV_STATUS 0x00 | ||
| 125 | #define DRV_MODE 0x01 | ||
| 126 | #define DRV_RTP_INPUT 0x02 | ||
| 127 | #define DRV_LIB_SELECTION 0x03 | ||
| 128 | #define DRV_WAVEFORM_SEQ_1 0x04 | ||
| 129 | #define DRV_WAVEFORM_SEQ_2 0x05 | ||
| 130 | #define DRV_WAVEFORM_SEQ_3 0x06 | ||
| 131 | #define DRV_WAVEFORM_SEQ_4 0x07 | ||
| 132 | #define DRV_WAVEFORM_SEQ_5 0x08 | ||
| 133 | #define DRV_WAVEFORM_SEQ_6 0x09 | ||
| 134 | #define DRV_WAVEFORM_SEQ_7 0x0A | ||
| 135 | #define DRV_WAVEFORM_SEQ_8 0x0B | ||
| 136 | #define DRV_GO 0x0C | ||
| 137 | #define DRV_OVERDRIVE_TIME_OFFSET 0x0D | ||
| 138 | #define DRV_SUSTAIN_TIME_OFFSET_P 0x0E | ||
| 139 | #define DRV_SUSTAIN_TIME_OFFSET_N 0x0F | ||
| 140 | #define DRV_BRAKE_TIME_OFFSET 0x10 | ||
| 141 | #define DRV_AUDIO_2_VIBE_CTRL 0x11 | ||
| 142 | #define DRV_AUDIO_2_VIBE_MIN_IN 0x12 | ||
| 143 | #define DRV_AUDIO_2_VIBE_MAX_IN 0x13 | ||
| 144 | #define DRV_AUDIO_2_VIBE_MIN_OUTDRV 0x14 | ||
| 145 | #define DRV_AUDIO_2_VIBE_MAX_OUTDRV 0x15 | ||
| 146 | #define DRV_RATED_VOLT 0x16 | ||
| 147 | #define DRV_OVERDRIVE_CLAMP_VOLT 0x17 | ||
| 148 | #define DRV_AUTO_CALIB_COMP_RESULT 0x18 | ||
| 149 | #define DRV_AUTO_CALIB_BEMF_RESULT 0x19 | ||
| 150 | #define DRV_FEEDBACK_CTRL 0x1A | ||
| 151 | #define DRV_CTRL_1 0x1B | ||
| 152 | #define DRV_CTRL_2 0x1C | ||
| 153 | #define DRV_CTRL_3 0x1D | ||
| 154 | #define DRV_CTRL_4 0x1E | ||
| 155 | #define DRV_CTRL_5 0x1F | ||
| 156 | #define DRV_OPEN_LOOP_PERIOD 0x20 | ||
| 157 | #define DRV_VBAT_VOLT_MONITOR 0x21 | ||
| 158 | #define DRV_LRA_RESONANCE_PERIOD 0x22 | ||
| 159 | |||
| 160 | void DRV_init(void); | ||
| 161 | void DRV_write(const uint8_t drv_register, const uint8_t settings); | ||
| 162 | uint8_t DRV_read(const uint8_t regaddress); | ||
| 163 | void DRV_pulse(const uint8_t sequence); | ||
| 164 | |||
| 165 | |||
| 166 | typedef enum DRV_EFFECT{ | ||
| 167 | clear_sequence = 0, | ||
| 168 | strong_click = 1, | ||
| 169 | strong_click_60 = 2, | ||
| 170 | strong_click_30 = 3, | ||
| 171 | sharp_click = 4, | ||
| 172 | sharp_click_60 = 5, | ||
| 173 | sharp_click_30 = 6, | ||
| 174 | soft_bump = 7, | ||
| 175 | soft_bump_60 = 8, | ||
| 176 | soft_bump_30 = 9, | ||
| 177 | dbl_click = 10, | ||
| 178 | dbl_click_60 = 11, | ||
| 179 | trp_click = 12, | ||
| 180 | soft_fuzz = 13, | ||
| 181 | strong_buzz = 14, | ||
| 182 | alert_750ms = 15, | ||
| 183 | alert_1000ms = 16, | ||
| 184 | strong_click1 = 17, | ||
| 185 | strong_click2_80 = 18, | ||
| 186 | strong_click3_60 = 19, | ||
| 187 | strong_click4_30 = 20, | ||
| 188 | medium_click1 = 21, | ||
| 189 | medium_click2_80 = 22, | ||
| 190 | medium_click3_60 = 23, | ||
| 191 | sharp_tick1 = 24, | ||
| 192 | sharp_tick2_80 = 25, | ||
| 193 | sharp_tick3_60 = 26, | ||
| 194 | sh_dblclick_str = 27, | ||
| 195 | sh_dblclick_str_80 = 28, | ||
| 196 | sh_dblclick_str_60 = 29, | ||
| 197 | sh_dblclick_str_30 = 30, | ||
| 198 | sh_dblclick_med = 31, | ||
| 199 | sh_dblclick_med_80 = 32, | ||
| 200 | sh_dblclick_med_60 = 33, | ||
| 201 | sh_dblsharp_tick = 34, | ||
| 202 | sh_dblsharp_tick_80 = 35, | ||
| 203 | sh_dblsharp_tick_60 = 36, | ||
| 204 | lg_dblclick_str = 37, | ||
| 205 | lg_dblclick_str_80 = 38, | ||
| 206 | lg_dblclick_str_60 = 39, | ||
| 207 | lg_dblclick_str_30 = 40, | ||
| 208 | lg_dblclick_med = 41, | ||
| 209 | lg_dblclick_med_80 = 42, | ||
| 210 | lg_dblclick_med_60 = 43, | ||
| 211 | lg_dblsharp_tick = 44, | ||
| 212 | lg_dblsharp_tick_80 = 45, | ||
| 213 | lg_dblsharp_tick_60 = 46, | ||
| 214 | buzz = 47, | ||
| 215 | buzz_80 = 48, | ||
| 216 | buzz_60 = 49, | ||
| 217 | buzz_40 = 50, | ||
| 218 | buzz_20 = 51, | ||
| 219 | pulsing_strong = 52, | ||
| 220 | pulsing_strong_80 = 53, | ||
| 221 | pulsing_medium = 54, | ||
| 222 | pulsing_medium_80 = 55, | ||
| 223 | pulsing_sharp = 56, | ||
| 224 | pulsing_sharp_80 = 57, | ||
| 225 | transition_click = 58, | ||
| 226 | transition_click_80 = 59, | ||
| 227 | transition_click_60 = 60, | ||
| 228 | transition_click_40 = 61, | ||
| 229 | transition_click_20 = 62, | ||
| 230 | transition_click_10 = 63, | ||
| 231 | transition_hum = 64, | ||
| 232 | transition_hum_80 = 65, | ||
| 233 | transition_hum_60 = 66, | ||
| 234 | transition_hum_40 = 67, | ||
| 235 | transition_hum_20 = 68, | ||
| 236 | transition_hum_10 = 69, | ||
| 237 | transition_rampdown_long_smooth1 = 70, | ||
| 238 | transition_rampdown_long_smooth2 = 71, | ||
| 239 | transition_rampdown_med_smooth1 = 72, | ||
| 240 | transition_rampdown_med_smooth2 = 73, | ||
| 241 | transition_rampdown_short_smooth1 = 74, | ||
| 242 | transition_rampdown_short_smooth2 = 75, | ||
| 243 | transition_rampdown_long_sharp1 = 76, | ||
| 244 | transition_rampdown_long_sharp2 = 77, | ||
| 245 | transition_rampdown_med_sharp1 = 78, | ||
| 246 | transition_rampdown_med_sharp2 = 79, | ||
| 247 | transition_rampdown_short_sharp1 = 80, | ||
| 248 | transition_rampdown_short_sharp2 = 81, | ||
| 249 | transition_rampup_long_smooth1 = 82, | ||
| 250 | transition_rampup_long_smooth2 = 83, | ||
| 251 | transition_rampup_med_smooth1 = 84, | ||
| 252 | transition_rampup_med_smooth2 = 85, | ||
| 253 | transition_rampup_short_smooth1 = 86, | ||
| 254 | transition_rampup_short_smooth2 = 87, | ||
| 255 | transition_rampup_long_sharp1 = 88, | ||
| 256 | transition_rampup_long_sharp2 = 89, | ||
| 257 | transition_rampup_med_sharp1 = 90, | ||
| 258 | transition_rampup_med_sharp2 = 91, | ||
| 259 | transition_rampup_short_sharp1 = 92, | ||
| 260 | transition_rampup_short_sharp2 = 93, | ||
| 261 | transition_rampdown_long_smooth1_50 = 94, | ||
| 262 | transition_rampdown_long_smooth2_50 = 95, | ||
| 263 | transition_rampdown_med_smooth1_50 = 96, | ||
| 264 | transition_rampdown_med_smooth2_50 = 97, | ||
| 265 | transition_rampdown_short_smooth1_50 = 98, | ||
| 266 | transition_rampdown_short_smooth2_50 = 99, | ||
| 267 | transition_rampdown_long_sharp1_50 = 100, | ||
| 268 | transition_rampdown_long_sharp2_50 = 101, | ||
| 269 | transition_rampdown_med_sharp1_50 = 102, | ||
| 270 | transition_rampdown_med_sharp2_50 = 103, | ||
| 271 | transition_rampdown_short_sharp1_50 = 104, | ||
| 272 | transition_rampdown_short_sharp2_50 = 105, | ||
| 273 | transition_rampup_long_smooth1_50 = 106, | ||
| 274 | transition_rampup_long_smooth2_50 = 107, | ||
| 275 | transition_rampup_med_smooth1_50 = 108, | ||
| 276 | transition_rampup_med_smooth2_50 = 109, | ||
| 277 | transition_rampup_short_smooth1_50 = 110, | ||
| 278 | transition_rampup_short_smooth2_50 = 111, | ||
| 279 | transition_rampup_long_sharp1_50 = 112, | ||
| 280 | transition_rampup_long_sharp2_50 = 113, | ||
| 281 | transition_rampup_med_sharp1_50 = 114, | ||
| 282 | transition_rampup_med_sharp2_50 = 115, | ||
| 283 | transition_rampup_short_sharp1_50 = 116, | ||
| 284 | transition_rampup_short_sharp2_50 = 117, | ||
| 285 | long_buzz_for_programmatic_stopping = 118, | ||
| 286 | smooth_hum1_50 = 119, | ||
| 287 | smooth_hum2_40 = 120, | ||
| 288 | smooth_hum3_30 = 121, | ||
| 289 | smooth_hum4_20 = 122, | ||
| 290 | smooth_hum5_10 = 123, | ||
| 291 | } DRV_EFFECT; | ||
| 292 | |||
| 293 | /* Register bit array unions */ | ||
| 294 | |||
| 295 | typedef union DRVREG_STATUS { /* register 0x00 */ | ||
| 296 | uint8_t Byte; | ||
| 297 | struct { | ||
| 298 | uint8_t OC_DETECT :1; /* set to 1 when overcurrent event is detected */ | ||
| 299 | uint8_t OVER_TEMP :1; /* set to 1 when device exceeds temp threshold */ | ||
| 300 | uint8_t FB_STS :1; /* set to 1 when feedback controller has timed out */ | ||
| 301 | /* auto-calibration routine and diagnostic result | ||
| 302 | * result | auto-calibation | diagnostic | | ||
| 303 | * 0 | passed | actuator func normal | | ||
| 304 | * 1 | failed | actuator func fault* | | ||
| 305 | * * actuator is not present or is shorted, timing out, or giving out–of-range back-EMF */ | ||
| 306 | uint8_t DIAG_RESULT :1; | ||
| 307 | uint8_t :1; | ||
| 308 | uint8_t DEVICE_ID :3; /* Device IDs 3: DRV2605 4: DRV2604 5: DRV2604L 6: DRV2605L */ | ||
| 309 | } Bits; | ||
| 310 | } DRVREG_STATUS; | ||
| 311 | |||
| 312 | typedef union DRVREG_MODE { /* register 0x01 */ | ||
| 313 | uint8_t Byte; | ||
| 314 | struct { | ||
| 315 | uint8_t MODE :3; /* Mode setting */ | ||
| 316 | uint8_t :3; | ||
| 317 | uint8_t STANDBY :1; /* 0:standby 1:ready */ | ||
| 318 | } Bits; | ||
| 319 | } DRVREG_MODE; | ||
| 320 | |||
| 321 | typedef union DRVREG_WAIT { | ||
| 322 | uint8_t Byte; | ||
| 323 | struct { | ||
| 324 | uint8_t WAIT_MODE :1; /* Set to 1 to interpret as wait for next 7 bits x10ms */ | ||
| 325 | uint8_t WAIT_TIME :7; | ||
| 326 | } Bits; | ||
| 327 | } DRVREG_WAIT; | ||
| 328 | |||
| 329 | typedef union DRVREG_FBR{ /* register 0x1A */ | ||
| 330 | uint8_t Byte; | ||
| 331 | struct { | ||
| 332 | uint8_t BEMF_GAIN :2; | ||
| 333 | uint8_t LOOP_GAIN :2; | ||
| 334 | uint8_t BRAKE_FACTOR :3; | ||
| 335 | uint8_t ERM_LRA :1; | ||
| 336 | } Bits; | ||
| 337 | } DRVREG_FBR; | ||
| 338 | |||
| 339 | typedef union DRVREG_CTRL1{ /* register 0x1B */ | ||
| 340 | uint8_t Byte; | ||
| 341 | struct { | ||
| 342 | uint8_t C1_DRIVE_TIME :5; | ||
| 343 | uint8_t C1_AC_COUPLE :1; | ||
| 344 | uint8_t :1; | ||
| 345 | uint8_t C1_STARTUP_BOOST :1; | ||
| 346 | } Bits; | ||
| 347 | } DRVREG_CTRL1; | ||
| 348 | |||
| 349 | typedef union DRVREG_CTRL2{ /* register 0x1C */ | ||
| 350 | uint8_t Byte; | ||
| 351 | struct { | ||
| 352 | uint8_t C2_IDISS_TIME :2; | ||
| 353 | uint8_t C2_BLANKING_TIME :2; | ||
| 354 | uint8_t C2_SAMPLE_TIME :2; | ||
| 355 | uint8_t C2_BRAKE_STAB :1; | ||
| 356 | uint8_t C2_BIDIR_INPUT :1; | ||
| 357 | } Bits; | ||
| 358 | } DRVREG_CTRL2; | ||
| 359 | |||
| 360 | typedef union DRVREG_CTRL3{ /* register 0x1D */ | ||
| 361 | uint8_t Byte; | ||
| 362 | struct { | ||
| 363 | uint8_t C3_LRA_OPEN_LOOP :1; | ||
| 364 | uint8_t C3_N_PWM_ANALOG :1; | ||
| 365 | uint8_t C3_LRA_DRIVE_MODE :1; | ||
| 366 | uint8_t C3_DATA_FORMAT_RTO :1; | ||
| 367 | uint8_t C3_SUPPLY_COMP_DIS :1; | ||
| 368 | uint8_t C3_ERM_OPEN_LOOP :1; | ||
| 369 | uint8_t C3_NG_THRESH :2; | ||
| 370 | } Bits; | ||
| 371 | } DRVREG_CTRL3; | ||
| 372 | |||
| 373 | typedef union DRVREG_CTRL4{ /* register 0x1E */ | ||
| 374 | uint8_t Byte; | ||
| 375 | struct { | ||
| 376 | uint8_t C4_OTP_PROGRAM :1; | ||
| 377 | uint8_t :1; | ||
| 378 | uint8_t C4_OTP_STATUS :1; | ||
| 379 | uint8_t :1; | ||
| 380 | uint8_t C4_AUTO_CAL_TIME :2; | ||
| 381 | uint8_t C4_ZC_DET_TIME :2; | ||
| 382 | } Bits; | ||
| 383 | } DRVREG_CTRL4; | ||
| 384 | |||
| 385 | typedef union DRVREG_CTRL5{ /* register 0x1F */ | ||
| 386 | uint8_t Byte; | ||
| 387 | struct { | ||
| 388 | uint8_t C5_IDISS_TIME :2; | ||
| 389 | uint8_t C5_BLANKING_TIME :2; | ||
| 390 | uint8_t C5_PLAYBACK_INTERVAL :1; | ||
| 391 | uint8_t C5_LRA_AUTO_OPEN_LOOP :1; | ||
| 392 | uint8_t C5_AUTO_OL_CNT :2; | ||
| 393 | } Bits; | ||
| 394 | } DRVREG_CTRL5; \ No newline at end of file | ||
diff --git a/drivers/qwiic/micro_oled.c b/drivers/qwiic/micro_oled.c new file mode 100644 index 000000000..35c5d6ee1 --- /dev/null +++ b/drivers/qwiic/micro_oled.c | |||
| @@ -0,0 +1,691 @@ | |||
| 1 | /* Jim Lindblom @ SparkFun Electronics | ||
| 2 | * October 26, 2014 | ||
| 3 | * https://github.com/sparkfun/Micro_OLED_Breakout/tree/master/Firmware/Arduino/libraries/SFE_MicroOLED | ||
| 4 | * | ||
| 5 | * Modified by: | ||
| 6 | * Emil Varughese @ Edwin Robotics Pvt. Ltd. | ||
| 7 | * July 27, 2015 | ||
| 8 | * https://github.com/emil01/SparkFun_Micro_OLED_Arduino_Library/ | ||
| 9 | * | ||
| 10 | * This code was heavily based around the MicroView library, written by GeekAmmo | ||
| 11 | * (https://github.com/geekammo/MicroView-Arduino-Library). | ||
| 12 | * | ||
| 13 | * Adapted for QMK by: | ||
| 14 | * Jack Humbert <jack.humb@gmail.com> | ||
| 15 | * October 11, 2018 | ||
| 16 | * | ||
| 17 | * This program is free software: you can redistribute it and/or modify | ||
| 18 | * it under the terms of the GNU General Public License as published by | ||
| 19 | * the Free Software Foundation, either version 3 of the License, or | ||
| 20 | * (at your option) any later version. | ||
| 21 | * | ||
| 22 | * This program is distributed in the hope that it will be useful, | ||
| 23 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 24 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 25 | * GNU General Public License for more details. | ||
| 26 | * | ||
| 27 | * You should have received a copy of the GNU General Public License | ||
| 28 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
| 29 | */ | ||
| 30 | #include "micro_oled.h" | ||
| 31 | #include <stdlib.h> | ||
| 32 | #include "util/font5x7.h" | ||
| 33 | #include "util/font8x16.h" | ||
| 34 | #include "string.h" | ||
| 35 | |||
| 36 | #define TOTALFONTS 2 | ||
| 37 | const unsigned char * fonts_pointer[]= { font5x7, font8x16 }; | ||
| 38 | |||
| 39 | uint8_t foreColor,drawMode,fontWidth, fontHeight, fontType, fontStartChar, fontTotalChar, cursorX, cursorY; | ||
| 40 | uint16_t fontMapWidth; | ||
| 41 | |||
| 42 | #define _BV(x) (1 << (x)) | ||
| 43 | #define swap(a, b) { uint8_t t = a; a = b; b = t; } | ||
| 44 | |||
| 45 | uint8_t micro_oled_transfer_buffer[20]; | ||
| 46 | static uint8_t micro_oled_screen_current[LCDWIDTH*LCDWIDTH/8] = { 0 }; | ||
| 47 | |||
| 48 | /* LCD Memory organised in 64 horizontal pixel and 6 rows of byte | ||
| 49 | B B .............B ----- | ||
| 50 | y y .............y \ | ||
| 51 | t t .............t \ | ||
| 52 | e e .............e \ | ||
| 53 | 0 1 .............63 \ | ||
| 54 | \ | ||
| 55 | D0 D0.............D0 \ | ||
| 56 | D1 D1.............D1 / ROW 0 | ||
| 57 | D2 D2.............D2 / | ||
| 58 | D3 D3.............D3 / | ||
| 59 | D4 D4.............D4 / | ||
| 60 | D5 D5.............D5 / | ||
| 61 | D6 D6.............D6 / | ||
| 62 | D7 D7.............D7 ---- | ||
| 63 | */ | ||
| 64 | |||
| 65 | #if LCDWIDTH == 64 | ||
| 66 | #if LCDWIDTH == 48 | ||
| 67 | static uint8_t micro_oled_screen_buffer[] = { | ||
| 68 | // QMK Logo - generated at http://www.majer.ch/lcd/adf_bitmap.php | ||
| 69 | //64x48 image | ||
| 70 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 71 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 72 | 0x00, 0xF0, 0xF0, 0x00, 0x00, 0x00, 0xF0, 0xF0, 0x00, 0x00, | ||
| 73 | 0x00, 0xF0, 0xF0, 0x00, 0x00, 0x00, 0xF0, 0xF0, 0x00, 0x00, | ||
| 74 | 0x00, 0xF0, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 75 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 76 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 77 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x60, 0x60, 0x60, | ||
| 78 | 0xF8, 0xFE, 0xFE, 0xFF, 0xFF, 0xFF, 0x1F, 0x1F, 0xFF, 0xFF, | ||
| 79 | 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x1F, 0x1F, 0xFF, 0xFF, 0xFF, | ||
| 80 | 0xFF, 0xFF, 0xFF, 0xFF, 0x1F, 0x1F, 0xFF, 0xFF, 0xFF, 0xFE, | ||
| 81 | 0xFE, 0xF8, 0x60, 0x60, 0x60, 0x60, 0x00, 0x00, 0x00, 0x00, | ||
| 82 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 83 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 84 | 0x8C, 0x8C, 0x8C, 0x8C, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | ||
| 85 | 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, | ||
| 86 | 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, | ||
| 87 | 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x8C, 0x8C, 0x8C, 0x8C, | ||
| 88 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 89 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 90 | 0x00, 0x00, 0x00, 0x00, 0x31, 0x31, 0x31, 0x31, 0xFF, 0xFF, | ||
| 91 | 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0xF8, 0xF1, 0xE3, 0xE7, 0xCF, | ||
| 92 | 0xCF, 0xCF, 0xCF, 0x00, 0x00, 0xCF, 0xCF, 0xCF, 0xC7, 0xE7, | ||
| 93 | 0xE3, 0xF1, 0xF8, 0xFC, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | ||
| 94 | 0x31, 0x31, 0x31, 0x31, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 95 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 96 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x06, | ||
| 97 | 0x06, 0x06, 0x1F, 0x7F, 0x7F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | ||
| 98 | 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xF8, 0xF8, 0xFF, | ||
| 99 | 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | ||
| 100 | 0xFF, 0x7F, 0x7F, 0x1F, 0x06, 0x06, 0x06, 0x06, 0x00, 0x00, | ||
| 101 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 102 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 103 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 104 | 0x00, 0x0F, 0x0F, 0x00, 0x00, 0x00, 0x0F, 0x0F, 0x00, 0x00, | ||
| 105 | 0x00, 0x0F, 0x0F, 0x00, 0x00, 0x00, 0x0F, 0x0F, 0x00, 0x00, | ||
| 106 | 0x00, 0x0F, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 107 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 108 | 0x00, 0x00, 0x00, 0x00 | ||
| 109 | }; | ||
| 110 | #endif | ||
| 111 | #elif LCDWIDTH == 128 | ||
| 112 | #if LCDHEIGHT == 32 | ||
| 113 | static uint8_t micro_oled_screen_buffer[LCDWIDTH*LCDWIDTH/8] = { | ||
| 114 | //128x32 qmk image | ||
| 115 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 116 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 117 | 0x00, 0x80, 0xC0, 0xE0, 0xE0, 0xFC, 0xFC, 0xE0, 0xFC, 0xFC, | ||
| 118 | 0xE0, 0xF0, 0xFC, 0xE0, 0xE0, 0xFC, 0xE0, 0xE0, 0xFC, 0xFC, | ||
| 119 | 0xE0, 0xE0, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 120 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 121 | 0x00, 0x00, 0x00, 0xF0, 0x10, 0x10, 0x30, 0xE0, 0x00, 0x00, | ||
| 122 | 0x80, 0x80, 0x80, 0x80, 0x80, 0x00, 0x00, 0x80, 0x00, 0x00, | ||
| 123 | 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x80, 0x80, | ||
| 124 | 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x00, 0x00, | ||
| 125 | 0x80, 0x80, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, | ||
| 126 | 0x80, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 127 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 128 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 129 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x12, 0xB2, 0xB2, 0xFF, | ||
| 130 | 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x03, 0xFF, 0xFF, 0xFF, 0x03, | ||
| 131 | 0x01, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x03, 0xFF, 0xFF, 0xFF, | ||
| 132 | 0xFF, 0xB7, 0xB2, 0xB2, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 133 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 134 | 0x00, 0x1F, 0x02, 0x02, 0x03, 0x01, 0x00, 0x06, 0x1F, 0x10, | ||
| 135 | 0x10, 0x10, 0x1F, 0x06, 0x00, 0x03, 0x1E, 0x18, 0x0F, 0x01, | ||
| 136 | 0x0F, 0x18, 0x1E, 0x01, 0x00, 0x0F, 0x1F, 0x12, 0x02, 0x12, | ||
| 137 | 0x13, 0x00, 0x00, 0x1F, 0x00, 0x00, 0x00, 0x0E, 0x1F, 0x12, | ||
| 138 | 0x02, 0x12, 0x13, 0x00, 0x00, 0x1F, 0x10, 0x10, 0x10, 0x1F, | ||
| 139 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 140 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 141 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 142 | 0x00, 0x00, 0x00, 0x00, 0x48, 0x4D, 0x4D, 0xFF, 0xFF, 0xFF, | ||
| 143 | 0xFF, 0xFF, 0xFE, 0xF8, 0xF9, 0xF3, 0xF3, 0xC0, 0x80, 0xF3, | ||
| 144 | 0xF3, 0xF3, 0xF9, 0xFC, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xED, | ||
| 145 | 0x4D, 0x4D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 146 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 147 | 0x00, 0xFE, 0x20, 0x10, 0x10, 0xE0, 0xC0, 0x00, 0x70, 0xC0, | ||
| 148 | 0x00, 0x80, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF0, 0x0C, | ||
| 149 | 0x04, 0x04, 0x04, 0x04, 0x1C, 0xF0, 0x00, 0x00, 0xFC, 0x0C, | ||
| 150 | 0x38, 0xE0, 0x00, 0x00, 0xC0, 0x38, 0x0C, 0xFC, 0x00, 0x00, | ||
| 151 | 0xFC, 0xFC, 0x60, 0x90, 0x0C, 0x04, 0x00, 0x00, 0x00, 0x00, | ||
| 152 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 153 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 154 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 155 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x03, 0x07, 0x07, 0x3F, | ||
| 156 | 0x3F, 0x07, 0x3F, 0x3F, 0x07, 0x0F, 0x3F, 0x07, 0x07, 0x3F, | ||
| 157 | 0x07, 0x07, 0x3F, 0x3F, 0x07, 0x07, 0x03, 0x00, 0x00, 0x00, | ||
| 158 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 159 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, | ||
| 160 | 0x06, 0x04, 0x04, 0x07, 0x01, 0x00, 0x00, 0x13, 0x1E, 0x03, | ||
| 161 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x06, 0x04, 0x04, | ||
| 162 | 0x04, 0x04, 0x07, 0x0D, 0x08, 0x00, 0x07, 0x00, 0x00, 0x01, | ||
| 163 | 0x07, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x07, 0x07, | ||
| 164 | 0x00, 0x01, 0x03, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 165 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 166 | 0x00, 0x00 | ||
| 167 | }; | ||
| 168 | #elif LCDHEIGHT == 64 | ||
| 169 | static uint8_t micro_oled_screen_buffer[LCDWIDTH*LCDWIDTH/8] = { | ||
| 170 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 171 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 172 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 173 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 174 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 175 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 176 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 177 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0xC0, | ||
| 178 | 0x00, 0x00, 0xC0, 0xC0, 0x00, 0x00, 0xC0, 0xC0, 0x00, 0x00, | ||
| 179 | 0xC0, 0xC0, 0x00, 0x00, 0xC0, 0xC0, 0x00, 0x00, 0x00, 0x00, | ||
| 180 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 181 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 182 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 183 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 184 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 185 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 186 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 187 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 188 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 189 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 190 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 191 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 192 | 0xC0, 0xC0, 0xC0, 0xC0, 0xF8, 0xFC, 0xFC, 0xFE, 0xFE, 0xFF, | ||
| 193 | 0x7F, 0x7E, 0xFE, 0xFF, 0xFF, 0xFE, 0xFE, 0x7F, 0x7F, 0xFE, | ||
| 194 | 0xFE, 0xFF, 0xFF, 0xFE, 0x7E, 0x7F, 0xFF, 0xFE, 0xFE, 0xFC, | ||
| 195 | 0xFC, 0xF8, 0xC0, 0xC0, 0xC0, 0xC0, 0x00, 0x00, 0x00, 0x00, | ||
| 196 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 197 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 198 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 199 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 200 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 201 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 202 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 203 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 204 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 205 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 206 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 207 | 0x00, 0x88, 0x88, 0x88, 0xDD, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | ||
| 208 | 0xFF, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, | ||
| 209 | 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0xFF, 0xFF, 0xFF, | ||
| 210 | 0xFF, 0xFF, 0xFF, 0xDD, 0x88, 0x88, 0x88, 0x00, 0x00, 0x00, | ||
| 211 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 212 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 213 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 214 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 215 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 216 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 217 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 218 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 219 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 220 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 221 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 222 | 0x00, 0x00, 0x99, 0x99, 0x99, 0x99, 0xFF, 0xFF, 0xFF, 0xFF, | ||
| 223 | 0xFF, 0xFF, 0xFE, 0xF8, 0xF0, 0xF3, 0xF3, 0xE7, 0xE7, 0x00, | ||
| 224 | 0x00, 0xE7, 0xE7, 0xF3, 0xF3, 0xF0, 0xF8, 0xFE, 0xFF, 0xFF, | ||
| 225 | 0xFF, 0xFF, 0xFF, 0xFF, 0x99, 0x99, 0x99, 0x99, 0x00, 0x00, | ||
| 226 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 227 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 228 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 229 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 230 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 231 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 232 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 233 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 234 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 235 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 236 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 237 | 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x0F, 0x1F, 0x3F, | ||
| 238 | 0x3F, 0x3F, 0xFF, 0xFF, 0x3F, 0x3F, 0xFF, 0xFF, 0x3F, 0x3F, | ||
| 239 | 0xFF, 0xFF, 0x3F, 0x3F, 0xFF, 0xFF, 0x3F, 0x3F, 0xFF, 0xFF, | ||
| 240 | 0x3F, 0x3F, 0x3F, 0x1F, 0x0F, 0x01, 0x01, 0x01, 0x01, 0x00, | ||
| 241 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 242 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 243 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 244 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 245 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 246 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 247 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 248 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 249 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 250 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 251 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 252 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 253 | 0x00, 0x00, 0x00, 0x03, 0x01, 0x00, 0x00, 0x03, 0x01, 0x00, | ||
| 254 | 0x80, 0x03, 0x03, 0x00, 0x00, 0x01, 0x03, 0x00, 0x80, 0x01, | ||
| 255 | 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 256 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 257 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 258 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 259 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 260 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 261 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 262 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 263 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 264 | 0x00, 0x00, 0x00, 0xFF, 0x11, 0x11, 0x11, 0x0E, 0x00, 0x70, | ||
| 265 | 0x88, 0x04, 0x04, 0x04, 0xF8, 0x00, 0x00, 0x3C, 0xE0, 0xC0, | ||
| 266 | 0x38, 0x1C, 0xE0, 0x80, 0x70, 0x0C, 0x00, 0xF8, 0xAC, 0x24, | ||
| 267 | 0x24, 0x3C, 0x30, 0x00, 0x00, 0xFC, 0x0C, 0x04, 0x00, 0xF8, | ||
| 268 | 0xAC, 0x24, 0x24, 0x2C, 0x30, 0x00, 0x70, 0xDC, 0x04, 0x04, | ||
| 269 | 0x88, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, | ||
| 270 | 0x8C, 0x04, 0x04, 0xF8, 0x00, 0x04, 0x3C, 0xE0, 0x80, 0xF0, | ||
| 271 | 0x1C, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFE, 0x83, 0x01, 0x01, | ||
| 272 | 0x01, 0x81, 0xFE, 0x3C, 0x00, 0x00, 0xFF, 0x03, 0x0E, 0x70, | ||
| 273 | 0xC0, 0xE0, 0x38, 0x06, 0x03, 0xFF, 0x00, 0x00, 0xFF, 0x18, | ||
| 274 | 0x38, 0x66, 0xC3, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 275 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 276 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 277 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 278 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 279 | 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 280 | 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, | ||
| 281 | 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, | ||
| 282 | 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, | ||
| 283 | 0x00, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x01, 0x01, | ||
| 284 | 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 285 | 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x04, 0x03, | ||
| 286 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, | ||
| 287 | 0x01, 0x01, 0x01, 0x01, 0x03, 0x02, 0x00, 0x01, 0x00, 0x00, | ||
| 288 | 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x01, | ||
| 289 | 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 290 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 291 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 292 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 293 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 294 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 295 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 296 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 297 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 298 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 299 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 300 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 301 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 302 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 303 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 304 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 305 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 | ||
| 306 | }; | ||
| 307 | //TODO: generate bitmap of QMK logo here | ||
| 308 | #endif | ||
| 309 | #else | ||
| 310 | //catchall for custom screen szies | ||
| 311 | static uint8_t micro_oled_screen_buffer[LCDWIDTH*LCDWIDTH/8] = {0}; | ||
| 312 | #endif | ||
| 313 | |||
| 314 | |||
| 315 | |||
| 316 | void micro_oled_init(void) { | ||
| 317 | |||
| 318 | i2c_init(); | ||
| 319 | i2c_start(I2C_ADDRESS_SA0_1); | ||
| 320 | |||
| 321 | // Display Init sequence for 64x48 OLED module | ||
| 322 | send_command(DISPLAYOFF); // 0xAE | ||
| 323 | |||
| 324 | send_command(SETDISPLAYCLOCKDIV); // 0xD5 | ||
| 325 | send_command(0x80); // the suggested ratio 0x80 | ||
| 326 | |||
| 327 | send_command(SETMULTIPLEX); // 0xA8 | ||
| 328 | send_command(LCDHEIGHT - 1); | ||
| 329 | |||
| 330 | send_command(SETDISPLAYOFFSET); // 0xD3 | ||
| 331 | send_command(0x00); // no offset | ||
| 332 | |||
| 333 | send_command(SETSTARTLINE | 0x00); // line #0 | ||
| 334 | |||
| 335 | send_command(CHARGEPUMP); // enable charge pump | ||
| 336 | send_command(0x14); | ||
| 337 | |||
| 338 | send_command(NORMALDISPLAY); // 0xA6 | ||
| 339 | send_command(DISPLAYALLONRESUME); // 0xA4 | ||
| 340 | |||
| 341 | //display at regular orientation | ||
| 342 | send_command(SEGREMAP | 0x1); | ||
| 343 | send_command(COMSCANDEC); | ||
| 344 | |||
| 345 | //rotate display 180 | ||
| 346 | #ifdef micro_oled_rotate_180 | ||
| 347 | send_command(SEGREMAP); | ||
| 348 | send_command(COMSCANINC); | ||
| 349 | #endif | ||
| 350 | |||
| 351 | send_command(MEMORYMODE); | ||
| 352 | send_command(0x10); | ||
| 353 | |||
| 354 | send_command(SETCOMPINS); // 0xDA | ||
| 355 | if (LCDHEIGHT > 32) { | ||
| 356 | send_command(0x12); | ||
| 357 | } else { | ||
| 358 | send_command(0x02); | ||
| 359 | } | ||
| 360 | send_command(SETCONTRAST); // 0x81 | ||
| 361 | send_command(0x8F); | ||
| 362 | |||
| 363 | send_command(SETPRECHARGE); // 0xd9 | ||
| 364 | send_command(0xF1); | ||
| 365 | |||
| 366 | send_command(SETVCOMDESELECT); // 0xDB | ||
| 367 | send_command(0x40); | ||
| 368 | |||
| 369 | send_command(DISPLAYON); //--turn on oled panel | ||
| 370 | clear_screen(); // Erase hardware memory inside the OLED controller to avoid random data in memory. | ||
| 371 | send_buffer(); | ||
| 372 | } | ||
| 373 | |||
| 374 | void send_command(uint8_t command) { | ||
| 375 | micro_oled_transfer_buffer[0] = I2C_COMMAND; | ||
| 376 | micro_oled_transfer_buffer[1] = command; | ||
| 377 | i2c_transmit(I2C_ADDRESS_SA0_1 << 1, micro_oled_transfer_buffer, 2, 100); | ||
| 378 | } | ||
| 379 | |||
| 380 | void send_data(uint8_t data) { | ||
| 381 | micro_oled_transfer_buffer[0] = I2C_DATA; | ||
| 382 | micro_oled_transfer_buffer[1] = data; | ||
| 383 | i2c_transmit(I2C_ADDRESS_SA0_1 << 1, micro_oled_transfer_buffer, 2, 100); | ||
| 384 | } | ||
| 385 | |||
| 386 | /** \brief Set SSD1306 page address. | ||
| 387 | Send page address command and address to the SSD1306 OLED controller. | ||
| 388 | */ | ||
| 389 | void set_page_address(uint8_t address) { | ||
| 390 | address = (0xB0 | address); | ||
| 391 | send_command(address); | ||
| 392 | } | ||
| 393 | |||
| 394 | /** \brief Set SSD1306 column address. | ||
| 395 | Send column address command and address to the SSD1306 OLED controller. | ||
| 396 | */ | ||
| 397 | void set_column_address(uint8_t address) { | ||
| 398 | send_command( ( 0x10 | (address >> 4) ) + ((128 - LCDWIDTH) >> 8) ); | ||
| 399 | send_command( 0x0F & address ); | ||
| 400 | } | ||
| 401 | |||
| 402 | /** \brief Clear SSD1306's memory. | ||
| 403 | To clear GDRAM inside the LCD controller. | ||
| 404 | */ | ||
| 405 | void clear_screen(void) { | ||
| 406 | for (int i=0;i<8; i++) { | ||
| 407 | set_page_address(i); | ||
| 408 | set_column_address(0); | ||
| 409 | for (int j=0; j<0x80; j++) { | ||
| 410 | send_data(0); | ||
| 411 | } | ||
| 412 | } | ||
| 413 | } | ||
| 414 | |||
| 415 | /** \brief Clear SSD1306's memory. | ||
| 416 | To clear GDRAM inside the LCD controller. | ||
| 417 | */ | ||
| 418 | void clear_buffer(void) { | ||
| 419 | //384 | ||
| 420 | memset(micro_oled_screen_buffer, 0, LCDWIDTH*LCDWIDTH/8); | ||
| 421 | } | ||
| 422 | |||
| 423 | /** \brief Invert display. | ||
| 424 | The PIXEL_ON color of the display will turn to PIXEL_OFF and the PIXEL_OFF will turn to PIXEL_ON. | ||
| 425 | */ | ||
| 426 | void invert_screen(bool invert) { | ||
| 427 | if (invert) { | ||
| 428 | send_command(INVERTDISPLAY); | ||
| 429 | } else { | ||
| 430 | send_command(NORMALDISPLAY); | ||
| 431 | } | ||
| 432 | } | ||
| 433 | |||
| 434 | /** \brief Set contrast. | ||
| 435 | OLED contract value from 0 to 255. Note: Contrast level is not very obvious. | ||
| 436 | */ | ||
| 437 | void set_contrast(uint8_t contrast) { | ||
| 438 | send_command(SETCONTRAST); // 0x81 | ||
| 439 | send_command(contrast); | ||
| 440 | } | ||
| 441 | |||
| 442 | /** \brief Transfer display buffer. | ||
| 443 | Sends the updated buffer to the controller - the current status is checked before to save i2c exectution time | ||
| 444 | */ | ||
| 445 | void send_buffer(void) { | ||
| 446 | uint8_t i, j; | ||
| 447 | |||
| 448 | uint8_t page_addr = 0xFF; | ||
| 449 | for (i = 0; i < LCDHEIGHT/8; i++) { | ||
| 450 | uint8_t col_addr = 0xFF; | ||
| 451 | for (j = 0; j < LCDWIDTH; j++) { | ||
| 452 | if (micro_oled_screen_buffer[i*LCDWIDTH+j] != micro_oled_screen_current[i*LCDWIDTH+j]) { | ||
| 453 | if (page_addr != i) { | ||
| 454 | set_page_address(i); | ||
| 455 | } | ||
| 456 | if (col_addr != j) { | ||
| 457 | set_column_address(j); | ||
| 458 | } | ||
| 459 | send_data(micro_oled_screen_buffer[i*LCDWIDTH+j]); | ||
| 460 | micro_oled_screen_current[i*LCDWIDTH+j] = micro_oled_screen_buffer[i*LCDWIDTH+j]; | ||
| 461 | col_addr = j + 1; | ||
| 462 | } | ||
| 463 | } | ||
| 464 | } | ||
| 465 | } | ||
| 466 | |||
| 467 | /** \brief Draw pixel with color and mode. | ||
| 468 | Draw color pixel in the screen buffer's x,y position with NORM or XOR draw mode. | ||
| 469 | */ | ||
| 470 | void draw_pixel(uint8_t x, uint8_t y, uint8_t color, uint8_t mode) { | ||
| 471 | if ((x<0) || (x>=LCDWIDTH) || (y<0) || (y>=LCDHEIGHT)) | ||
| 472 | return; | ||
| 473 | |||
| 474 | if (mode == XOR) { | ||
| 475 | if (color == PIXEL_ON) | ||
| 476 | micro_oled_screen_buffer[x + (y/8)*LCDWIDTH] ^= _BV((y%8)); | ||
| 477 | } else { | ||
| 478 | if (color == PIXEL_ON) | ||
| 479 | micro_oled_screen_buffer[x + (y/8)*LCDWIDTH] |= _BV((y%8)); | ||
| 480 | else | ||
| 481 | micro_oled_screen_buffer[x + (y/8)*LCDWIDTH] &= ~_BV((y%8)); | ||
| 482 | } | ||
| 483 | } | ||
| 484 | |||
| 485 | /** \brief Draw line with color and mode. | ||
| 486 | Draw line using color and mode from x0,y0 to x1,y1 of the screen buffer. | ||
| 487 | */ | ||
| 488 | void draw_line(uint8_t x0, uint8_t y0, uint8_t x1, uint8_t y1, uint8_t color, uint8_t mode) { | ||
| 489 | uint8_t steep = abs(y1 - y0) > abs(x1 - x0); | ||
| 490 | if (steep) { | ||
| 491 | swap(x0, y0); | ||
| 492 | swap(x1, y1); | ||
| 493 | } | ||
| 494 | |||
| 495 | if (x0 > x1) { | ||
| 496 | swap(x0, x1); | ||
| 497 | swap(y0, y1); | ||
| 498 | } | ||
| 499 | |||
| 500 | uint8_t dx, dy; | ||
| 501 | dx = x1 - x0; | ||
| 502 | dy = abs(y1 - y0); | ||
| 503 | |||
| 504 | int8_t err = dx / 2; | ||
| 505 | int8_t ystep; | ||
| 506 | |||
| 507 | if (y0 < y1) { | ||
| 508 | ystep = 1; | ||
| 509 | } else { | ||
| 510 | ystep = -1;} | ||
| 511 | |||
| 512 | for (; x0<x1; x0++) { | ||
| 513 | if (steep) { | ||
| 514 | draw_pixel(y0, x0, color, mode); | ||
| 515 | } else { | ||
| 516 | draw_pixel(x0, y0, color, mode); | ||
| 517 | } | ||
| 518 | err -= dy; | ||
| 519 | if (err < 0) { | ||
| 520 | y0 += ystep; | ||
| 521 | err += dx; | ||
| 522 | } | ||
| 523 | } | ||
| 524 | } | ||
| 525 | |||
| 526 | /** \brief Draw horizontal line with color and mode. | ||
| 527 | Draw horizontal line using color and mode from x,y to x+width,y of the screen buffer. | ||
| 528 | */ | ||
| 529 | void draw_line_hori(uint8_t x, uint8_t y, uint8_t width, uint8_t color, uint8_t mode) { | ||
| 530 | draw_line(x,y,x+width,y,color,mode); | ||
| 531 | } | ||
| 532 | |||
| 533 | /** \brief Draw vertical line. | ||
| 534 | Draw vertical line using current fore color and current draw mode from x,y to x,y+height of the screen buffer. | ||
| 535 | */ | ||
| 536 | void draw_line_vert(uint8_t x, uint8_t y, uint8_t height, bool color, uint8_t mode) { | ||
| 537 | draw_line(x,y,x,y+height,color,mode); | ||
| 538 | } | ||
| 539 | |||
| 540 | /** \brief Draw rectangle with color and mode. | ||
| 541 | Draw rectangle using color and mode from x,y to x+width,y+height of the screen buffer. | ||
| 542 | */ | ||
| 543 | void draw_rect(uint8_t x, uint8_t y, uint8_t width, uint8_t height, uint8_t color, uint8_t mode) { | ||
| 544 | uint8_t tempHeight; | ||
| 545 | |||
| 546 | draw_line_hori(x,y, width, color, mode); | ||
| 547 | draw_line_hori(x,y+height-1, width, color, mode); | ||
| 548 | |||
| 549 | tempHeight=height-2; | ||
| 550 | |||
| 551 | // skip drawing vertical lines to avoid overlapping of pixel that will | ||
| 552 | // affect XOR plot if no pixel in between horizontal lines | ||
| 553 | if (tempHeight<1) return; | ||
| 554 | |||
| 555 | draw_line_vert(x,y+1, tempHeight, color, mode); | ||
| 556 | draw_line_vert(x+width-1, y+1, tempHeight, color, mode); | ||
| 557 | } | ||
| 558 | |||
| 559 | /** \brief Draw rectangle with color and mode. | ||
| 560 | Draw rectangle using color and mode from x,y to x+width,y+height of the screen buffer. | ||
| 561 | */ | ||
| 562 | void draw_rect_soft(uint8_t x, uint8_t y, uint8_t width, uint8_t height, uint8_t color, uint8_t mode) { | ||
| 563 | uint8_t tempHeight; | ||
| 564 | |||
| 565 | draw_line_hori(x+1,y, width-2, color, mode); | ||
| 566 | draw_line_hori(x+1,y+height-1, width-2, color, mode); | ||
| 567 | |||
| 568 | tempHeight=height-2; | ||
| 569 | |||
| 570 | // skip drawing vertical lines to avoid overlapping of pixel that will | ||
| 571 | // affect XOR plot if no pixel in between horizontal lines | ||
| 572 | if (tempHeight<1) return; | ||
| 573 | |||
| 574 | draw_line_vert(x,y+1, tempHeight, color, mode); | ||
| 575 | draw_line_vert(x+width-1, y+1, tempHeight, color, mode); | ||
| 576 | } | ||
| 577 | |||
| 578 | /** \brief Draw filled rectangle with color and mode. | ||
| 579 | Draw filled rectangle using color and mode from x,y to x+width,y+height of the screen buffer. | ||
| 580 | */ | ||
| 581 | void draw_rect_filled(uint8_t x, uint8_t y, uint8_t width, uint8_t height, uint8_t color, uint8_t mode) { | ||
| 582 | // TODO - need to optimise the memory map draw so that this function will not call pixel one by one | ||
| 583 | for (int i=x; i<x+width;i++) { | ||
| 584 | draw_line_vert(i,y, height, color, mode); | ||
| 585 | } | ||
| 586 | } | ||
| 587 | |||
| 588 | /** \brief Draw filled rectangle with color and mode. | ||
| 589 | Draw filled rectangle using color and mode from x,y to x+width,y+height of the screen buffer. | ||
| 590 | */ | ||
| 591 | void draw_rect_filled_soft(uint8_t x, uint8_t y, uint8_t width, uint8_t height, uint8_t color, uint8_t mode) { | ||
| 592 | // TODO - need to optimise the memory map draw so that this function will not call pixel one by one | ||
| 593 | for (int i=x; i<x+width;i++) { | ||
| 594 | if (i == x || i == (x + width - 1)) | ||
| 595 | draw_line_vert(i, y+1, height-2, color, mode); | ||
| 596 | else | ||
| 597 | draw_line_vert(i, y, height, color, mode); | ||
| 598 | } | ||
| 599 | } | ||
| 600 | |||
| 601 | /** \brief Draw character with color and mode. | ||
| 602 | Draw character c using color and draw mode at x,y. | ||
| 603 | */ | ||
| 604 | void draw_char(uint8_t x, uint8_t y, uint8_t c, uint8_t color, uint8_t mode, uint8_t font) { | ||
| 605 | // TODO - New routine to take font of any height, at the moment limited to font height in multiple of 8 pixels | ||
| 606 | |||
| 607 | uint8_t rowsToDraw,row, tempC; | ||
| 608 | uint8_t i,j,temp; | ||
| 609 | uint16_t charPerBitmapRow,charColPositionOnBitmap,charRowPositionOnBitmap,charBitmapStartPosition; | ||
| 610 | |||
| 611 | if ((font>=TOTALFONTS) || (font<0)) | ||
| 612 | return; | ||
| 613 | |||
| 614 | uint8_t fontType = font; | ||
| 615 | uint8_t fontWidth = pgm_read_byte(fonts_pointer[fontType]+0); | ||
| 616 | uint8_t fontHeight = pgm_read_byte(fonts_pointer[fontType]+1); | ||
| 617 | uint8_t fontStartChar = pgm_read_byte(fonts_pointer[fontType]+2); | ||
| 618 | uint8_t fontTotalChar = pgm_read_byte(fonts_pointer[fontType]+3); | ||
| 619 | uint16_t fontMapWidth = (pgm_read_byte(fonts_pointer[fontType]+4)*100)+pgm_read_byte(fonts_pointer[fontType]+5); // two bytes values into integer 16 | ||
| 620 | |||
| 621 | if ((c<fontStartChar) || (c>(fontStartChar+fontTotalChar-1))) // no bitmap for the required c | ||
| 622 | return; | ||
| 623 | |||
| 624 | tempC=c-fontStartChar; | ||
| 625 | |||
| 626 | // each row (in datasheet is call page) is 8 bits high, 16 bit high character will have 2 rows to be drawn | ||
| 627 | rowsToDraw=fontHeight/8; // 8 is LCD's page size, see SSD1306 datasheet | ||
| 628 | if (rowsToDraw<=1) rowsToDraw=1; | ||
| 629 | |||
| 630 | // the following draw function can draw anywhere on the screen, but SLOW pixel by pixel draw | ||
| 631 | if (rowsToDraw==1) { | ||
| 632 | for (i=0;i<fontWidth+1;i++) { | ||
| 633 | if (i==fontWidth) // this is done in a weird way because for 5x7 font, there is no margin, this code add a margin after col 5 | ||
| 634 | temp=0; | ||
| 635 | else | ||
| 636 | temp=pgm_read_byte(fonts_pointer[fontType]+FONTHEADERSIZE+(tempC*fontWidth)+i); | ||
| 637 | |||
| 638 | for (j=0;j<8;j++) { // 8 is the LCD's page height (see datasheet for explanation) | ||
| 639 | if (temp & 0x1) { | ||
| 640 | draw_pixel(x+i, y+j, color,mode); | ||
| 641 | } | ||
| 642 | else { | ||
| 643 | draw_pixel(x+i, y+j, !color,mode); | ||
| 644 | } | ||
| 645 | |||
| 646 | temp >>=1; | ||
| 647 | } | ||
| 648 | } | ||
| 649 | return; | ||
| 650 | } | ||
| 651 | |||
| 652 | // font height over 8 bit | ||
| 653 | // take character "0" ASCII 48 as example | ||
| 654 | charPerBitmapRow = fontMapWidth/fontWidth; // 256/8 =32 char per row | ||
| 655 | charColPositionOnBitmap = tempC % charPerBitmapRow; // =16 | ||
| 656 | charRowPositionOnBitmap = (int)(tempC/charPerBitmapRow); // =1 | ||
| 657 | charBitmapStartPosition = (charRowPositionOnBitmap * fontMapWidth * (fontHeight/8)) + (charColPositionOnBitmap * fontWidth) ; | ||
| 658 | |||
| 659 | // each row on LCD is 8 bit height (see datasheet for explanation) | ||
| 660 | for(row=0;row<rowsToDraw;row++) { | ||
| 661 | for (i=0; i<fontWidth;i++) { | ||
| 662 | temp=pgm_read_byte(fonts_pointer[fontType]+FONTHEADERSIZE+(charBitmapStartPosition+i+(row*fontMapWidth))); | ||
| 663 | for (j=0;j<8;j++) { // 8 is the LCD's page height (see datasheet for explanation) | ||
| 664 | if (temp & 0x1) { | ||
| 665 | draw_pixel(x+i,y+j+(row*8), color, mode); | ||
| 666 | } | ||
| 667 | else { | ||
| 668 | draw_pixel(x+i,y+j+(row*8), !color, mode); | ||
| 669 | } | ||
| 670 | temp >>=1; | ||
| 671 | } | ||
| 672 | } | ||
| 673 | } | ||
| 674 | |||
| 675 | } | ||
| 676 | |||
| 677 | void draw_string(uint8_t x, uint8_t y, char * string, uint8_t color, uint8_t mode, uint8_t font) { | ||
| 678 | |||
| 679 | if ((font>=TOTALFONTS) || (font<0)) | ||
| 680 | return; | ||
| 681 | |||
| 682 | uint8_t fontType = font; | ||
| 683 | uint8_t fontWidth = pgm_read_byte(fonts_pointer[fontType]+0); | ||
| 684 | |||
| 685 | uint8_t cur_x = x; | ||
| 686 | for (int i = 0; i < strlen(string); i++) { | ||
| 687 | draw_char(cur_x, y, string[i], color, mode, font); | ||
| 688 | cur_x += fontWidth + 1; | ||
| 689 | } | ||
| 690 | |||
| 691 | } | ||
diff --git a/drivers/qwiic/micro_oled.h b/drivers/qwiic/micro_oled.h new file mode 100644 index 000000000..5d6a1029e --- /dev/null +++ b/drivers/qwiic/micro_oled.h | |||
| @@ -0,0 +1,134 @@ | |||
| 1 | /* Jim Lindblom @ SparkFun Electronics | ||
| 2 | * October 26, 2014 | ||
| 3 | * https://github.com/sparkfun/Micro_OLED_Breakout/tree/master/Firmware/Arduino/libraries/SFE_MicroOLED | ||
| 4 | * | ||
| 5 | * Modified by: | ||
| 6 | * Emil Varughese @ Edwin Robotics Pvt. Ltd. | ||
| 7 | * July 27, 2015 | ||
| 8 | * https://github.com/emil01/SparkFun_Micro_OLED_Arduino_Library/ | ||
| 9 | * | ||
| 10 | * This code was heavily based around the MicroView library, written by GeekAmmo | ||
| 11 | * (https://github.com/geekammo/MicroView-Arduino-Library). | ||
| 12 | * | ||
| 13 | * Adapted for QMK by: | ||
| 14 | * Jack Humbert <jack.humb@gmail.com> | ||
| 15 | * October 11, 2018 | ||
| 16 | * | ||
| 17 | * This program is free software: you can redistribute it and/or modify | ||
| 18 | * it under the terms of the GNU General Public License as published by | ||
| 19 | * the Free Software Foundation, either version 3 of the License, or | ||
| 20 | * (at your option) any later version. | ||
| 21 | * | ||
| 22 | * This program is distributed in the hope that it will be useful, | ||
| 23 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 24 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 25 | * GNU General Public License for more details. | ||
| 26 | * | ||
| 27 | * You should have received a copy of the GNU General Public License | ||
| 28 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
| 29 | */ | ||
| 30 | #pragma once | ||
| 31 | |||
| 32 | #include "qwiic.h" | ||
| 33 | |||
| 34 | void micro_oled_init(void); | ||
| 35 | |||
| 36 | void send_command(uint8_t command); | ||
| 37 | void send_data(uint8_t data); | ||
| 38 | void set_page_address(uint8_t address); | ||
| 39 | void set_column_address(uint8_t address); | ||
| 40 | void clear_screen(void); | ||
| 41 | void clear_buffer(void); | ||
| 42 | void send_buffer(void); | ||
| 43 | void draw_pixel(uint8_t x, uint8_t y, uint8_t color, uint8_t mode); | ||
| 44 | void draw_line(uint8_t x0, uint8_t y0, uint8_t x1, uint8_t y1, uint8_t color, uint8_t mode); | ||
| 45 | void draw_line_hori(uint8_t x, uint8_t y, uint8_t width, uint8_t color, uint8_t mode); | ||
| 46 | void draw_line_vert(uint8_t x, uint8_t y, uint8_t height, bool color, uint8_t mode); | ||
| 47 | void draw_rect(uint8_t x, uint8_t y, uint8_t width, uint8_t height, uint8_t color, uint8_t mode); | ||
| 48 | void draw_rect_soft(uint8_t x, uint8_t y, uint8_t width, uint8_t height, uint8_t color, uint8_t mode); | ||
| 49 | void draw_rect_filled(uint8_t x, uint8_t y, uint8_t width, uint8_t height, uint8_t color, uint8_t mode); | ||
| 50 | void draw_rect_filled_soft(uint8_t x, uint8_t y, uint8_t width, uint8_t height, uint8_t color, uint8_t mode); | ||
| 51 | void draw_char(uint8_t x, uint8_t y, uint8_t c, uint8_t color, uint8_t mode, uint8_t font); | ||
| 52 | void draw_string(uint8_t x, uint8_t y, char * string, uint8_t color, uint8_t mode, uint8_t font); | ||
| 53 | |||
| 54 | #define I2C_ADDRESS_SA0_0 0b0111100 | ||
| 55 | #ifndef I2C_ADDRESS_SA0_1 | ||
| 56 | #define I2C_ADDRESS_SA0_1 0b0111101 | ||
| 57 | #endif | ||
| 58 | #define I2C_COMMAND 0x00 | ||
| 59 | #define I2C_DATA 0x40 | ||
| 60 | #define PIXEL_OFF 0 | ||
| 61 | #define PIXEL_ON 1 | ||
| 62 | |||
| 63 | #ifndef LCDWIDTH | ||
| 64 | #define LCDWIDTH 64 | ||
| 65 | #endif | ||
| 66 | #ifndef LCDWIDTH | ||
| 67 | #define LCDHEIGHT 48 | ||
| 68 | #endif | ||
| 69 | #define FONTHEADERSIZE 6 | ||
| 70 | |||
| 71 | #define NORM 0 | ||
| 72 | #define XOR 1 | ||
| 73 | |||
| 74 | #define PAGE 0 | ||
| 75 | #define ALL 1 | ||
| 76 | |||
| 77 | #define WIDGETSTYLE0 0 | ||
| 78 | #define WIDGETSTYLE1 1 | ||
| 79 | #define WIDGETSTYLE2 2 | ||
| 80 | |||
| 81 | #define SETCONTRAST 0x81 | ||
| 82 | #define DISPLAYALLONRESUME 0xA4 | ||
| 83 | #define DISPLAYALLON 0xA5 | ||
| 84 | #define NORMALDISPLAY 0xA6 | ||
| 85 | #define INVERTDISPLAY 0xA7 | ||
| 86 | #define DISPLAYOFF 0xAE | ||
| 87 | #define DISPLAYON 0xAF | ||
| 88 | #define SETDISPLAYOFFSET 0xD3 | ||
| 89 | #define SETCOMPINS 0xDA | ||
| 90 | #define SETVCOMDESELECT 0xDB | ||
| 91 | #define SETDISPLAYCLOCKDIV 0xD5 | ||
| 92 | #define SETPRECHARGE 0xD9 | ||
| 93 | #define SETMULTIPLEX 0xA8 | ||
| 94 | #define SETLOWCOLUMN 0x00 | ||
| 95 | #define SETHIGHCOLUMN 0x10 | ||
| 96 | #define SETSTARTLINE 0x40 | ||
| 97 | #define MEMORYMODE 0x20 | ||
| 98 | #define COMSCANINC 0xC0 | ||
| 99 | #define COMSCANDEC 0xC8 | ||
| 100 | #define SEGREMAP 0xA0 | ||
| 101 | #define CHARGEPUMP 0x8D | ||
| 102 | #define EXTERNALVCC 0x01 | ||
| 103 | #define SWITCHCAPVCC 0x02 | ||
| 104 | |||
| 105 | // Scroll | ||
| 106 | #define ACTIVATESCROLL 0x2F | ||
| 107 | #define DEACTIVATESCROLL 0x2E | ||
| 108 | #define SETVERTICALSCROLLAREA 0xA3 | ||
| 109 | #define RIGHTHORIZONTALSCROLL 0x26 | ||
| 110 | #define LEFT_HORIZONTALSCROLL 0x27 | ||
| 111 | #define VERTICALRIGHTHORIZONTALSCROLL 0x29 | ||
| 112 | #define VERTICALLEFTHORIZONTALSCROLL 0x2A | ||
| 113 | |||
| 114 | typedef enum CMD { | ||
| 115 | CMD_CLEAR, //0 | ||
| 116 | CMD_INVERT, //1 | ||
| 117 | CMD_CONTRAST, //2 | ||
| 118 | CMD_DISPLAY, //3 | ||
| 119 | CMD_SETCURSOR, //4 | ||
| 120 | CMD_PIXEL, //5 | ||
| 121 | CMD_LINE, //6 | ||
| 122 | CMD_LINEH, //7 | ||
| 123 | CMD_LINEV, //8 | ||
| 124 | CMD_RECT, //9 | ||
| 125 | CMD_RECTFILL, //10 | ||
| 126 | CMD_CIRCLE, //11 | ||
| 127 | CMD_CIRCLEFILL, //12 | ||
| 128 | CMD_DRAWCHAR, //13 | ||
| 129 | CMD_DRAWBITMAP, //14 | ||
| 130 | CMD_GETLCDWIDTH, //15 | ||
| 131 | CMD_GETLCDHEIGHT, //16 | ||
| 132 | CMD_SETCOLOR, //17 | ||
| 133 | CMD_SETDRAWMODE //18 | ||
| 134 | } commCommand_t; \ No newline at end of file | ||
diff --git a/drivers/qwiic/qwiic.c b/drivers/qwiic/qwiic.c new file mode 100644 index 000000000..904791992 --- /dev/null +++ b/drivers/qwiic/qwiic.c | |||
| @@ -0,0 +1,31 @@ | |||
| 1 | /* Copyright 2018 Jack Humbert <jack.humb@gmail.com> | ||
| 2 | * | ||
| 3 | * This program is free software: you can redistribute it and/or modify | ||
| 4 | * it under the terms of the GNU General Public License as published by | ||
| 5 | * the Free Software Foundation, either version 2 of the License, or | ||
| 6 | * (at your option) any later version. | ||
| 7 | * | ||
| 8 | * This program is distributed in the hope that it will be useful, | ||
| 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 11 | * GNU General Public License for more details. | ||
| 12 | * | ||
| 13 | * You should have received a copy of the GNU General Public License | ||
| 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
| 15 | */ | ||
| 16 | #include "qwiic.h" | ||
| 17 | |||
| 18 | void qwiic_init(void) { | ||
| 19 | #ifdef QWIIC_JOYSTIIC_ENABLE | ||
| 20 | joystiic_init(); | ||
| 21 | #endif | ||
| 22 | #ifdef QWIIC_MICRO_OLED_ENABLE | ||
| 23 | micro_oled_init(); | ||
| 24 | #endif | ||
| 25 | } | ||
| 26 | |||
| 27 | void qwiic_task(void) { | ||
| 28 | #ifdef QWIIC_JOYSTIIC_ENABLE | ||
| 29 | joystiic_task(); | ||
| 30 | #endif | ||
| 31 | } | ||
diff --git a/drivers/qwiic/qwiic.h b/drivers/qwiic/qwiic.h new file mode 100644 index 000000000..160fb28df --- /dev/null +++ b/drivers/qwiic/qwiic.h | |||
| @@ -0,0 +1,28 @@ | |||
| 1 | /* Copyright 2018 Jack Humbert <jack.humb@gmail.com> | ||
| 2 | * | ||
| 3 | * This program is free software: you can redistribute it and/or modify | ||
| 4 | * it under the terms of the GNU General Public License as published by | ||
| 5 | * the Free Software Foundation, either version 2 of the License, or | ||
| 6 | * (at your option) any later version. | ||
| 7 | * | ||
| 8 | * This program is distributed in the hope that it will be useful, | ||
| 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 11 | * GNU General Public License for more details. | ||
| 12 | * | ||
| 13 | * You should have received a copy of the GNU General Public License | ||
| 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
| 15 | */ | ||
| 16 | #pragma once | ||
| 17 | |||
| 18 | #include "i2c_master.h" | ||
| 19 | |||
| 20 | #ifdef QWIIC_JOYSTIIC_ENABLE | ||
| 21 | #include "joystiic.h" | ||
| 22 | #endif | ||
| 23 | #ifdef QWIIC_MICRO_OLED_ENABLE | ||
| 24 | #include "micro_oled.h" | ||
| 25 | #endif | ||
| 26 | |||
| 27 | void qwiic_init(void); | ||
| 28 | void qwiic_task(void); | ||
diff --git a/drivers/qwiic/qwiic.mk b/drivers/qwiic/qwiic.mk new file mode 100644 index 000000000..4ae2d78e3 --- /dev/null +++ b/drivers/qwiic/qwiic.mk | |||
| @@ -0,0 +1,18 @@ | |||
| 1 | ifneq ($(strip $(QWIIC_ENABLE)),) | ||
| 2 | COMMON_VPATH += $(DRIVER_PATH)/qwiic | ||
| 3 | OPT_DEFS += -DQWIIC_ENABLE | ||
| 4 | SRC += qwiic.c | ||
| 5 | ifeq ($(filter "i2c_master.c", $(SRC)),) | ||
| 6 | SRC += i2c_master.c | ||
| 7 | endif | ||
| 8 | endif | ||
| 9 | |||
| 10 | ifneq ($(filter JOYSTIIC, $(QWIIC_ENABLE)),) | ||
| 11 | OPT_DEFS += -DQWIIC_JOYSTIIC_ENABLE | ||
| 12 | SRC += joystiic.c | ||
| 13 | endif | ||
| 14 | |||
| 15 | ifneq ($(filter MICRO_OLED, $(QWIIC_ENABLE)),) | ||
| 16 | OPT_DEFS += -DQWIIC_MICRO_OLED_ENABLE | ||
| 17 | SRC += micro_oled.c | ||
| 18 | endif | ||
diff --git a/drivers/qwiic/util/font5x7.h b/drivers/qwiic/util/font5x7.h new file mode 100644 index 000000000..0bad206b7 --- /dev/null +++ b/drivers/qwiic/util/font5x7.h | |||
| @@ -0,0 +1,288 @@ | |||
| 1 | /****************************************************************************** | ||
| 2 | font5x7.h | ||
| 3 | Definition for small font | ||
| 4 | |||
| 5 | This file was imported from the MicroView library, written by GeekAmmo | ||
| 6 | (https://github.com/geekammo/MicroView-Arduino-Library), and released under | ||
| 7 | the terms of the GNU General Public License as published by the Free Software | ||
| 8 | Foundation, either version 3 of the License, or (at your option) any later | ||
| 9 | version. | ||
| 10 | |||
| 11 | This program is distributed in the hope that it will be useful, | ||
| 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 14 | GNU General Public License for more details. | ||
| 15 | |||
| 16 | You should have received a copy of the GNU General Public License | ||
| 17 | along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
| 18 | |||
| 19 | Modified by: | ||
| 20 | Emil Varughese @ Edwin Robotics Pvt. Ltd. | ||
| 21 | July 27, 2015 | ||
| 22 | https://github.com/emil01/SparkFun_Micro_OLED_Arduino_Library/ | ||
| 23 | |||
| 24 | ******************************************************************************/ | ||
| 25 | #pragma once | ||
| 26 | |||
| 27 | #include "progmem.h" | ||
| 28 | |||
| 29 | // Standard ASCII 5x7 font | ||
| 30 | static const unsigned char font5x7[] PROGMEM = { | ||
| 31 | // first row defines - FONTWIDTH, FONTHEIGHT, ASCII START CHAR, TOTAL CHARACTERS, FONT MAP WIDTH HIGH, FONT MAP WIDTH LOW (2,56 meaning 256) | ||
| 32 | 5,8,0,255,12,75, | ||
| 33 | 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 34 | 0x3E, 0x5B, 0x4F, 0x5B, 0x3E, | ||
| 35 | 0x3E, 0x6B, 0x4F, 0x6B, 0x3E, | ||
| 36 | 0x1C, 0x3E, 0x7C, 0x3E, 0x1C, | ||
| 37 | 0x18, 0x3C, 0x7E, 0x3C, 0x18, | ||
| 38 | 0x1C, 0x57, 0x7D, 0x57, 0x1C, | ||
| 39 | 0x1C, 0x5E, 0x7F, 0x5E, 0x1C, | ||
| 40 | 0x00, 0x18, 0x3C, 0x18, 0x00, | ||
| 41 | 0xFF, 0xE7, 0xC3, 0xE7, 0xFF, | ||
| 42 | 0x00, 0x18, 0x24, 0x18, 0x00, | ||
| 43 | 0xFF, 0xE7, 0xDB, 0xE7, 0xFF, | ||
| 44 | 0x30, 0x48, 0x3A, 0x06, 0x0E, | ||
| 45 | 0x26, 0x29, 0x79, 0x29, 0x26, | ||
| 46 | 0x40, 0x7F, 0x05, 0x05, 0x07, | ||
| 47 | 0x40, 0x7F, 0x05, 0x25, 0x3F, | ||
| 48 | 0x5A, 0x3C, 0xE7, 0x3C, 0x5A, | ||
| 49 | 0x7F, 0x3E, 0x1C, 0x1C, 0x08, | ||
| 50 | 0x08, 0x1C, 0x1C, 0x3E, 0x7F, | ||
| 51 | 0x14, 0x22, 0x7F, 0x22, 0x14, | ||
| 52 | 0x5F, 0x5F, 0x00, 0x5F, 0x5F, | ||
| 53 | 0x06, 0x09, 0x7F, 0x01, 0x7F, | ||
| 54 | 0x00, 0x66, 0x89, 0x95, 0x6A, | ||
| 55 | 0x60, 0x60, 0x60, 0x60, 0x60, | ||
| 56 | 0x94, 0xA2, 0xFF, 0xA2, 0x94, | ||
| 57 | 0x08, 0x04, 0x7E, 0x04, 0x08, | ||
| 58 | 0x10, 0x20, 0x7E, 0x20, 0x10, | ||
| 59 | 0x08, 0x08, 0x2A, 0x1C, 0x08, | ||
| 60 | 0x08, 0x1C, 0x2A, 0x08, 0x08, | ||
| 61 | 0x1E, 0x10, 0x10, 0x10, 0x10, | ||
| 62 | 0x0C, 0x1E, 0x0C, 0x1E, 0x0C, | ||
| 63 | 0x30, 0x38, 0x3E, 0x38, 0x30, | ||
| 64 | 0x06, 0x0E, 0x3E, 0x0E, 0x06, | ||
| 65 | 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 66 | 0x00, 0x00, 0x5F, 0x00, 0x00, | ||
| 67 | 0x00, 0x07, 0x00, 0x07, 0x00, | ||
| 68 | 0x14, 0x7F, 0x14, 0x7F, 0x14, | ||
| 69 | 0x24, 0x2A, 0x7F, 0x2A, 0x12, | ||
| 70 | 0x23, 0x13, 0x08, 0x64, 0x62, | ||
| 71 | 0x36, 0x49, 0x56, 0x20, 0x50, | ||
| 72 | 0x00, 0x08, 0x07, 0x03, 0x00, | ||
| 73 | 0x00, 0x1C, 0x22, 0x41, 0x00, | ||
| 74 | 0x00, 0x41, 0x22, 0x1C, 0x00, | ||
| 75 | 0x2A, 0x1C, 0x7F, 0x1C, 0x2A, | ||
| 76 | 0x08, 0x08, 0x3E, 0x08, 0x08, | ||
| 77 | 0x00, 0x80, 0x70, 0x30, 0x00, | ||
| 78 | 0x08, 0x08, 0x08, 0x08, 0x08, | ||
| 79 | 0x00, 0x00, 0x60, 0x60, 0x00, | ||
| 80 | 0x20, 0x10, 0x08, 0x04, 0x02, | ||
| 81 | 0x3E, 0x51, 0x49, 0x45, 0x3E, | ||
| 82 | 0x00, 0x42, 0x7F, 0x40, 0x00, | ||
| 83 | 0x72, 0x49, 0x49, 0x49, 0x46, | ||
| 84 | 0x21, 0x41, 0x49, 0x4D, 0x33, | ||
| 85 | 0x18, 0x14, 0x12, 0x7F, 0x10, | ||
| 86 | 0x27, 0x45, 0x45, 0x45, 0x39, | ||
| 87 | 0x3C, 0x4A, 0x49, 0x49, 0x31, | ||
| 88 | 0x41, 0x21, 0x11, 0x09, 0x07, | ||
| 89 | 0x36, 0x49, 0x49, 0x49, 0x36, | ||
| 90 | 0x46, 0x49, 0x49, 0x29, 0x1E, | ||
| 91 | 0x00, 0x00, 0x14, 0x00, 0x00, | ||
| 92 | 0x00, 0x40, 0x34, 0x00, 0x00, | ||
| 93 | 0x00, 0x08, 0x14, 0x22, 0x41, | ||
| 94 | 0x14, 0x14, 0x14, 0x14, 0x14, | ||
| 95 | 0x00, 0x41, 0x22, 0x14, 0x08, | ||
| 96 | 0x02, 0x01, 0x59, 0x09, 0x06, | ||
| 97 | 0x3E, 0x41, 0x5D, 0x59, 0x4E, | ||
| 98 | 0x7C, 0x12, 0x11, 0x12, 0x7C, | ||
| 99 | 0x7F, 0x49, 0x49, 0x49, 0x36, | ||
| 100 | 0x3E, 0x41, 0x41, 0x41, 0x22, | ||
| 101 | 0x7F, 0x41, 0x41, 0x41, 0x3E, | ||
| 102 | 0x7F, 0x49, 0x49, 0x49, 0x41, | ||
| 103 | 0x7F, 0x09, 0x09, 0x09, 0x01, | ||
| 104 | 0x3E, 0x41, 0x41, 0x51, 0x73, | ||
| 105 | 0x7F, 0x08, 0x08, 0x08, 0x7F, | ||
| 106 | 0x00, 0x41, 0x7F, 0x41, 0x00, | ||
| 107 | 0x20, 0x40, 0x41, 0x3F, 0x01, | ||
| 108 | 0x7F, 0x08, 0x14, 0x22, 0x41, | ||
| 109 | 0x7F, 0x40, 0x40, 0x40, 0x40, | ||
| 110 | 0x7F, 0x02, 0x1C, 0x02, 0x7F, | ||
| 111 | 0x7F, 0x04, 0x08, 0x10, 0x7F, | ||
| 112 | 0x3E, 0x41, 0x41, 0x41, 0x3E, | ||
| 113 | 0x7F, 0x09, 0x09, 0x09, 0x06, | ||
| 114 | 0x3E, 0x41, 0x51, 0x21, 0x5E, | ||
| 115 | 0x7F, 0x09, 0x19, 0x29, 0x46, | ||
| 116 | 0x26, 0x49, 0x49, 0x49, 0x32, | ||
| 117 | 0x03, 0x01, 0x7F, 0x01, 0x03, | ||
| 118 | 0x3F, 0x40, 0x40, 0x40, 0x3F, | ||
| 119 | 0x1F, 0x20, 0x40, 0x20, 0x1F, | ||
| 120 | 0x3F, 0x40, 0x38, 0x40, 0x3F, | ||
| 121 | 0x63, 0x14, 0x08, 0x14, 0x63, | ||
| 122 | 0x03, 0x04, 0x78, 0x04, 0x03, | ||
| 123 | 0x61, 0x59, 0x49, 0x4D, 0x43, | ||
| 124 | 0x00, 0x7F, 0x41, 0x41, 0x41, | ||
| 125 | 0x02, 0x04, 0x08, 0x10, 0x20, | ||
| 126 | 0x00, 0x41, 0x41, 0x41, 0x7F, | ||
| 127 | 0x04, 0x02, 0x01, 0x02, 0x04, | ||
| 128 | 0x40, 0x40, 0x40, 0x40, 0x40, | ||
| 129 | 0x00, 0x03, 0x07, 0x08, 0x00, | ||
| 130 | 0x20, 0x54, 0x54, 0x78, 0x40, | ||
| 131 | 0x7F, 0x28, 0x44, 0x44, 0x38, | ||
| 132 | 0x38, 0x44, 0x44, 0x44, 0x28, | ||
| 133 | 0x38, 0x44, 0x44, 0x28, 0x7F, | ||
| 134 | 0x38, 0x54, 0x54, 0x54, 0x18, | ||
| 135 | 0x00, 0x08, 0x7E, 0x09, 0x02, | ||
| 136 | 0x18, 0xA4, 0xA4, 0x9C, 0x78, | ||
| 137 | 0x7F, 0x08, 0x04, 0x04, 0x78, | ||
| 138 | 0x00, 0x44, 0x7D, 0x40, 0x00, | ||
| 139 | 0x20, 0x40, 0x40, 0x3D, 0x00, | ||
| 140 | 0x7F, 0x10, 0x28, 0x44, 0x00, | ||
| 141 | 0x00, 0x41, 0x7F, 0x40, 0x00, | ||
| 142 | 0x7C, 0x04, 0x78, 0x04, 0x78, | ||
| 143 | 0x7C, 0x08, 0x04, 0x04, 0x78, | ||
| 144 | 0x38, 0x44, 0x44, 0x44, 0x38, | ||
| 145 | 0xFC, 0x18, 0x24, 0x24, 0x18, | ||
| 146 | 0x18, 0x24, 0x24, 0x18, 0xFC, | ||
| 147 | 0x7C, 0x08, 0x04, 0x04, 0x08, | ||
| 148 | 0x48, 0x54, 0x54, 0x54, 0x24, | ||
| 149 | 0x04, 0x04, 0x3F, 0x44, 0x24, | ||
| 150 | 0x3C, 0x40, 0x40, 0x20, 0x7C, | ||
| 151 | 0x1C, 0x20, 0x40, 0x20, 0x1C, | ||
| 152 | 0x3C, 0x40, 0x30, 0x40, 0x3C, | ||
| 153 | 0x44, 0x28, 0x10, 0x28, 0x44, | ||
| 154 | 0x4C, 0x90, 0x90, 0x90, 0x7C, | ||
| 155 | 0x44, 0x64, 0x54, 0x4C, 0x44, | ||
| 156 | 0x00, 0x08, 0x36, 0x41, 0x00, | ||
| 157 | 0x00, 0x00, 0x77, 0x00, 0x00, | ||
| 158 | 0x00, 0x41, 0x36, 0x08, 0x00, | ||
| 159 | 0x02, 0x01, 0x02, 0x04, 0x02, | ||
| 160 | 0x3C, 0x26, 0x23, 0x26, 0x3C, | ||
| 161 | 0x1E, 0xA1, 0xA1, 0x61, 0x12, | ||
| 162 | 0x3A, 0x40, 0x40, 0x20, 0x7A, | ||
| 163 | 0x38, 0x54, 0x54, 0x55, 0x59, | ||
| 164 | 0x21, 0x55, 0x55, 0x79, 0x41, | ||
| 165 | 0x21, 0x54, 0x54, 0x78, 0x41, | ||
| 166 | 0x21, 0x55, 0x54, 0x78, 0x40, | ||
| 167 | 0x20, 0x54, 0x55, 0x79, 0x40, | ||
| 168 | 0x0C, 0x1E, 0x52, 0x72, 0x12, | ||
| 169 | 0x39, 0x55, 0x55, 0x55, 0x59, | ||
| 170 | 0x39, 0x54, 0x54, 0x54, 0x59, | ||
| 171 | 0x39, 0x55, 0x54, 0x54, 0x58, | ||
| 172 | 0x00, 0x00, 0x45, 0x7C, 0x41, | ||
| 173 | 0x00, 0x02, 0x45, 0x7D, 0x42, | ||
| 174 | 0x00, 0x01, 0x45, 0x7C, 0x40, | ||
| 175 | 0xF0, 0x29, 0x24, 0x29, 0xF0, | ||
| 176 | 0xF0, 0x28, 0x25, 0x28, 0xF0, | ||
| 177 | 0x7C, 0x54, 0x55, 0x45, 0x00, | ||
| 178 | 0x20, 0x54, 0x54, 0x7C, 0x54, | ||
| 179 | 0x7C, 0x0A, 0x09, 0x7F, 0x49, | ||
| 180 | 0x32, 0x49, 0x49, 0x49, 0x32, | ||
| 181 | 0x32, 0x48, 0x48, 0x48, 0x32, | ||
| 182 | 0x32, 0x4A, 0x48, 0x48, 0x30, | ||
| 183 | 0x3A, 0x41, 0x41, 0x21, 0x7A, | ||
| 184 | 0x3A, 0x42, 0x40, 0x20, 0x78, | ||
| 185 | 0x00, 0x9D, 0xA0, 0xA0, 0x7D, | ||
| 186 | 0x39, 0x44, 0x44, 0x44, 0x39, | ||
| 187 | 0x3D, 0x40, 0x40, 0x40, 0x3D, | ||
| 188 | 0x3C, 0x24, 0xFF, 0x24, 0x24, | ||
| 189 | 0x48, 0x7E, 0x49, 0x43, 0x66, | ||
| 190 | 0x2B, 0x2F, 0xFC, 0x2F, 0x2B, | ||
| 191 | 0xFF, 0x09, 0x29, 0xF6, 0x20, | ||
| 192 | 0xC0, 0x88, 0x7E, 0x09, 0x03, | ||
| 193 | 0x20, 0x54, 0x54, 0x79, 0x41, | ||
| 194 | 0x00, 0x00, 0x44, 0x7D, 0x41, | ||
| 195 | 0x30, 0x48, 0x48, 0x4A, 0x32, | ||
| 196 | 0x38, 0x40, 0x40, 0x22, 0x7A, | ||
| 197 | 0x00, 0x7A, 0x0A, 0x0A, 0x72, | ||
| 198 | 0x7D, 0x0D, 0x19, 0x31, 0x7D, | ||
| 199 | 0x26, 0x29, 0x29, 0x2F, 0x28, | ||
| 200 | 0x26, 0x29, 0x29, 0x29, 0x26, | ||
| 201 | 0x30, 0x48, 0x4D, 0x40, 0x20, | ||
| 202 | 0x38, 0x08, 0x08, 0x08, 0x08, | ||
| 203 | 0x08, 0x08, 0x08, 0x08, 0x38, | ||
| 204 | 0x2F, 0x10, 0xC8, 0xAC, 0xBA, | ||
| 205 | 0x2F, 0x10, 0x28, 0x34, 0xFA, | ||
| 206 | 0x00, 0x00, 0x7B, 0x00, 0x00, | ||
| 207 | 0x08, 0x14, 0x2A, 0x14, 0x22, | ||
| 208 | 0x22, 0x14, 0x2A, 0x14, 0x08, | ||
| 209 | 0xAA, 0x00, 0x55, 0x00, 0xAA, | ||
| 210 | 0xAA, 0x55, 0xAA, 0x55, 0xAA, | ||
| 211 | 0x00, 0x00, 0x00, 0xFF, 0x00, | ||
| 212 | 0x10, 0x10, 0x10, 0xFF, 0x00, | ||
| 213 | 0x14, 0x14, 0x14, 0xFF, 0x00, | ||
| 214 | 0x10, 0x10, 0xFF, 0x00, 0xFF, | ||
| 215 | 0x10, 0x10, 0xF0, 0x10, 0xF0, | ||
| 216 | 0x14, 0x14, 0x14, 0xFC, 0x00, | ||
| 217 | 0x14, 0x14, 0xF7, 0x00, 0xFF, | ||
| 218 | 0x00, 0x00, 0xFF, 0x00, 0xFF, | ||
| 219 | 0x14, 0x14, 0xF4, 0x04, 0xFC, | ||
| 220 | 0x14, 0x14, 0x17, 0x10, 0x1F, | ||
| 221 | 0x10, 0x10, 0x1F, 0x10, 0x1F, | ||
| 222 | 0x14, 0x14, 0x14, 0x1F, 0x00, | ||
| 223 | 0x10, 0x10, 0x10, 0xF0, 0x00, | ||
| 224 | 0x00, 0x00, 0x00, 0x1F, 0x10, | ||
| 225 | 0x10, 0x10, 0x10, 0x1F, 0x10, | ||
| 226 | 0x10, 0x10, 0x10, 0xF0, 0x10, | ||
| 227 | 0x00, 0x00, 0x00, 0xFF, 0x10, | ||
| 228 | 0x10, 0x10, 0x10, 0x10, 0x10, | ||
| 229 | 0x10, 0x10, 0x10, 0xFF, 0x10, | ||
| 230 | 0x00, 0x00, 0x00, 0xFF, 0x14, | ||
| 231 | 0x00, 0x00, 0xFF, 0x00, 0xFF, | ||
| 232 | 0x00, 0x00, 0x1F, 0x10, 0x17, | ||
| 233 | 0x00, 0x00, 0xFC, 0x04, 0xF4, | ||
| 234 | 0x14, 0x14, 0x17, 0x10, 0x17, | ||
| 235 | 0x14, 0x14, 0xF4, 0x04, 0xF4, | ||
| 236 | 0x00, 0x00, 0xFF, 0x00, 0xF7, | ||
| 237 | 0x14, 0x14, 0x14, 0x14, 0x14, | ||
| 238 | 0x14, 0x14, 0xF7, 0x00, 0xF7, | ||
| 239 | 0x14, 0x14, 0x14, 0x17, 0x14, | ||
| 240 | 0x10, 0x10, 0x1F, 0x10, 0x1F, | ||
| 241 | 0x14, 0x14, 0x14, 0xF4, 0x14, | ||
| 242 | 0x10, 0x10, 0xF0, 0x10, 0xF0, | ||
| 243 | 0x00, 0x00, 0x1F, 0x10, 0x1F, | ||
| 244 | 0x00, 0x00, 0x00, 0x1F, 0x14, | ||
| 245 | 0x00, 0x00, 0x00, 0xFC, 0x14, | ||
| 246 | 0x00, 0x00, 0xF0, 0x10, 0xF0, | ||
| 247 | 0x10, 0x10, 0xFF, 0x10, 0xFF, | ||
| 248 | 0x14, 0x14, 0x14, 0xFF, 0x14, | ||
| 249 | 0x10, 0x10, 0x10, 0x1F, 0x00, | ||
| 250 | 0x00, 0x00, 0x00, 0xF0, 0x10, | ||
| 251 | 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | ||
| 252 | 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, | ||
| 253 | 0xFF, 0xFF, 0xFF, 0x00, 0x00, | ||
| 254 | 0x00, 0x00, 0x00, 0xFF, 0xFF, | ||
| 255 | 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, | ||
| 256 | 0x38, 0x44, 0x44, 0x38, 0x44, | ||
| 257 | 0x7C, 0x2A, 0x2A, 0x3E, 0x14, | ||
| 258 | 0x7E, 0x02, 0x02, 0x06, 0x06, | ||
| 259 | 0x02, 0x7E, 0x02, 0x7E, 0x02, | ||
| 260 | 0x63, 0x55, 0x49, 0x41, 0x63, | ||
| 261 | 0x38, 0x44, 0x44, 0x3C, 0x04, | ||
| 262 | 0x40, 0x7E, 0x20, 0x1E, 0x20, | ||
| 263 | 0x06, 0x02, 0x7E, 0x02, 0x02, | ||
| 264 | 0x99, 0xA5, 0xE7, 0xA5, 0x99, | ||
| 265 | 0x1C, 0x2A, 0x49, 0x2A, 0x1C, | ||
| 266 | 0x4C, 0x72, 0x01, 0x72, 0x4C, | ||
| 267 | 0x30, 0x4A, 0x4D, 0x4D, 0x30, | ||
| 268 | 0x30, 0x48, 0x78, 0x48, 0x30, | ||
| 269 | 0xBC, 0x62, 0x5A, 0x46, 0x3D, | ||
| 270 | 0x3E, 0x49, 0x49, 0x49, 0x00, | ||
| 271 | 0x7E, 0x01, 0x01, 0x01, 0x7E, | ||
| 272 | 0x2A, 0x2A, 0x2A, 0x2A, 0x2A, | ||
| 273 | 0x44, 0x44, 0x5F, 0x44, 0x44, | ||
| 274 | 0x40, 0x51, 0x4A, 0x44, 0x40, | ||
| 275 | 0x40, 0x44, 0x4A, 0x51, 0x40, | ||
| 276 | 0x00, 0x00, 0xFF, 0x01, 0x03, | ||
| 277 | 0xE0, 0x80, 0xFF, 0x00, 0x00, | ||
| 278 | 0x08, 0x08, 0x6B, 0x6B, 0x08, | ||
| 279 | 0x36, 0x12, 0x36, 0x24, 0x36, | ||
| 280 | 0x06, 0x0F, 0x09, 0x0F, 0x06, | ||
| 281 | 0x00, 0x00, 0x18, 0x18, 0x00, | ||
| 282 | 0x00, 0x00, 0x10, 0x10, 0x00, | ||
| 283 | 0x30, 0x40, 0xFF, 0x01, 0x01, | ||
| 284 | 0x00, 0x1F, 0x01, 0x01, 0x1E, | ||
| 285 | 0x00, 0x19, 0x1D, 0x17, 0x12, | ||
| 286 | 0x00, 0x3C, 0x3C, 0x3C, 0x3C, | ||
| 287 | 0x00, 0x00, 0x00, 0x00, 0x00 | ||
| 288 | }; | ||
diff --git a/drivers/qwiic/util/font8x16.h b/drivers/qwiic/util/font8x16.h new file mode 100644 index 000000000..c070e4ec8 --- /dev/null +++ b/drivers/qwiic/util/font8x16.h | |||
| @@ -0,0 +1,127 @@ | |||
| 1 | /****************************************************************************** | ||
| 2 | font8x16.h | ||
| 3 | Definition for medium font | ||
| 4 | |||
| 5 | This file was imported from the MicroView library, written by GeekAmmo | ||
| 6 | (https://github.com/geekammo/MicroView-Arduino-Library), and released under | ||
| 7 | the terms of the GNU General Public License as published by the Free Software | ||
| 8 | Foundation, either version 3 of the License, or (at your option) any later | ||
| 9 | version. | ||
| 10 | |||
| 11 | This program is distributed in the hope that it will be useful, | ||
| 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 14 | GNU General Public License for more details. | ||
| 15 | |||
| 16 | You should have received a copy of the GNU General Public License | ||
| 17 | along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
| 18 | |||
| 19 | Modified by: | ||
| 20 | Emil Varughese @ Edwin Robotics Pvt. Ltd. | ||
| 21 | July 27, 2015 | ||
| 22 | https://github.com/emil01/SparkFun_Micro_OLED_Arduino_Library/ | ||
| 23 | ******************************************************************************/ | ||
| 24 | #pragma once | ||
| 25 | |||
| 26 | #include "progmem.h" | ||
| 27 | |||
| 28 | static const unsigned char font8x16[] PROGMEM = { | ||
| 29 | // first row defines - FONTWIDTH, FONTHEIGHT, ASCII START CHAR, TOTAL CHARACTERS, FONT MAP WIDTH HIGH, FONT MAP WIDTH LOW (2,56 meaning 256) | ||
| 30 | 8,16,32,96,2,56, | ||
| 31 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFE, 0x00, 0x00, 0x00, 0x00, | ||
| 32 | 0x00, 0x00, 0x0E, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x00, 0xD0, 0xBE, 0x90, 0xD0, 0xBE, 0x90, 0x00, | ||
| 33 | 0x00, 0x1C, 0x62, 0xFF, 0xC2, 0x80, 0x00, 0x00, 0x0C, 0x12, 0x92, 0x4C, 0xB0, 0x88, 0x06, 0x00, | ||
| 34 | 0x80, 0x7C, 0x62, 0xB2, 0x1C, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x0E, 0x00, 0x00, 0x00, 0x00, | ||
| 35 | 0x00, 0xE0, 0x18, 0x04, 0x02, 0x02, 0x00, 0x00, 0x00, 0x02, 0x02, 0x04, 0x18, 0xE0, 0x00, 0x00, | ||
| 36 | 0x00, 0x24, 0x18, 0x7E, 0x18, 0x24, 0x00, 0x00, 0x80, 0x80, 0x80, 0xF0, 0x80, 0x80, 0x80, 0x00, | ||
| 37 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x00, 0x00, | ||
| 38 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x60, 0x18, 0x06, 0x00, 0x00, | ||
| 39 | 0xF8, 0x04, 0xC2, 0x32, 0x0C, 0xF8, 0x00, 0x00, 0x00, 0x04, 0x04, 0xFE, 0x00, 0x00, 0x00, 0x00, | ||
| 40 | 0x00, 0x02, 0x82, 0x42, 0x22, 0x1C, 0x00, 0x00, 0x00, 0x02, 0x22, 0x22, 0x22, 0xDC, 0x00, 0x00, | ||
| 41 | 0xC0, 0xA0, 0x98, 0x84, 0xFE, 0x80, 0x80, 0x00, 0x00, 0x1E, 0x12, 0x12, 0x22, 0xC2, 0x00, 0x00, | ||
| 42 | 0xF8, 0x44, 0x22, 0x22, 0x22, 0xC0, 0x00, 0x00, 0x00, 0x02, 0x02, 0xC2, 0x32, 0x0A, 0x06, 0x00, | ||
| 43 | 0x00, 0x8C, 0x52, 0x22, 0x52, 0x8C, 0x00, 0x00, 0x3C, 0x42, 0x42, 0x42, 0x26, 0xF8, 0x00, 0x00, | ||
| 44 | 0x00, 0x00, 0x30, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x30, 0x00, 0x00, 0x00, 0x00, | ||
| 45 | 0x80, 0x80, 0x40, 0x40, 0x20, 0x20, 0x10, 0x00, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, | ||
| 46 | 0x10, 0x20, 0x20, 0x40, 0x40, 0x80, 0x80, 0x00, 0x00, 0x02, 0x82, 0x42, 0x22, 0x1C, 0x00, 0x00, | ||
| 47 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, | ||
| 48 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, | ||
| 49 | 0x00, 0x04, 0x04, 0x0F, 0x04, 0x03, 0x00, 0x00, 0x04, 0x02, 0x01, 0x03, 0x04, 0x04, 0x03, 0x00, | ||
| 50 | 0x03, 0x04, 0x04, 0x04, 0x05, 0x03, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 51 | 0x00, 0x03, 0x06, 0x08, 0x10, 0x10, 0x00, 0x00, 0x00, 0x10, 0x10, 0x08, 0x06, 0x03, 0x00, 0x00, | ||
| 52 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, | ||
| 53 | 0x00, 0x00, 0x16, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 54 | 0x00, 0x00, 0x06, 0x06, 0x00, 0x00, 0x00, 0x00, 0x04, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 55 | 0x01, 0x03, 0x04, 0x04, 0x02, 0x01, 0x00, 0x00, 0x00, 0x04, 0x04, 0x07, 0x04, 0x04, 0x00, 0x00, | ||
| 56 | 0x00, 0x07, 0x04, 0x04, 0x04, 0x04, 0x00, 0x00, 0x00, 0x04, 0x04, 0x04, 0x04, 0x03, 0x00, 0x00, | ||
| 57 | 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x04, 0x04, 0x04, 0x04, 0x03, 0x00, 0x00, | ||
| 58 | 0x01, 0x02, 0x04, 0x04, 0x04, 0x03, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 59 | 0x00, 0x03, 0x04, 0x04, 0x04, 0x03, 0x00, 0x00, 0x00, 0x04, 0x04, 0x04, 0x02, 0x01, 0x00, 0x00, | ||
| 60 | 0x00, 0x00, 0x06, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x16, 0x0E, 0x00, 0x00, 0x00, 0x00, | ||
| 61 | 0x00, 0x00, 0x01, 0x01, 0x02, 0x02, 0x04, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, | ||
| 62 | 0x04, 0x02, 0x02, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 63 | 0xF8, 0x04, 0x72, 0x8A, 0xFA, 0x84, 0x78, 0x00, 0x00, 0xC0, 0x38, 0x06, 0x38, 0xC0, 0x00, 0x00, | ||
| 64 | 0x00, 0xFE, 0x22, 0x22, 0x22, 0xDC, 0x00, 0x00, 0xF8, 0x04, 0x02, 0x02, 0x02, 0x02, 0x00, 0x00, | ||
| 65 | 0xFE, 0x02, 0x02, 0x02, 0x04, 0xF8, 0x00, 0x00, 0x00, 0xFE, 0x22, 0x22, 0x22, 0x22, 0x00, 0x00, | ||
| 66 | 0x00, 0xFE, 0x22, 0x22, 0x22, 0x22, 0x00, 0x00, 0xF8, 0x04, 0x02, 0x02, 0x22, 0xE2, 0x00, 0x00, | ||
| 67 | 0xFE, 0x20, 0x20, 0x20, 0x20, 0xFE, 0x00, 0x00, 0x00, 0x02, 0x02, 0xFE, 0x02, 0x02, 0x00, 0x00, | ||
| 68 | 0x00, 0x00, 0x00, 0x02, 0x02, 0xFE, 0x00, 0x00, 0xFE, 0x40, 0xB0, 0x08, 0x04, 0x02, 0x00, 0x00, | ||
| 69 | 0x00, 0xFE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFE, 0x0C, 0x70, 0x80, 0x70, 0x0C, 0xFE, 0x00, | ||
| 70 | 0xFE, 0x0C, 0x30, 0xC0, 0x00, 0xFE, 0x00, 0x00, 0xF8, 0x04, 0x02, 0x02, 0x04, 0xF8, 0x00, 0x00, | ||
| 71 | 0xFE, 0x42, 0x42, 0x42, 0x22, 0x1C, 0x00, 0x00, 0xF8, 0x04, 0x02, 0x02, 0x04, 0xF8, 0x00, 0x00, | ||
| 72 | 0x00, 0xFE, 0x42, 0x42, 0xA2, 0x1C, 0x00, 0x00, 0x00, 0x1C, 0x22, 0x42, 0x42, 0x80, 0x00, 0x00, | ||
| 73 | 0x02, 0x02, 0x02, 0xFE, 0x02, 0x02, 0x02, 0x00, 0xFE, 0x00, 0x00, 0x00, 0x00, 0xFE, 0x00, 0x00, | ||
| 74 | 0x06, 0x38, 0xC0, 0x00, 0xC0, 0x38, 0x06, 0x00, 0x3E, 0xC0, 0xF0, 0x0E, 0xF0, 0xC0, 0x3E, 0x00, | ||
| 75 | 0x00, 0x06, 0x98, 0x60, 0x98, 0x06, 0x00, 0x00, 0x00, 0x06, 0x18, 0xE0, 0x18, 0x06, 0x00, 0x00, | ||
| 76 | 0x02, 0x02, 0xC2, 0x32, 0x0A, 0x06, 0x00, 0x00, 0x00, 0x00, 0xFE, 0x02, 0x02, 0x02, 0x02, 0x00, | ||
| 77 | 0x00, 0x06, 0x18, 0x60, 0x80, 0x00, 0x00, 0x00, 0x02, 0x02, 0x02, 0x02, 0xFE, 0x00, 0x00, 0x00, | ||
| 78 | 0x40, 0x30, 0x0C, 0x0C, 0x30, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 79 | 0x01, 0x02, 0x04, 0x04, 0x04, 0x00, 0x00, 0x00, 0x06, 0x01, 0x01, 0x01, 0x01, 0x01, 0x06, 0x00, | ||
| 80 | 0x00, 0x07, 0x04, 0x04, 0x04, 0x03, 0x00, 0x00, 0x01, 0x02, 0x04, 0x04, 0x04, 0x04, 0x00, 0x00, | ||
| 81 | 0x07, 0x04, 0x04, 0x04, 0x02, 0x01, 0x00, 0x00, 0x00, 0x07, 0x04, 0x04, 0x04, 0x04, 0x00, 0x00, | ||
| 82 | 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x04, 0x04, 0x04, 0x07, 0x00, 0x00, | ||
| 83 | 0x07, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x04, 0x04, 0x07, 0x04, 0x04, 0x00, 0x00, | ||
| 84 | 0x00, 0x04, 0x04, 0x04, 0x04, 0x03, 0x00, 0x00, 0x07, 0x00, 0x00, 0x01, 0x02, 0x04, 0x00, 0x00, | ||
| 85 | 0x00, 0x07, 0x04, 0x04, 0x04, 0x04, 0x00, 0x00, 0x07, 0x00, 0x00, 0x01, 0x00, 0x00, 0x07, 0x00, | ||
| 86 | 0x07, 0x00, 0x00, 0x00, 0x03, 0x07, 0x00, 0x00, 0x01, 0x02, 0x04, 0x04, 0x02, 0x01, 0x00, 0x00, | ||
| 87 | 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x04, 0x0C, 0x12, 0x11, 0x10, 0x00, | ||
| 88 | 0x00, 0x07, 0x00, 0x00, 0x01, 0x06, 0x00, 0x00, 0x00, 0x04, 0x04, 0x04, 0x04, 0x03, 0x00, 0x00, | ||
| 89 | 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x03, 0x04, 0x04, 0x04, 0x04, 0x03, 0x00, 0x00, | ||
| 90 | 0x00, 0x00, 0x01, 0x06, 0x01, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, | ||
| 91 | 0x00, 0x06, 0x01, 0x00, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, | ||
| 92 | 0x06, 0x05, 0x04, 0x04, 0x04, 0x04, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x10, 0x10, 0x10, 0x10, 0x00, | ||
| 93 | 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x04, 0x00, 0x10, 0x10, 0x10, 0x10, 0x1F, 0x00, 0x00, 0x00, | ||
| 94 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x00, 0x00, | ||
| 95 | 0x00, 0x00, 0x02, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0x10, 0x10, 0x10, 0xF0, 0x00, 0x00, | ||
| 96 | 0x00, 0xFE, 0x20, 0x10, 0x10, 0xE0, 0x00, 0x00, 0x00, 0xE0, 0x10, 0x10, 0x10, 0x10, 0x00, 0x00, | ||
| 97 | 0x00, 0xE0, 0x10, 0x10, 0x10, 0xFE, 0x00, 0x00, 0x00, 0xE0, 0x90, 0x90, 0x90, 0xE0, 0x00, 0x00, | ||
| 98 | 0x00, 0x20, 0xFC, 0x22, 0x22, 0x22, 0x02, 0x00, 0x00, 0xE0, 0x10, 0x10, 0x10, 0xF0, 0x00, 0x00, | ||
| 99 | 0x00, 0xFE, 0x20, 0x10, 0x10, 0xE0, 0x00, 0x00, 0x10, 0x10, 0xF2, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 100 | 0x00, 0x10, 0x10, 0x10, 0xF2, 0x00, 0x00, 0x00, 0x00, 0xFE, 0x80, 0x40, 0x20, 0x10, 0x00, 0x00, | ||
| 101 | 0x00, 0x02, 0x02, 0xFE, 0x00, 0x00, 0x00, 0x00, 0xF0, 0x20, 0x10, 0xF0, 0x20, 0x10, 0xF0, 0x00, | ||
| 102 | 0x00, 0xF0, 0x20, 0x10, 0x10, 0xE0, 0x00, 0x00, 0x00, 0xE0, 0x10, 0x10, 0x10, 0xE0, 0x00, 0x00, | ||
| 103 | 0x00, 0xF0, 0x20, 0x10, 0x10, 0xE0, 0x00, 0x00, 0x00, 0xE0, 0x10, 0x10, 0x10, 0xF0, 0x00, 0x00, | ||
| 104 | 0x00, 0xF0, 0x20, 0x10, 0x10, 0x70, 0x00, 0x00, 0x00, 0x60, 0x90, 0x90, 0x90, 0x20, 0x00, 0x00, | ||
| 105 | 0x00, 0x20, 0x20, 0xFC, 0x20, 0x20, 0x20, 0x00, 0x00, 0xF0, 0x00, 0x00, 0x00, 0xF0, 0x00, 0x00, | ||
| 106 | 0x00, 0x70, 0x80, 0x00, 0x80, 0x70, 0x00, 0x00, 0xF0, 0x00, 0xC0, 0x30, 0xC0, 0x00, 0xF0, 0x00, | ||
| 107 | 0x00, 0x30, 0xC0, 0xC0, 0x30, 0x00, 0x00, 0x00, 0x00, 0x30, 0xC0, 0x00, 0x80, 0x70, 0x00, 0x00, | ||
| 108 | 0x00, 0x10, 0x10, 0x90, 0x50, 0x30, 0x00, 0x00, 0x00, 0x80, 0x80, 0x7E, 0x02, 0x02, 0x00, 0x00, | ||
| 109 | 0x00, 0x00, 0x00, 0xFE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x02, 0x7E, 0x80, 0x80, 0x00, 0x00, | ||
| 110 | 0x00, 0x80, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 111 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x04, 0x04, 0x02, 0x07, 0x00, 0x00, | ||
| 112 | 0x00, 0x07, 0x04, 0x04, 0x04, 0x03, 0x00, 0x00, 0x00, 0x03, 0x04, 0x04, 0x04, 0x04, 0x00, 0x00, | ||
| 113 | 0x00, 0x03, 0x04, 0x04, 0x02, 0x07, 0x00, 0x00, 0x00, 0x03, 0x04, 0x04, 0x04, 0x04, 0x00, 0x00, | ||
| 114 | 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x33, 0x24, 0x24, 0x22, 0x1F, 0x00, 0x00, | ||
| 115 | 0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x07, 0x04, 0x04, 0x00, 0x00, 0x00, | ||
| 116 | 0x20, 0x20, 0x20, 0x20, 0x1F, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x01, 0x02, 0x04, 0x00, 0x00, | ||
| 117 | 0x00, 0x00, 0x00, 0x07, 0x04, 0x04, 0x00, 0x00, 0x07, 0x00, 0x00, 0x07, 0x00, 0x00, 0x07, 0x00, | ||
| 118 | 0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x03, 0x04, 0x04, 0x04, 0x03, 0x00, 0x00, | ||
| 119 | 0x00, 0x3F, 0x04, 0x04, 0x04, 0x03, 0x00, 0x00, 0x00, 0x03, 0x04, 0x04, 0x02, 0x3F, 0x00, 0x00, | ||
| 120 | 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x04, 0x04, 0x04, 0x03, 0x00, 0x00, | ||
| 121 | 0x00, 0x00, 0x00, 0x03, 0x04, 0x04, 0x04, 0x00, 0x00, 0x03, 0x04, 0x04, 0x02, 0x07, 0x00, 0x00, | ||
| 122 | 0x00, 0x00, 0x03, 0x04, 0x03, 0x00, 0x00, 0x00, 0x01, 0x06, 0x01, 0x00, 0x01, 0x06, 0x01, 0x00, | ||
| 123 | 0x00, 0x06, 0x01, 0x01, 0x06, 0x00, 0x00, 0x00, 0x20, 0x20, 0x31, 0x0E, 0x03, 0x00, 0x00, 0x00, | ||
| 124 | 0x00, 0x06, 0x05, 0x04, 0x04, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x10, 0x10, 0x00, 0x00, | ||
| 125 | 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x10, 0x1F, 0x00, 0x00, 0x00, 0x00, | ||
| 126 | 0x01, 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 | ||
| 127 | }; | ||
