fsdfsdf
Fork of BSP_DISCO_F469NI by
Revision 2:123b894b49dd, committed 2017-05-16
- Comitter:
- Jerome Coutant
- Date:
- Tue May 16 10:50:26 2017 +0200
- Parent:
- 1:9e4eb47092ed
- Commit message:
- STM32Cube_FW_BSP_DISCO_F469NI
Changed in this revision
--- a/Components/Common/audio.h Mon May 30 11:09:05 2016 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,122 +0,0 @@ -/** - ****************************************************************************** - * @file audio.h - * @author MCD Application Team - * @version V4.0.1 - * @date 21-July-2015 - * @brief This header file contains the common defines and functions prototypes - * for the Audio driver. - ****************************************************************************** - * @attention - * - * <h2><center>© COPYRIGHT(c) 2015 STMicroelectronics</center></h2> - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. Neither the name of STMicroelectronics nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - ****************************************************************************** - */ - -/* Define to prevent recursive inclusion -------------------------------------*/ -#ifndef __AUDIO_H -#define __AUDIO_H - -#ifdef __cplusplus - extern "C" { -#endif - -/* Includes ------------------------------------------------------------------*/ -#include <stdint.h> - -/** @addtogroup BSP - * @{ - */ - -/** @addtogroup Components - * @{ - */ - -/** @addtogroup AUDIO - * @{ - */ - -/** @defgroup AUDIO_Exported_Constants - * @{ - */ - -/* Codec audio Standards */ -#define CODEC_STANDARD 0x04 -#define I2S_STANDARD I2S_STANDARD_PHILIPS - -/** - * @} - */ - -/** @defgroup AUDIO_Exported_Types - * @{ - */ - -/** @defgroup AUDIO_Driver_structure Audio Driver structure - * @{ - */ -typedef struct -{ - uint32_t (*Init)(uint16_t, uint16_t, uint8_t, uint32_t); - void (*DeInit)(void); - uint32_t (*ReadID)(uint16_t); - uint32_t (*Play)(uint16_t, uint16_t*, uint16_t); - uint32_t (*Pause)(uint16_t); - uint32_t (*Resume)(uint16_t); - uint32_t (*Stop)(uint16_t, uint32_t); - uint32_t (*SetFrequency)(uint16_t, uint32_t); - uint32_t (*SetVolume)(uint16_t, uint8_t); - uint32_t (*SetMute)(uint16_t, uint32_t); - uint32_t (*SetOutputMode)(uint16_t, uint8_t); - uint32_t (*Reset)(uint16_t); -}AUDIO_DrvTypeDef; -/** - * @} - */ - -/** - * @} - */ - -/** - * @} - */ - -/** - * @} - */ - -/** - * @} - */ - -#ifdef __cplusplus -} -#endif - -#endif /* __AUDIO_H */ - -/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
--- a/Components/Common/gyro.h Mon May 30 11:09:05 2016 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,145 +0,0 @@ -/** - ****************************************************************************** - * @file gyro.h - * @author MCD Application Team - * @version V4.0.1 - * @date 21-July-2015 - * @brief This header file contains the functions prototypes for the gyroscope driver. - ****************************************************************************** - * @attention - * - * <h2><center>© COPYRIGHT(c) 2015 STMicroelectronics</center></h2> - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. Neither the name of STMicroelectronics nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - ****************************************************************************** - */ - - -/* Define to prevent recursive inclusion -------------------------------------*/ -#ifndef __GYRO_H -#define __GYRO_H - -#ifdef __cplusplus - extern "C" { -#endif - -/* Includes ------------------------------------------------------------------*/ -#include <stdint.h> - -/** @addtogroup BSP - * @{ - */ - -/** @addtogroup Components - * @{ - */ - -/** @addtogroup GYRO - * @{ - */ - -/** @defgroup GYRO_Exported_Types - * @{ - */ - -/** @defgroup GYRO_Driver_structure Gyroscope Driver structure - * @{ - */ -typedef struct -{ - void (*Init)(uint16_t); - void (*DeInit)(void); - uint8_t (*ReadID)(void); - void (*Reset)(void); - void (*LowPower)(uint16_t); - void (*ConfigIT)(uint16_t); - void (*EnableIT)(uint8_t); - void (*DisableIT)(uint8_t); - uint8_t (*ITStatus)(uint16_t, uint16_t); - void (*ClearIT)(uint16_t, uint16_t); - void (*FilterConfig)(uint8_t); - void (*FilterCmd)(uint8_t); - void (*GetXYZ)(float *); -}GYRO_DrvTypeDef; -/** - * @} - */ - -/** @defgroup GYRO_Config_structure Gyroscope Configuration structure - * @{ - */ - -typedef struct -{ - uint8_t Power_Mode; /* Power-down/Sleep/Normal Mode */ - uint8_t Output_DataRate; /* OUT data rate */ - uint8_t Axes_Enable; /* Axes enable */ - uint8_t Band_Width; /* Bandwidth selection */ - uint8_t BlockData_Update; /* Block Data Update */ - uint8_t Endianness; /* Endian Data selection */ - uint8_t Full_Scale; /* Full Scale selection */ -}GYRO_InitTypeDef; - -/* GYRO High Pass Filter struct */ -typedef struct -{ - uint8_t HighPassFilter_Mode_Selection; /* Internal filter mode */ - uint8_t HighPassFilter_CutOff_Frequency; /* High pass filter cut-off frequency */ -}GYRO_FilterConfigTypeDef; - -/*GYRO Interrupt struct */ -typedef struct -{ - uint8_t Latch_Request; /* Latch interrupt request into CLICK_SRC register */ - uint8_t Interrupt_Axes; /* X, Y, Z Axes Interrupts */ - uint8_t Interrupt_ActiveEdge; /* Interrupt Active edge */ -}GYRO_InterruptConfigTypeDef; - -/** - * @} - */ - -/** - * @} - */ - -/** - * @} - */ - -/** - * @} - */ - -/** - * @} - */ - -#ifdef __cplusplus -} -#endif - -#endif /* __GYRO_H */ - -/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
--- a/Components/Common/io.h Mon May 30 11:09:05 2016 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,150 +0,0 @@ -/** - ****************************************************************************** - * @file io.h - * @author MCD Application Team - * @version V4.0.1 - * @date 21-July-2015 - * @brief This file contains all the functions prototypes for the IO driver. - ****************************************************************************** - * @attention - * - * <h2><center>© COPYRIGHT(c) 2015 STMicroelectronics</center></h2> - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. Neither the name of STMicroelectronics nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - ****************************************************************************** - */ - -/* Define to prevent recursive inclusion -------------------------------------*/ -#ifndef __IO_H -#define __IO_H - -#ifdef __cplusplus - extern "C" { -#endif - -/* Includes ------------------------------------------------------------------*/ -#include <stdint.h> - -/** @addtogroup BSP - * @{ - */ - -/** @addtogroup Components - * @{ - */ - -/** @addtogroup IO - * @{ - */ - -/** @defgroup IO_Exported_Types - * @{ - */ - -/** - * @brief IO Bit SET and Bit RESET enumeration - */ -typedef enum -{ - IO_PIN_RESET = 0, - IO_PIN_SET -}IO_PinState; - -typedef enum -{ - IO_MODE_INPUT = 0, /* input floating */ - IO_MODE_OUTPUT, /* output Push Pull */ - IO_MODE_IT_RISING_EDGE, /* float input - irq detect on rising edge */ - IO_MODE_IT_FALLING_EDGE, /* float input - irq detect on falling edge */ - IO_MODE_IT_LOW_LEVEL, /* float input - irq detect on low level */ - IO_MODE_IT_HIGH_LEVEL, /* float input - irq detect on high level */ - /* following modes only available on MFX*/ - IO_MODE_ANALOG, /* analog mode */ - IO_MODE_OFF, /* when pin isn't used*/ - IO_MODE_INPUT_PU, /* input with internal pull up resistor */ - IO_MODE_INPUT_PD, /* input with internal pull down resistor */ - IO_MODE_OUTPUT_OD, /* Open Drain output without internal resistor */ - IO_MODE_OUTPUT_OD_PU, /* Open Drain output with internal pullup resistor */ - IO_MODE_OUTPUT_OD_PD, /* Open Drain output with internal pulldown resistor */ - IO_MODE_OUTPUT_PP, /* PushPull output without internal resistor */ - IO_MODE_OUTPUT_PP_PU, /* PushPull output with internal pullup resistor */ - IO_MODE_OUTPUT_PP_PD, /* PushPull output with internal pulldown resistor */ - IO_MODE_IT_RISING_EDGE_PU, /* push up resistor input - irq on rising edge */ - IO_MODE_IT_RISING_EDGE_PD, /* push dw resistor input - irq on rising edge */ - IO_MODE_IT_FALLING_EDGE_PU, /* push up resistor input - irq on falling edge */ - IO_MODE_IT_FALLING_EDGE_PD, /* push dw resistor input - irq on falling edge */ - IO_MODE_IT_LOW_LEVEL_PU, /* push up resistor input - irq detect on low level */ - IO_MODE_IT_LOW_LEVEL_PD, /* push dw resistor input - irq detect on low level */ - IO_MODE_IT_HIGH_LEVEL_PU, /* push up resistor input - irq detect on high level */ - IO_MODE_IT_HIGH_LEVEL_PD, /* push dw resistor input - irq detect on high level */ - -}IO_ModeTypedef; - -/** @defgroup IO_Driver_structure IO Driver structure - * @{ - */ -typedef struct -{ - void (*Init)(uint16_t); - uint16_t (*ReadID)(uint16_t); - void (*Reset)(uint16_t); - - void (*Start)(uint16_t, uint32_t); - uint8_t (*Config)(uint16_t, uint32_t, IO_ModeTypedef); - void (*WritePin)(uint16_t, uint32_t, uint8_t); - uint32_t (*ReadPin)(uint16_t, uint32_t); - - void (*EnableIT)(uint16_t); - void (*DisableIT)(uint16_t); - uint32_t (*ITStatus)(uint16_t, uint32_t); - void (*ClearIT)(uint16_t, uint32_t); - -}IO_DrvTypeDef; -/** - * @} - */ - -/** - * @} - */ - -/** - * @} - */ - -/** - * @} - */ - -/** - * @} - */ - -#ifdef __cplusplus -} -#endif - -#endif /* __IO_H */ - -/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
--- a/Components/Common/lcd.h Mon May 30 11:09:05 2016 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,114 +0,0 @@ -/** - ****************************************************************************** - * @file lcd.h - * @author MCD Application Team - * @version V4.0.1 - * @date 21-July-2015 - * @brief This file contains all the functions prototypes for the LCD driver. - ****************************************************************************** - * @attention - * - * <h2><center>© COPYRIGHT(c) 2015 STMicroelectronics</center></h2> - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. Neither the name of STMicroelectronics nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - ****************************************************************************** - */ - -/* Define to prevent recursive inclusion -------------------------------------*/ -#ifndef __LCD_H -#define __LCD_H - -#ifdef __cplusplus - extern "C" { -#endif - -/* Includes ------------------------------------------------------------------*/ -#include <stdint.h> - -/** @addtogroup BSP - * @{ - */ - -/** @addtogroup Components - * @{ - */ - -/** @addtogroup LCD - * @{ - */ - -/** @defgroup LCD_Exported_Types - * @{ - */ - -/** @defgroup LCD_Driver_structure LCD Driver structure - * @{ - */ -typedef struct -{ - void (*Init)(void); - uint16_t (*ReadID)(void); - void (*DisplayOn)(void); - void (*DisplayOff)(void); - void (*SetCursor)(uint16_t, uint16_t); - void (*WritePixel)(uint16_t, uint16_t, uint16_t); - uint16_t (*ReadPixel)(uint16_t, uint16_t); - - /* Optimized operation */ - void (*SetDisplayWindow)(uint16_t, uint16_t, uint16_t, uint16_t); - void (*DrawHLine)(uint16_t, uint16_t, uint16_t, uint16_t); - void (*DrawVLine)(uint16_t, uint16_t, uint16_t, uint16_t); - - uint16_t (*GetLcdPixelWidth)(void); - uint16_t (*GetLcdPixelHeight)(void); - void (*DrawBitmap)(uint16_t, uint16_t, uint8_t*); - void (*DrawRGBImage)(uint16_t, uint16_t, uint16_t, uint16_t, uint8_t*); -}LCD_DrvTypeDef; -/** - * @} - */ - -/** - * @} - */ - -/** - * @} - */ - -/** - * @} - */ - -/** - * @} - */ - -#ifdef __cplusplus -} -#endif - -#endif /* __LCD_H */ - -/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
--- a/Components/Common/ts.h Mon May 30 11:09:05 2016 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,107 +0,0 @@ -/** - ****************************************************************************** - * @file ts.h - * @author MCD Application Team - * @version V4.0.1 - * @date 21-July-2015 - * @brief This file contains all the functions prototypes for the Touch Screen driver. - ****************************************************************************** - * @attention - * - * <h2><center>© COPYRIGHT(c) 2015 STMicroelectronics</center></h2> - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. Neither the name of STMicroelectronics nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - ****************************************************************************** - */ - -/* Define to prevent recursive inclusion -------------------------------------*/ -#ifndef __TS_H -#define __TS_H - -#ifdef __cplusplus - extern "C" { -#endif - -/* Includes ------------------------------------------------------------------*/ -#include <stdint.h> - -/** @addtogroup BSP - * @{ - */ - -/** @addtogroup Components - * @{ - */ - -/** @addtogroup TS - * @{ - */ - -/** @defgroup TS_Exported_Types - * @{ - */ - -/** @defgroup TS_Driver_structure Touch Sensor Driver structure - * @{ - */ -typedef struct -{ - void (*Init)(uint16_t); - uint16_t (*ReadID)(uint16_t); - void (*Reset)(uint16_t); - void (*Start)(uint16_t); - uint8_t (*DetectTouch)(uint16_t); - void (*GetXY)(uint16_t, uint16_t*, uint16_t*); - void (*EnableIT)(uint16_t); - void (*ClearIT)(uint16_t); - uint8_t (*GetITStatus)(uint16_t); - void (*DisableIT)(uint16_t); -}TS_DrvTypeDef; -/** - * @} - */ - -/** - * @} - */ - -/** - * @} - */ - -/** - * @} - */ - -/** - * @} - */ - -#ifdef __cplusplus -} -#endif - -#endif /* __TS_H */ - -/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
--- a/Components/cs43l22/cs43l22.c Mon May 30 11:09:05 2016 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,494 +0,0 @@ -/** - ****************************************************************************** - * @file cs43l22.c - * @author MCD Application Team - * @version V2.0.2 - * @date 06-October-2015 - * @brief This file provides the CS43L22 Audio Codec driver. - ****************************************************************************** - * @attention - * - * <h2><center>© COPYRIGHT(c) 2015 STMicroelectronics</center></h2> - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. Neither the name of STMicroelectronics nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - ****************************************************************************** - */ - -/* Includes ------------------------------------------------------------------*/ -#include "cs43l22.h" - -/** @addtogroup BSP - * @{ - */ - -/** @addtogroup Components - * @{ - */ - -/** @addtogroup CS43L22 - * @brief This file provides a set of functions needed to drive the - * CS43L22 audio codec. - * @{ - */ - -/** @defgroup CS43L22_Private_Types - * @{ - */ - -/** - * @} - */ - -/** @defgroup CS43L22_Private_Defines - * @{ - */ -#define VOLUME_CONVERT(Volume) (((Volume) > 100)? 100:((uint8_t)(((Volume) * 255) / 100))) -/* Uncomment this line to enable verifying data sent to codec after each write - operation (for debug purpose) */ -#if !defined (VERIFY_WRITTENDATA) -/* #define VERIFY_WRITTENDATA */ -#endif /* VERIFY_WRITTENDATA */ -/** - * @} - */ - -/** @defgroup CS43L22_Private_Macros - * @{ - */ - -/** - * @} - */ - -/** @defgroup CS43L22_Private_Variables - * @{ - */ - -/* Audio codec driver structure initialization */ -AUDIO_DrvTypeDef cs43l22_drv = -{ - cs43l22_Init, - cs43l22_DeInit, - cs43l22_ReadID, - - cs43l22_Play, - cs43l22_Pause, - cs43l22_Resume, - cs43l22_Stop, - - cs43l22_SetFrequency, - cs43l22_SetVolume, - cs43l22_SetMute, - cs43l22_SetOutputMode, - cs43l22_Reset, -}; - -static uint8_t Is_cs43l22_Stop = 1; - -volatile uint8_t OutputDev = 0; - -/** - * @} - */ - -/** @defgroup CS43L22_Function_Prototypes - * @{ - */ -static uint8_t CODEC_IO_Write(uint8_t Addr, uint8_t Reg, uint8_t Value); -/** - * @} - */ - -/** @defgroup CS43L22_Private_Functions - * @{ - */ - -/** - * @brief Initializes the audio codec and the control interface. - * @param DeviceAddr: Device address on communication Bus. - * @param OutputDevice: can be OUTPUT_DEVICE_SPEAKER, OUTPUT_DEVICE_HEADPHONE, - * OUTPUT_DEVICE_BOTH or OUTPUT_DEVICE_AUTO . - * @param Volume: Initial volume level (from 0 (Mute) to 100 (Max)) - * @retval 0 if correct communication, else wrong communication - */ -uint32_t cs43l22_Init(uint16_t DeviceAddr, uint16_t OutputDevice, uint8_t Volume, uint32_t AudioFreq) -{ - uint32_t counter = 0; - - /* Initialize the Control interface of the Audio Codec */ - AUDIO_IO_Init(); - - /* Keep Codec powered OFF */ - counter += CODEC_IO_Write(DeviceAddr, CS43L22_REG_POWER_CTL1, 0x01); - - /*Save Output device for mute ON/OFF procedure*/ - switch (OutputDevice) - { - case OUTPUT_DEVICE_SPEAKER: - OutputDev = 0xFA; - break; - - case OUTPUT_DEVICE_HEADPHONE: - OutputDev = 0xAF; - break; - - case OUTPUT_DEVICE_BOTH: - OutputDev = 0xAA; - break; - - case OUTPUT_DEVICE_AUTO: - OutputDev = 0x05; - break; - - default: - OutputDev = 0x05; - break; - } - - counter += CODEC_IO_Write(DeviceAddr, CS43L22_REG_POWER_CTL2, OutputDev); - - /* Clock configuration: Auto detection */ - counter += CODEC_IO_Write(DeviceAddr, CS43L22_REG_CLOCKING_CTL, 0x81); - - /* Set the Slave Mode and the audio Standard */ - counter += CODEC_IO_Write(DeviceAddr, CS43L22_REG_INTERFACE_CTL1, CODEC_STANDARD); - - /* Set the Master volume */ - counter += cs43l22_SetVolume(DeviceAddr, Volume); - - /* If the Speaker is enabled, set the Mono mode and volume attenuation level */ - if(OutputDevice != OUTPUT_DEVICE_HEADPHONE) - { - /* Set the Speaker Mono mode */ - counter += CODEC_IO_Write(DeviceAddr, CS43L22_REG_PLAYBACK_CTL2, 0x06); - - /* Set the Speaker attenuation level */ - counter += CODEC_IO_Write(DeviceAddr, CS43L22_REG_SPEAKER_A_VOL, 0x00); - counter += CODEC_IO_Write(DeviceAddr, CS43L22_REG_SPEAKER_B_VOL, 0x00); - } - - /* Additional configuration for the CODEC. These configurations are done to reduce - the time needed for the Codec to power off. If these configurations are removed, - then a long delay should be added between powering off the Codec and switching - off the I2S peripheral MCLK clock (which is the operating clock for Codec). - If this delay is not inserted, then the codec will not shut down properly and - it results in high noise after shut down. */ - - /* Disable the analog soft ramp */ - counter += CODEC_IO_Write(DeviceAddr, CS43L22_REG_ANALOG_ZC_SR_SETT, 0x00); - /* Disable the digital soft ramp */ - counter += CODEC_IO_Write(DeviceAddr, CS43L22_REG_MISC_CTL, 0x04); - /* Disable the limiter attack level */ - counter += CODEC_IO_Write(DeviceAddr, CS43L22_REG_LIMIT_CTL1, 0x00); - /* Adjust Bass and Treble levels */ - counter += CODEC_IO_Write(DeviceAddr, CS43L22_REG_TONE_CTL, 0x0F); - /* Adjust PCM volume level */ - counter += CODEC_IO_Write(DeviceAddr, CS43L22_REG_PCMA_VOL, 0x0A); - counter += CODEC_IO_Write(DeviceAddr, CS43L22_REG_PCMB_VOL, 0x0A); - - /* Return communication control value */ - return counter; -} - -/** - * @brief Deinitializes the audio codec. - * @param None - * @retval None - */ -void cs43l22_DeInit(void) -{ - /* Deinitialize Audio Codec interface */ - AUDIO_IO_DeInit(); -} - -/** - * @brief Get the CS43L22 ID. - * @param DeviceAddr: Device address on communication Bus. - * @retval The CS43L22 ID - */ -uint32_t cs43l22_ReadID(uint16_t DeviceAddr) -{ - uint8_t Value; - /* Initialize the Control interface of the Audio Codec */ - AUDIO_IO_Init(); - - Value = AUDIO_IO_Read(DeviceAddr, CS43L22_CHIPID_ADDR); - Value = (Value & CS43L22_ID_MASK); - - return((uint32_t) Value); -} - -/** - * @brief Start the audio Codec play feature. - * @note For this codec no Play options are required. - * @param DeviceAddr: Device address on communication Bus. - * @retval 0 if correct communication, else wrong communication - */ -uint32_t cs43l22_Play(uint16_t DeviceAddr, uint16_t* pBuffer, uint16_t Size) -{ - uint32_t counter = 0; - - if(Is_cs43l22_Stop == 1) - { - /* Enable the digital soft ramp */ - counter += CODEC_IO_Write(DeviceAddr, CS43L22_REG_MISC_CTL, 0x06); - - /* Enable Output device */ - counter += cs43l22_SetMute(DeviceAddr, AUDIO_MUTE_OFF); - - /* Power on the Codec */ - counter += CODEC_IO_Write(DeviceAddr, CS43L22_REG_POWER_CTL1, 0x9E); - Is_cs43l22_Stop = 0; - } - - /* Return communication control value */ - return counter; -} - -/** - * @brief Pauses playing on the audio codec. - * @param DeviceAddr: Device address on communication Bus. - * @retval 0 if correct communication, else wrong communication - */ -uint32_t cs43l22_Pause(uint16_t DeviceAddr) -{ - uint32_t counter = 0; - - /* Pause the audio file playing */ - /* Mute the output first */ - counter += cs43l22_SetMute(DeviceAddr, AUDIO_MUTE_ON); - - /* Put the Codec in Power save mode */ - counter += CODEC_IO_Write(DeviceAddr, CS43L22_REG_POWER_CTL1, 0x01); - - return counter; -} - -/** - * @brief Resumes playing on the audio codec. - * @param DeviceAddr: Device address on communication Bus. - * @retval 0 if correct communication, else wrong communication - */ -uint32_t cs43l22_Resume(uint16_t DeviceAddr) -{ - uint32_t counter = 0; - volatile uint32_t index = 0x00; - /* Resumes the audio file playing */ - /* Unmute the output first */ - counter += cs43l22_SetMute(DeviceAddr, AUDIO_MUTE_OFF); - - for(index = 0x00; index < 0xFF; index++); - - counter += CODEC_IO_Write(DeviceAddr, CS43L22_REG_POWER_CTL2, OutputDev); - - /* Exit the Power save mode */ - counter += CODEC_IO_Write(DeviceAddr, CS43L22_REG_POWER_CTL1, 0x9E); - - return counter; -} - -/** - * @brief Stops audio Codec playing. It powers down the codec. - * @param DeviceAddr: Device address on communication Bus. - * @param CodecPdwnMode: selects the power down mode. - * - CODEC_PDWN_HW: Physically power down the codec. When resuming from this - * mode, the codec is set to default configuration - * (user should re-Initialize the codec in order to - * play again the audio stream). - * @retval 0 if correct communication, else wrong communication - */ -uint32_t cs43l22_Stop(uint16_t DeviceAddr, uint32_t CodecPdwnMode) -{ - uint32_t counter = 0; - - /* Mute the output first */ - counter += cs43l22_SetMute(DeviceAddr, AUDIO_MUTE_ON); - - /* Disable the digital soft ramp */ - counter += CODEC_IO_Write(DeviceAddr, CS43L22_REG_MISC_CTL, 0x04); - - /* Power down the DAC and the speaker (PMDAC and PMSPK bits)*/ - counter += CODEC_IO_Write(DeviceAddr, CS43L22_REG_POWER_CTL1, 0x9F); - - Is_cs43l22_Stop = 1; - return counter; -} - -/** - * @brief Sets higher or lower the codec volume level. - * @param DeviceAddr: Device address on communication Bus. - * @param Volume: a byte value from 0 to 255 (refer to codec registers - * description for more details). - * @retval 0 if correct communication, else wrong communication - */ -uint32_t cs43l22_SetVolume(uint16_t DeviceAddr, uint8_t Volume) -{ - uint32_t counter = 0; - uint8_t convertedvol = VOLUME_CONVERT(Volume); - - if(Volume > 0xE6) - { - /* Set the Master volume */ - counter += CODEC_IO_Write(DeviceAddr, CS43L22_REG_MASTER_A_VOL, convertedvol - 0xE7); - counter += CODEC_IO_Write(DeviceAddr, CS43L22_REG_MASTER_B_VOL, convertedvol - 0xE7); - } - else - { - /* Set the Master volume */ - counter += CODEC_IO_Write(DeviceAddr, CS43L22_REG_MASTER_A_VOL, convertedvol + 0x19); - counter += CODEC_IO_Write(DeviceAddr, CS43L22_REG_MASTER_B_VOL, convertedvol + 0x19); - } - - return counter; -} - -/** - * @brief Sets new frequency. - * @param DeviceAddr: Device address on communication Bus. - * @param AudioFreq: Audio frequency used to play the audio stream. - * @retval 0 if correct communication, else wrong communication - */ -uint32_t cs43l22_SetFrequency(uint16_t DeviceAddr, uint32_t AudioFreq) -{ - return 0; -} - -/** - * @brief Enables or disables the mute feature on the audio codec. - * @param DeviceAddr: Device address on communication Bus. - * @param Cmd: AUDIO_MUTE_ON to enable the mute or AUDIO_MUTE_OFF to disable the - * mute mode. - * @retval 0 if correct communication, else wrong communication - */ -uint32_t cs43l22_SetMute(uint16_t DeviceAddr, uint32_t Cmd) -{ - uint32_t counter = 0; - - /* Set the Mute mode */ - if(Cmd == AUDIO_MUTE_ON) - { - counter += CODEC_IO_Write(DeviceAddr, CS43L22_REG_POWER_CTL2, 0xFF); - counter += CODEC_IO_Write(DeviceAddr, CS43L22_REG_HEADPHONE_A_VOL, 0x01); - counter += CODEC_IO_Write(DeviceAddr, CS43L22_REG_HEADPHONE_B_VOL, 0x01); - } - else /* AUDIO_MUTE_OFF Disable the Mute */ - { - counter += CODEC_IO_Write(DeviceAddr, CS43L22_REG_HEADPHONE_A_VOL, 0x00); - counter += CODEC_IO_Write(DeviceAddr, CS43L22_REG_HEADPHONE_B_VOL, 0x00); - counter += CODEC_IO_Write(DeviceAddr, CS43L22_REG_POWER_CTL2, OutputDev); - } - return counter; -} - -/** - * @brief Switch dynamically (while audio file is played) the output target - * (speaker or headphone). - * @note This function modifies a global variable of the audio codec driver: OutputDev. - * @param DeviceAddr: Device address on communication Bus. - * @param Output: specifies the audio output target: OUTPUT_DEVICE_SPEAKER, - * OUTPUT_DEVICE_HEADPHONE, OUTPUT_DEVICE_BOTH or OUTPUT_DEVICE_AUTO - * @retval 0 if correct communication, else wrong communication - */ -uint32_t cs43l22_SetOutputMode(uint16_t DeviceAddr, uint8_t Output) -{ - uint32_t counter = 0; - - switch (Output) - { - case OUTPUT_DEVICE_SPEAKER: - counter += CODEC_IO_Write(DeviceAddr, CS43L22_REG_POWER_CTL2, 0xFA); /* SPK always ON & HP always OFF */ - OutputDev = 0xFA; - break; - - case OUTPUT_DEVICE_HEADPHONE: - counter += CODEC_IO_Write(DeviceAddr, CS43L22_REG_POWER_CTL2, 0xAF); /* SPK always OFF & HP always ON */ - OutputDev = 0xAF; - break; - - case OUTPUT_DEVICE_BOTH: - counter += CODEC_IO_Write(DeviceAddr, CS43L22_REG_POWER_CTL2, 0xAA); /* SPK always ON & HP always ON */ - OutputDev = 0xAA; - break; - - case OUTPUT_DEVICE_AUTO: - counter += CODEC_IO_Write(DeviceAddr, CS43L22_REG_POWER_CTL2, 0x05); /* Detect the HP or the SPK automatically */ - OutputDev = 0x05; - break; - - default: - counter += CODEC_IO_Write(DeviceAddr, CS43L22_REG_POWER_CTL2, 0x05); /* Detect the HP or the SPK automatically */ - OutputDev = 0x05; - break; - } - return counter; -} - -/** - * @brief Resets cs43l22 registers. - * @param DeviceAddr: Device address on communication Bus. - * @retval 0 if correct communication, else wrong communication - */ -uint32_t cs43l22_Reset(uint16_t DeviceAddr) -{ - return 0; -} - -/** - * @brief Writes/Read a single data. - * @param Addr: I2C address - * @param Reg: Reg address - * @param Value: Data to be written - * @retval None - */ -static uint8_t CODEC_IO_Write(uint8_t Addr, uint8_t Reg, uint8_t Value) -{ - uint32_t result = 0; - - AUDIO_IO_Write(Addr, Reg, Value); - -#ifdef VERIFY_WRITTENDATA - /* Verify that the data has been correctly written */ - result = (AUDIO_IO_Read(Addr, Reg) == Value)? 0:1; -#endif /* VERIFY_WRITTENDATA */ - - return result; -} - -/** - * @} - */ - -/** - * @} - */ - -/** - * @} - */ - -/** - * @} - */ - -/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
--- a/Components/cs43l22/cs43l22.h Mon May 30 11:09:05 2016 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,228 +0,0 @@ -/** - ****************************************************************************** - * @file cs43l22.h - * @author MCD Application Team - * @version V2.0.2 - * @date 06-October-2015 - * @brief This file contains all the functions prototypes for the cs43l22.c driver. - ****************************************************************************** - * @attention - * - * <h2><center>© COPYRIGHT(c) 2015 STMicroelectronics</center></h2> - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. Neither the name of STMicroelectronics nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - ****************************************************************************** - */ - -/* Define to prevent recursive inclusion -------------------------------------*/ -#ifndef __CS43L22_H -#define __CS43L22_H - -/* Includes ------------------------------------------------------------------*/ -#include "../Common/audio.h" - -/** @addtogroup BSP - * @{ - */ - -/** @addtogroup Component - * @{ - */ - -/** @addtogroup CS43L22 - * @{ - */ - -/** @defgroup CS43L22_Exported_Types - * @{ - */ - -/** - * @} - */ - -/** @defgroup CS43L22_Exported_Constants - * @{ - */ - -/******************************************************************************/ -/*************************** Codec User defines ******************************/ -/******************************************************************************/ -/* Codec output DEVICE */ -#define OUTPUT_DEVICE_SPEAKER 1 -#define OUTPUT_DEVICE_HEADPHONE 2 -#define OUTPUT_DEVICE_BOTH 3 -#define OUTPUT_DEVICE_AUTO 4 - -/* Volume Levels values */ -#define DEFAULT_VOLMIN 0x00 -#define DEFAULT_VOLMAX 0xFF -#define DEFAULT_VOLSTEP 0x04 - -#define AUDIO_PAUSE 0 -#define AUDIO_RESUME 1 - -/* Codec POWER DOWN modes */ -#define CODEC_PDWN_HW 1 -#define CODEC_PDWN_SW 2 - -/* MUTE commands */ -#define AUDIO_MUTE_ON 1 -#define AUDIO_MUTE_OFF 0 - -/* AUDIO FREQUENCY */ -#define AUDIO_FREQUENCY_192K ((uint32_t)192000) -#define AUDIO_FREQUENCY_96K ((uint32_t)96000) -#define AUDIO_FREQUENCY_48K ((uint32_t)48000) -#define AUDIO_FREQUENCY_44K ((uint32_t)44100) -#define AUDIO_FREQUENCY_32K ((uint32_t)32000) -#define AUDIO_FREQUENCY_22K ((uint32_t)22050) -#define AUDIO_FREQUENCY_16K ((uint32_t)16000) -#define AUDIO_FREQUENCY_11K ((uint32_t)11025) -#define AUDIO_FREQUENCY_8K ((uint32_t)8000) - -/** CS43l22 Registers ***/ -#define CS43L22_REG_ID 0x01 -#define CS43L22_REG_POWER_CTL1 0x02 -#define CS43L22_REG_POWER_CTL2 0x04 -#define CS43L22_REG_CLOCKING_CTL 0x05 -#define CS43L22_REG_INTERFACE_CTL1 0x06 -#define CS43L22_REG_INTERFACE_CTL2 0x07 -#define CS43L22_REG_PASSTHR_A_SELECT 0x08 -#define CS43L22_REG_PASSTHR_B_SELECT 0x09 -#define CS43L22_REG_ANALOG_ZC_SR_SETT 0x0A -#define CS43L22_REG_PASSTHR_GANG_CTL 0x0C -#define CS43L22_REG_PLAYBACK_CTL1 0x0D -#define CS43L22_REG_MISC_CTL 0x0E -#define CS43L22_REG_PLAYBACK_CTL2 0x0F -#define CS43L22_REG_PASSTHR_A_VOL 0x14 -#define CS43L22_REG_PASSTHR_B_VOL 0x15 -#define CS43L22_REG_PCMA_VOL 0x1A -#define CS43L22_REG_PCMB_VOL 0x1B -#define CS43L22_REG_BEEP_FREQ_ON_TIME 0x1C -#define CS43L22_REG_BEEP_VOL_OFF_TIME 0x1D -#define CS43L22_REG_BEEP_TONE_CFG 0x1E -#define CS43L22_REG_TONE_CTL 0x1F -#define CS43L22_REG_MASTER_A_VOL 0x20 -#define CS43L22_REG_MASTER_B_VOL 0x21 -#define CS43L22_REG_HEADPHONE_A_VOL 0x22 -#define CS43L22_REG_HEADPHONE_B_VOL 0x23 -#define CS43L22_REG_SPEAKER_A_VOL 0x24 -#define CS43L22_REG_SPEAKER_B_VOL 0x25 -#define CS43L22_REG_CH_MIXER_SWAP 0x26 -#define CS43L22_REG_LIMIT_CTL1 0x27 -#define CS43L22_REG_LIMIT_CTL2 0x28 -#define CS43L22_REG_LIMIT_ATTACK_RATE 0x29 -#define CS43L22_REG_OVF_CLK_STATUS 0x2E -#define CS43L22_REG_BATT_COMPENSATION 0x2F -#define CS43L22_REG_VP_BATTERY_LEVEL 0x30 -#define CS43L22_REG_SPEAKER_STATUS 0x31 -#define CS43L22_REG_TEMPMONITOR_CTL 0x32 -#define CS43L22_REG_THERMAL_FOLDBACK 0x33 -#define CS43L22_REG_CHARGE_PUMP_FREQ 0x34 - -/******************************************************************************/ -/****************************** REGISTER MAPPING ******************************/ -/******************************************************************************/ -/** - * @brief CS43L22 ID - */ -#define CS43L22_ID 0xE0 -#define CS43L22_ID_MASK 0xF8 -/** - * @brief Chip ID Register: Chip I.D. and Revision Register - * Read only register - * Default value: 0x01 - * [7:3] CHIPID[4:0]: I.D. code for the CS43L22. - * Default value: 11100b - * [2:0] REVID[2:0]: CS43L22 revision level. - * Default value: - * 000 - Rev A0 - * 001 - Rev A1 - * 010 - Rev B0 - * 011 - Rev B1 - */ -#define CS43L22_CHIPID_ADDR 0x01 - -/** - * @} - */ - -/** @defgroup CS43L22_Exported_Macros - * @{ - */ - -/** - * @} - */ - -/** @defgroup CS43L22_Exported_Functions - * @{ - */ - -/*------------------------------------------------------------------------------ - Audio Codec functions -------------------------------------------------------------------------------*/ -/* High Layer codec functions */ -uint32_t cs43l22_Init(uint16_t DeviceAddr, uint16_t OutputDevice, uint8_t Volume, uint32_t AudioFreq); -void cs43l22_DeInit(void); -uint32_t cs43l22_ReadID(uint16_t DeviceAddr); -uint32_t cs43l22_Play(uint16_t DeviceAddr, uint16_t* pBuffer, uint16_t Size); -uint32_t cs43l22_Pause(uint16_t DeviceAddr); -uint32_t cs43l22_Resume(uint16_t DeviceAddr); -uint32_t cs43l22_Stop(uint16_t DeviceAddr, uint32_t Cmd); -uint32_t cs43l22_SetVolume(uint16_t DeviceAddr, uint8_t Volume); -uint32_t cs43l22_SetFrequency(uint16_t DeviceAddr, uint32_t AudioFreq); -uint32_t cs43l22_SetMute(uint16_t DeviceAddr, uint32_t Cmd); -uint32_t cs43l22_SetOutputMode(uint16_t DeviceAddr, uint8_t Output); -uint32_t cs43l22_Reset(uint16_t DeviceAddr); - -/* AUDIO IO functions */ -void AUDIO_IO_Init(void); -void AUDIO_IO_DeInit(void); -void AUDIO_IO_Write(uint8_t Addr, uint8_t Reg, uint8_t Value); -uint8_t AUDIO_IO_Read(uint8_t Addr, uint8_t Reg); - -/* Audio driver structure */ -extern AUDIO_DrvTypeDef cs43l22_drv; - -#endif /* __CS43L22_H */ - -/** - * @} - */ - -/** - * @} - */ - -/** - * @} - */ - -/** - * @} - */ - -/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
--- a/Components/ft6x06/ft6x06.c Mon May 30 11:09:05 2016 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,516 +0,0 @@ -/** - ****************************************************************************** - * @file ft6x06.c - * @author MCD Application Team - * @version V1.0.0 - * @date 03-August-2015 - * @brief This file provides a set of functions needed to manage the FT6X06 - * IO Expander devices. - ****************************************************************************** - * @attention - * - * <h2><center>© COPYRIGHT(c) 2015 STMicroelectronics</center></h2> - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. Neither the name of STMicroelectronics nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - ****************************************************************************** - */ - -/* Includes ------------------------------------------------------------------*/ -#include "ft6x06.h" - -/** @addtogroup BSP - * @{ - */ - -/** @addtogroup Component - * @{ - */ - -/** @defgroup FT6X06 - * @{ - */ - -/* Private typedef -----------------------------------------------------------*/ - -/** @defgroup FT6X06_Private_Defines FT6X06 Private Defines - * @{ - */ -#define FT6x06_MAX_INSTANCE 2 -/** - * @} - */ - -/* Private macro -------------------------------------------------------------*/ - -/** @defgroup FT6X06_Private_Variables FT6X06 Private Variables - * @{ - */ - -/* Touch screen driver structure initialization */ -TS_DrvTypeDef ft6x06_ts_drv = -{ - ft6x06_Init, - ft6x06_ReadID, - ft6x06_Reset, - - ft6x06_TS_Start, - ft6x06_TS_DetectTouch, - ft6x06_TS_GetXY, - - ft6x06_TS_EnableIT, - ft6x06_TS_ClearIT, - ft6x06_TS_ITStatus, - ft6x06_TS_DisableIT - -}; - -/* ft6x06 instances by address */ -uint8_t ft6x06[FT6x06_MAX_INSTANCE] = {0}; - -/* Global ft6x06 handle */ -static ft6x06_handle_TypeDef ft6x06_handle = { FT6206_I2C_NOT_INITIALIZED, 0, 0}; - -/** - * @} - */ - -/** @defgroup ft6x06_Private_Function_Prototypes ft6x06 Private Function Prototypes - * @{ - */ -static uint8_t ft6x06_GetInstance(uint16_t DeviceAddr); -/* Private functions prototypes-----------------------------------------------*/ -#if (TS_AUTO_CALIBRATION_SUPPORTED == 1) -/** - * @brief Start TouchScreen calibration phase - * @param DeviceAddr: FT6206 Device address for communication on I2C Bus. - * @retval Status FT6206_STATUS_OK or FT6206_STATUS_NOT_OK. - */ -static uint32_t ft6x06_TS_Calibration(uint16_t DeviceAddr); -#endif /* TS_AUTO_CALIBRATION_SUPPORTED == 1 */ - -/** - * @brief Basic static configuration of TouchScreen - * @param DeviceAddr: FT6206 Device address for communication on I2C Bus. - * @retval Status FT6206_STATUS_OK or FT6206_STATUS_NOT_OK. - */ -static uint32_t ft6x06_TS_Configure(uint16_t DeviceAddr); - -/** - * @} - */ - -/** @defgroup ft6x06_Private_Functions ft6x06 Private Functions - * @{ - */ - -/** - * @brief Initialize the ft6x06 communication bus - * from MCU to FT6206 : ie I2C channel initialization (if required). - * @param DeviceAddr: Device address on communication Bus (I2C slave address of FT6206). - * @retval None - */ -void ft6x06_Init(uint16_t DeviceAddr) -{ - uint8_t instance; - uint8_t empty; - - /* Check if device instance already exists */ - instance = ft6x06_GetInstance(DeviceAddr); - - /* To prevent double initialization */ - if(instance == 0xFF) - { - /* Look for empty instance */ - empty = ft6x06_GetInstance(0); - - if(empty < FT6x06_MAX_INSTANCE) - { - /* Register the current device instance */ - ft6x06[empty] = DeviceAddr; - - /* Initialize IO BUS layer */ - TS_IO_Init(); - } - } -} - -/** - * @brief Software Reset the ft6x06. - * @note : Not applicable to FT6206. - * @param DeviceAddr: Device address on communication Bus (I2C slave address of FT6206). - * @retval None - */ -void ft6x06_Reset(uint16_t DeviceAddr) -{ - /* Do nothing */ - /* No software reset sequence available in FT6206 IC */ -} - -/** - * @brief Read the ft6x06 device ID, pre initialize I2C in case of need to be - * able to read the FT6206 device ID, and verify this is a FT6206. - * @param DeviceAddr: I2C FT6x06 Slave address. - * @retval The Device ID (two bytes). - */ -uint16_t ft6x06_ReadID(uint16_t DeviceAddr) -{ - /* Initialize I2C link if needed */ - TS_IO_Init(); - - /* Return the device ID value */ - return (TS_IO_Read(DeviceAddr, FT6206_CHIP_ID_REG)); -} - -/** - * @brief Configures the touch Screen IC device to start detecting touches - * It goes through an internal calibration process (Hw calibration sequence of - * the touch screen). - * @param DeviceAddr: Device address on communication Bus (I2C slave address). - * @retval None. - */ -void ft6x06_TS_Start(uint16_t DeviceAddr) -{ -#if (TS_AUTO_CALIBRATION_SUPPORTED == 1) - /* Hw Calibration sequence start : should be done once after each power up */ - /* This is called internal calibration of the touch screen */ - ft6x06_TS_Calibration(DeviceAddr); -#endif - /* Minimum static configuration of FT6206 */ - ft6x06_TS_Configure(DeviceAddr); - - /* By default set FT6206 IC in Polling mode : no INT generation on FT6206 for new touch available */ - /* Note TS_INT is active low */ - ft6x06_TS_DisableIT(DeviceAddr); -} - -/** - * @brief Return if there is touches detected or not. - * Try to detect new touches and forget the old ones (reset internal global - * variables). - * @param DeviceAddr: Device address on communication Bus. - * @retval : Number of active touches detected (can be 0, 1 or 2). - */ -uint8_t ft6x06_TS_DetectTouch(uint16_t DeviceAddr) -{ - volatile uint8_t nbTouch = 0; - - /* Read register FT6206_TD_STAT_REG to check number of touches detection */ - nbTouch = TS_IO_Read(DeviceAddr, FT6206_TD_STAT_REG); - nbTouch &= FT6206_TD_STAT_MASK; - - if(nbTouch > FT6206_MAX_DETECTABLE_TOUCH) - { - /* If invalid number of touch detected, set it to zero */ - nbTouch = 0; - } - - /* Update ft6x06 driver internal global : current number of active touches */ - ft6x06_handle.currActiveTouchNb = nbTouch; - - /* Reset current active touch index on which to work on */ - ft6x06_handle.currActiveTouchIdx = 0; - - return(nbTouch); -} - -/** - * @brief Get the touch screen X and Y positions values - * Manage multi touch thanks to touch Index global - * variable 'ft6x06_handle.currActiveTouchIdx'. - * @param DeviceAddr: Device address on communication Bus. - * @param X: Pointer to X position value - * @param Y: Pointer to Y position value - * @retval None. - */ -void ft6x06_TS_GetXY(uint16_t DeviceAddr, uint16_t *X, uint16_t *Y) -{ - uint8_t regAddress = 0; - uint8_t dataxy[4]; - - if(ft6x06_handle.currActiveTouchIdx < ft6x06_handle.currActiveTouchNb) - { - switch(ft6x06_handle.currActiveTouchIdx) - { - case 0 : - regAddress = FT6206_P1_XH_REG; - break; - case 1 : - regAddress = FT6206_P2_XH_REG; - break; - - default : - break; - } - - /* Read X and Y positions */ - TS_IO_ReadMultiple(DeviceAddr, regAddress, dataxy, sizeof(dataxy)); - - /* Send back ready X position to caller */ - *X = ((dataxy[0] & FT6206_MSB_MASK) << 8) | (dataxy[1] & FT6206_LSB_MASK); - - /* Send back ready Y position to caller */ - *Y = ((dataxy[2] & FT6206_MSB_MASK) << 8) | (dataxy[3] & FT6206_LSB_MASK); - - ft6x06_handle.currActiveTouchIdx++; - } -} - -/** - * @brief Configure the FT6206 device to generate IT on given INT pin - * connected to MCU as EXTI. - * @param DeviceAddr: Device address on communication Bus (Slave I2C address of FT6206). - * @retval None - */ -void ft6x06_TS_EnableIT(uint16_t DeviceAddr) -{ - uint8_t regValue = 0; - regValue = (FT6206_G_MODE_INTERRUPT_TRIGGER & (FT6206_G_MODE_INTERRUPT_MASK >> FT6206_G_MODE_INTERRUPT_SHIFT)) << FT6206_G_MODE_INTERRUPT_SHIFT; - - /* Set interrupt trigger mode in FT6206_GMODE_REG */ - TS_IO_Write(DeviceAddr, FT6206_GMODE_REG, regValue); -} - -/** - * @brief Configure the FT6206 device to stop generating IT on the given INT pin - * connected to MCU as EXTI. - * @param DeviceAddr: Device address on communication Bus (Slave I2C address of FT6206). - * @retval None - */ -void ft6x06_TS_DisableIT(uint16_t DeviceAddr) -{ - uint8_t regValue = 0; - regValue = (FT6206_G_MODE_INTERRUPT_POLLING & (FT6206_G_MODE_INTERRUPT_MASK >> FT6206_G_MODE_INTERRUPT_SHIFT)) << FT6206_G_MODE_INTERRUPT_SHIFT; - - /* Set interrupt polling mode in FT6206_GMODE_REG */ - TS_IO_Write(DeviceAddr, FT6206_GMODE_REG, regValue); -} - -/** - * @brief Get IT status from FT6206 interrupt status registers - * Should be called Following an EXTI coming to the MCU to know the detailed - * reason of the interrupt. - * @note : This feature is not applicable to FT6206. - * @param DeviceAddr: Device address on communication Bus (I2C slave address of FT6206). - * @retval TS interrupts status : always return 0 here - */ -uint8_t ft6x06_TS_ITStatus(uint16_t DeviceAddr) -{ - /* Always return 0 as feature not applicable to FT6206 */ - return 0; -} - -/** - * @brief Clear IT status in FT6206 interrupt status clear registers - * Should be called Following an EXTI coming to the MCU. - * @note : This feature is not applicable to FT6206. - * @param DeviceAddr: Device address on communication Bus (I2C slave address of FT6206). - * @retval None - */ -void ft6x06_TS_ClearIT(uint16_t DeviceAddr) -{ - /* Nothing to be done here for FT6206 */ -} - -/**** NEW FEATURES enabled when Multi-touch support is enabled ****/ - -#if (TS_MULTI_TOUCH_SUPPORTED == 1) - -/** - * @brief Get the last touch gesture identification (zoom, move up/down...). - * @param DeviceAddr: Device address on communication Bus (I2C slave address of FT6x06). - * @param pGestureId : Pointer to get last touch gesture Identification. - * @retval None. - */ -void ft6x06_TS_GetGestureID(uint16_t DeviceAddr, uint32_t * pGestureId) -{ - volatile uint8_t ucReadData = 0; - - ucReadData = TS_IO_Read(DeviceAddr, FT6206_GEST_ID_REG); - - * pGestureId = ucReadData; -} - -/** - * @brief Get the touch detailed informations on touch number 'touchIdx' (0..1) - * This touch detailed information contains : - * - weight that was applied to this touch - * - sub-area of the touch in the touch panel - * - event of linked to the touch (press down, lift up, ...) - * @param DeviceAddr: Device address on communication Bus (I2C slave address of FT6x06). - * @param touchIdx : Passed index of the touch (0..1) on which we want to get the - * detailed information. - * @param pWeight : Pointer to to get the weight information of 'touchIdx'. - * @param pArea : Pointer to to get the sub-area information of 'touchIdx'. - * @param pEvent : Pointer to to get the event information of 'touchIdx'. - - * @retval None. - */ -void ft6x06_TS_GetTouchInfo(uint16_t DeviceAddr, - uint32_t touchIdx, - uint32_t * pWeight, - uint32_t * pArea, - uint32_t * pEvent) -{ - uint8_t regAddress = 0; - uint8_t dataxy[3]; - - if(touchIdx < ft6x06_handle.currActiveTouchNb) - { - switch(touchIdx) - { - case 0 : - regAddress = FT6206_P1_WEIGHT_REG; - break; - - case 1 : - regAddress = FT6206_P2_WEIGHT_REG; - break; - - default : - break; - - } /* end switch(touchIdx) */ - - /* Read weight, area and Event Id of touch index */ - TS_IO_ReadMultiple(DeviceAddr, regAddress, dataxy, sizeof(dataxy)); - - /* Return weight of touch index */ - * pWeight = (dataxy[0] & FT6206_TOUCH_WEIGHT_MASK) >> FT6206_TOUCH_WEIGHT_SHIFT; - /* Return area of touch index */ - * pArea = (dataxy[1] & FT6206_TOUCH_AREA_MASK) >> FT6206_TOUCH_AREA_SHIFT; - /* Return Event Id of touch index */ - * pEvent = (dataxy[2] & FT6206_TOUCH_EVT_FLAG_MASK) >> FT6206_TOUCH_EVT_FLAG_SHIFT; - - } /* of if(touchIdx < ft6x06_handle.currActiveTouchNb) */ -} - -#endif /* TS_MULTI_TOUCH_SUPPORTED == 1 */ - -#if (TS_AUTO_CALIBRATION_SUPPORTED == 1) -/** - * @brief Start TouchScreen calibration phase - * @param DeviceAddr: FT6206 Device address for communication on I2C Bus. - * @retval Status FT6206_STATUS_OK or FT6206_STATUS_NOT_OK. - */ -static uint32_t ft6x06_TS_Calibration(uint16_t DeviceAddr) -{ - uint32_t nbAttempt = 0; - volatile uint8_t ucReadData; - volatile uint8_t regValue; - uint32_t status = FT6206_STATUS_OK; - uint8_t bEndCalibration = 0; - - /* >> Calibration sequence start */ - - /* Switch FT6206 back to factory mode to calibrate */ - regValue = (FT6206_DEV_MODE_FACTORY & FT6206_DEV_MODE_MASK) << FT6206_DEV_MODE_SHIFT; - TS_IO_Write(DeviceAddr, FT6206_DEV_MODE_REG, regValue); /* 0x40 */ - - /* Read back the same register FT6206_DEV_MODE_REG */ - ucReadData = TS_IO_Read(DeviceAddr, FT6206_DEV_MODE_REG); - TS_IO_Delay(300); /* Wait 300 ms */ - - if(((ucReadData & (FT6206_DEV_MODE_MASK << FT6206_DEV_MODE_SHIFT)) >> FT6206_DEV_MODE_SHIFT) != FT6206_DEV_MODE_FACTORY ) - { - /* Return error to caller */ - return(FT6206_STATUS_NOT_OK); - } - - /* Start calibration command */ - TS_IO_Write(DeviceAddr, FT6206_TD_STAT_REG, 0x04); - TS_IO_Delay(300); /* Wait 300 ms */ - - /* 100 attempts to wait switch from factory mode (calibration) to working mode */ - for (nbAttempt=0; ((nbAttempt < 100) && (!bEndCalibration)) ; nbAttempt++) - { - ucReadData = TS_IO_Read(DeviceAddr, FT6206_DEV_MODE_REG); - ucReadData = (ucReadData & (FT6206_DEV_MODE_MASK << FT6206_DEV_MODE_SHIFT)) >> FT6206_DEV_MODE_SHIFT; - if(ucReadData == FT6206_DEV_MODE_WORKING) - { - /* Auto Switch to FT6206_DEV_MODE_WORKING : means calibration have ended */ - bEndCalibration = 1; /* exit for loop */ - } - - TS_IO_Delay(200); /* Wait 200 ms */ - } - - /* Calibration sequence end << */ - - return(status); -} -#endif /* TS_AUTO_CALIBRATION_SUPPORTED == 1 */ - -/** - * @brief Basic static configuration of TouchScreen - * @param DeviceAddr: FT6206 Device address for communication on I2C Bus. - * @retval Status FT6206_STATUS_OK or FT6206_STATUS_NOT_OK. - */ -static uint32_t ft6x06_TS_Configure(uint16_t DeviceAddr) -{ - uint32_t status = FT6206_STATUS_OK; - - /* Nothing special to be done for FT6206 */ - - return(status); -} - -/** - * @brief Check if the device instance of the selected address is already registered - * and return its index - * @param DeviceAddr: Device address on communication Bus. - * @retval Index of the device instance if registered, 0xFF if not. - */ -static uint8_t ft6x06_GetInstance(uint16_t DeviceAddr) -{ - uint8_t idx = 0; - - /* Check all the registered instances */ - for(idx = 0; idx < FT6x06_MAX_INSTANCE ; idx ++) - { - if(ft6x06[idx] == DeviceAddr) - { - return idx; - } - } - - return 0xFF; -} - -/** - * @} - */ - -/** - * @} - */ - -/** - * @} - */ - -/** - * @} - */ - -/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
--- a/Components/ft6x06/ft6x06.h Mon May 30 11:09:05 2016 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,467 +0,0 @@ -/** - ****************************************************************************** - * @file ft6x06.h - * @author MCD Application Team - * @version V1.0.0 - * @date 03-August-2015 - * @brief This file contains all the functions prototypes for the - * ft6x06.c IO expander driver. - ****************************************************************************** - * @attention - * - * <h2><center>© COPYRIGHT(c) 2015 STMicroelectronics</center></h2> - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. Neither the name of STMicroelectronics nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - ****************************************************************************** - */ - -/* Define to prevent recursive inclusion -------------------------------------*/ -#ifndef __FT6X06_H -#define __FT6X06_H - -#ifdef __cplusplus -extern "C" { -#endif - -/* Set Multi-touch as non supported */ -#ifndef TS_MULTI_TOUCH_SUPPORTED - #define TS_MULTI_TOUCH_SUPPORTED 0 -#endif - -/* Set Auto-calibration as non supported */ -#ifndef TS_AUTO_CALIBRATION_SUPPORTED - #define TS_AUTO_CALIBRATION_SUPPORTED 0 -#endif - -/* Includes ------------------------------------------------------------------*/ -#include "../Common/ts.h" - -/* Macros --------------------------------------------------------------------*/ - -/** @typedef ft6x06_handle_TypeDef - * ft6x06 Handle definition. - */ -typedef struct -{ - uint8_t i2cInitialized; - - /* field holding the current number of simultaneous active touches */ - uint8_t currActiveTouchNb; - - /* field holding the touch index currently managed */ - uint8_t currActiveTouchIdx; - -} ft6x06_handle_TypeDef; - - /** @addtogroup BSP - * @{ - */ - - /** @addtogroup Component - * @{ - */ - - /** @defgroup FT6X06 - * @{ - */ - - /* Exported types ------------------------------------------------------------*/ - - /** @defgroup FT6X06_Exported_Types - * @{ - */ - - /* Exported constants --------------------------------------------------------*/ - - /** @defgroup FT6X06_Exported_Constants - * @{ - */ - - /* Maximum border values of the touchscreen pad */ -#define FT_6206_MAX_WIDTH ((uint16_t)800) /* Touchscreen pad max width */ -#define FT_6206_MAX_HEIGHT ((uint16_t)480) /* Touchscreen pad max height */ - - /* Possible values of driver functions return status */ -#define FT6206_STATUS_OK 0 -#define FT6206_STATUS_NOT_OK 1 - - /* Possible values of global variable 'TS_I2C_Initialized' */ -#define FT6206_I2C_NOT_INITIALIZED 0 -#define FT6206_I2C_INITIALIZED 1 - - /* Max detectable simultaneous touches */ -#define FT6206_MAX_DETECTABLE_TOUCH 2 - - /** - * @brief : Definitions for FT6206 I2C register addresses on 8 bit - **/ - - /* Current mode register of the FT6206 (R/W) */ -#define FT6206_DEV_MODE_REG 0x00 - - /* Possible values of FT6206_DEV_MODE_REG */ -#define FT6206_DEV_MODE_WORKING 0x00 -#define FT6206_DEV_MODE_FACTORY 0x04 - -#define FT6206_DEV_MODE_MASK 0x7 -#define FT6206_DEV_MODE_SHIFT 4 - - /* Gesture ID register */ -#define FT6206_GEST_ID_REG 0x01 - - /* Possible values of FT6206_GEST_ID_REG */ -#define FT6206_GEST_ID_NO_GESTURE 0x00 -#define FT6206_GEST_ID_MOVE_UP 0x10 -#define FT6206_GEST_ID_MOVE_RIGHT 0x14 -#define FT6206_GEST_ID_MOVE_DOWN 0x18 -#define FT6206_GEST_ID_MOVE_LEFT 0x1C -#define FT6206_GEST_ID_ZOOM_IN 0x48 -#define FT6206_GEST_ID_ZOOM_OUT 0x49 - - /* Touch Data Status register : gives number of active touch points (0..2) */ -#define FT6206_TD_STAT_REG 0x02 - - /* Values related to FT6206_TD_STAT_REG */ -#define FT6206_TD_STAT_MASK 0x0F -#define FT6206_TD_STAT_SHIFT 0x00 - - /* Values Pn_XH and Pn_YH related */ -#define FT6206_TOUCH_EVT_FLAG_PRESS_DOWN 0x00 -#define FT6206_TOUCH_EVT_FLAG_LIFT_UP 0x01 -#define FT6206_TOUCH_EVT_FLAG_CONTACT 0x02 -#define FT6206_TOUCH_EVT_FLAG_NO_EVENT 0x03 - -#define FT6206_TOUCH_EVT_FLAG_SHIFT 6 -#define FT6206_TOUCH_EVT_FLAG_MASK (3 << FT6206_TOUCH_EVT_FLAG_SHIFT) - -#define FT6206_MSB_MASK 0x0F -#define FT6206_MSB_SHIFT 0 - - /* Values Pn_XL and Pn_YL related */ -#define FT6206_LSB_MASK 0xFF -#define FT6206_LSB_SHIFT 0 - -#define FT6206_P1_XH_REG 0x03 -#define FT6206_P1_XL_REG 0x04 -#define FT6206_P1_YH_REG 0x05 -#define FT6206_P1_YL_REG 0x06 - - /* Touch Pressure register value (R) */ -#define FT6206_P1_WEIGHT_REG 0x07 - - /* Values Pn_WEIGHT related */ -#define FT6206_TOUCH_WEIGHT_MASK 0xFF -#define FT6206_TOUCH_WEIGHT_SHIFT 0 - - /* Touch area register */ -#define FT6206_P1_MISC_REG 0x08 - - /* Values related to FT6206_Pn_MISC_REG */ -#define FT6206_TOUCH_AREA_MASK (0x04 << 4) -#define FT6206_TOUCH_AREA_SHIFT 0x04 - -#define FT6206_P2_XH_REG 0x09 -#define FT6206_P2_XL_REG 0x0A -#define FT6206_P2_YH_REG 0x0B -#define FT6206_P2_YL_REG 0x0C -#define FT6206_P2_WEIGHT_REG 0x0D -#define FT6206_P2_MISC_REG 0x0E - - /* Threshold for touch detection */ -#define FT6206_TH_GROUP_REG 0x80 - - /* Values FT6206_TH_GROUP_REG : threshold related */ -#define FT6206_THRESHOLD_MASK 0xFF -#define FT6206_THRESHOLD_SHIFT 0 - - /* Filter function coefficients */ -#define FT6206_TH_DIFF_REG 0x85 - - /* Control register */ -#define FT6206_CTRL_REG 0x86 - - /* Values related to FT6206_CTRL_REG */ - - /* Will keep the Active mode when there is no touching */ -#define FT6206_CTRL_KEEP_ACTIVE_MODE 0x00 - - /* Switching from Active mode to Monitor mode automatically when there is no touching */ -#define FT6206_CTRL_KEEP_AUTO_SWITCH_MONITOR_MODE 0x01 - - /* The time period of switching from Active mode to Monitor mode when there is no touching */ -#define FT6206_TIMEENTERMONITOR_REG 0x87 - - /* Report rate in Active mode */ -#define FT6206_PERIODACTIVE_REG 0x88 - - /* Report rate in Monitor mode */ -#define FT6206_PERIODMONITOR_REG 0x89 - - /* The value of the minimum allowed angle while Rotating gesture mode */ -#define FT6206_RADIAN_VALUE_REG 0x91 - - /* Maximum offset while Moving Left and Moving Right gesture */ -#define FT6206_OFFSET_LEFT_RIGHT_REG 0x92 - - /* Maximum offset while Moving Up and Moving Down gesture */ -#define FT6206_OFFSET_UP_DOWN_REG 0x93 - - /* Minimum distance while Moving Left and Moving Right gesture */ -#define FT6206_DISTANCE_LEFT_RIGHT_REG 0x94 - - /* Minimum distance while Moving Up and Moving Down gesture */ -#define FT6206_DISTANCE_UP_DOWN_REG 0x95 - - /* Maximum distance while Zoom In and Zoom Out gesture */ -#define FT6206_DISTANCE_ZOOM_REG 0x96 - - /* High 8-bit of LIB Version info */ -#define FT6206_LIB_VER_H_REG 0xA1 - - /* Low 8-bit of LIB Version info */ -#define FT6206_LIB_VER_L_REG 0xA2 - - /* Chip Selecting */ -#define FT6206_CIPHER_REG 0xA3 - - /* Interrupt mode register (used when in interrupt mode) */ -#define FT6206_GMODE_REG 0xA4 - -#define FT6206_G_MODE_INTERRUPT_MASK 0x03 -#define FT6206_G_MODE_INTERRUPT_SHIFT 0x00 - - /* Possible values of FT6206_GMODE_REG */ -#define FT6206_G_MODE_INTERRUPT_POLLING 0x00 -#define FT6206_G_MODE_INTERRUPT_TRIGGER 0x01 - - /* Current power mode the FT6206 system is in (R) */ -#define FT6206_PWR_MODE_REG 0xA5 - - /* FT6206 firmware version */ -#define FT6206_FIRMID_REG 0xA6 - - /* FT6206 Chip identification register */ -#define FT6206_CHIP_ID_REG 0xA8 - - /* Possible values of FT6206_CHIP_ID_REG */ -#define FT6206_ID_VALUE 0x11 - - /* Release code version */ -#define FT6206_RELEASE_CODE_ID_REG 0xAF - - /* Current operating mode the FT6206 system is in (R) */ -#define FT6206_STATE_REG 0xBC - - /** - * @} - */ - - /* Exported macro ------------------------------------------------------------*/ - - /** @defgroup ft6x06_Exported_Macros - * @{ - */ - - /* Exported functions --------------------------------------------------------*/ - - /** @defgroup ft6x06_Exported_Functions - * @{ - */ - - /** - * @brief ft6x06 Control functions - */ - - -/** - * @brief Initialize the ft6x06 communication bus - * from MCU to FT6206 : ie I2C channel initialization (if required). - * @param DeviceAddr: Device address on communication Bus (I2C slave address of FT6206). - * @retval None - */ -void ft6x06_Init(uint16_t DeviceAddr); - -/** - * @brief Software Reset the ft6x06. - * @param DeviceAddr: Device address on communication Bus (I2C slave address of FT6206). - * @retval None - */ -void ft6x06_Reset(uint16_t DeviceAddr); - -/** - * @brief Read the ft6x06 device ID, pre intitalize I2C in case of need to be - * able to read the FT6206 device ID, and verify this is a FT6206. - * @param DeviceAddr: I2C FT6x06 Slave address. - * @retval The Device ID (two bytes). - */ -uint16_t ft6x06_ReadID(uint16_t DeviceAddr); - -/** - * @brief Configures the touch Screen IC device to start detecting touches - * @param DeviceAddr: Device address on communication Bus (I2C slave address). - * @retval None. - */ -void ft6x06_TS_Start(uint16_t DeviceAddr); - -/** - * @brief Return if there is touches detected or not. - * Try to detect new touches and forget the old ones (reset internal global - * variables). - * @param DeviceAddr: Device address on communication Bus. - * @retval : Number of active touches detected (can be 0, 1 or 2). - */ -uint8_t ft6x06_TS_DetectTouch(uint16_t DeviceAddr); - -/** - * @brief Get the touch screen X and Y positions values - * Manage multi touch thanks to touch Index global - * variable 'ft6x06_handle.currActiveTouchIdx'. - * @param DeviceAddr: Device address on communication Bus. - * @param X: Pointer to X position value - * @param Y: Pointer to Y position value - * @retval None. - */ -void ft6x06_TS_GetXY(uint16_t DeviceAddr, uint16_t *X, uint16_t *Y); - -/** - * @brief Configure the FT6206 device to generate IT on given INT pin - * connected to MCU as EXTI. - * @param DeviceAddr: Device address on communication Bus (Slave I2C address of FT6206). - * @retval None - */ -void ft6x06_TS_EnableIT(uint16_t DeviceAddr); - -/** - * @brief Configure the FT6206 device to stop generating IT on the given INT pin - * connected to MCU as EXTI. - * @param DeviceAddr: Device address on communication Bus (Slave I2C address of FT6206). - * @retval None - */ -void ft6x06_TS_DisableIT(uint16_t DeviceAddr); - -/** - * @brief Get IT status from FT6206 interrupt status registers - * Should be called Following an EXTI coming to the MCU to know the detailed - * reason of the interrupt. - * @param DeviceAddr: Device address on communication Bus (I2C slave address of FT6206). - * @retval TS interrupts status - */ -uint8_t ft6x06_TS_ITStatus (uint16_t DeviceAddr); - -/** - * @brief Clear IT status in FT6206 interrupt status clear registers - * Should be called Following an EXTI coming to the MCU. - * @param DeviceAddr: Device address on communication Bus (I2C slave address of FT6206). - * @retval TS interrupts status - */ -void ft6x06_TS_ClearIT (uint16_t DeviceAddr); - -/**** NEW FEATURES enabled when Multi-touch support is enabled ****/ - -#if (TS_MULTI_TOUCH_SUPPORTED == 1) - -/** - * @brief Get the last touch gesture identification (zoom, move up/down...). - * @param DeviceAddr: Device address on communication Bus (I2C slave address of FT6x06). - * @param pGestureId : Pointer to get last touch gesture Identification. - * @retval None. - */ -void ft6x06_TS_GetGestureID(uint16_t DeviceAddr, uint32_t * pGestureId); - -/** - * @brief Get the touch detailed informations on touch number 'touchIdx' (0..1) - * This touch detailed information contains : - * - weight that was applied to this touch - * - sub-area of the touch in the touch panel - * - event of linked to the touch (press down, lift up, ...) - * @param DeviceAddr: Device address on communication Bus (I2C slave address of FT6x06). - * @param touchIdx : Passed index of the touch (0..1) on which we want to get the - * detailed information. - * @param pWeight : Pointer to to get the weight information of 'touchIdx'. - * @param pArea : Pointer to to get the sub-area information of 'touchIdx'. - * @param pEvent : Pointer to to get the event information of 'touchIdx'. - - * @retval None. - */ -void ft6x06_TS_GetTouchInfo(uint16_t DeviceAddr, - uint32_t touchIdx, - uint32_t * pWeight, - uint32_t * pArea, - uint32_t * pEvent); - -#endif /* TS_MULTI_TOUCH_SUPPORTED == 1 */ - -/* Imported TS IO functions --------------------------------------------------------*/ - -/** @defgroup ft6x06_Imported_Functions - * @{ - */ - -/* TouchScreen (TS) external IO functions */ -extern void TS_IO_Init(void); -extern void TS_IO_Write(uint8_t Addr, uint8_t Reg, uint8_t Value); -extern uint8_t TS_IO_Read(uint8_t Addr, uint8_t Reg); -extern uint16_t TS_IO_ReadMultiple(uint8_t Addr, uint8_t Reg, uint8_t *Buffer, uint16_t Length); -extern void TS_IO_Delay(uint32_t Delay); - - /** - * @} - */ - - /* Imported global variables --------------------------------------------------------*/ - - /** @defgroup ft6x06_Imported_Globals - * @{ - */ - - -/* Touch screen driver structure */ -extern TS_DrvTypeDef ft6x06_ts_drv; - - /** - * @} - */ - -#ifdef __cplusplus -} -#endif -#endif /* __FT6X06_H */ - - -/** - * @} - */ - -/** - * @} - */ - -/** - * @} - */ - -/** - * @} - */ -/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
--- a/Components/n25q128a/n25q128a.h Mon May 30 11:09:05 2016 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,219 +0,0 @@ -/** - ****************************************************************************** - * @file n25q128a.h - * @author MCD Application Team - * @version V1.0.0 - * @date 29-May-2015 - * @brief This file contains all the description of the N25Q128A QSPI memory. - ****************************************************************************** - * @attention - * - * <h2><center>© COPYRIGHT(c) 2015 STMicroelectronics</center></h2> - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. Neither the name of STMicroelectronics nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - ****************************************************************************** - */ - -/* Define to prevent recursive inclusion -------------------------------------*/ -#ifndef __N25Q128A_H -#define __N25Q128A_H - -#ifdef __cplusplus - extern "C" { -#endif - -/* Includes ------------------------------------------------------------------*/ - -/** @addtogroup BSP - * @{ - */ - -/** @addtogroup Components - * @{ - */ - -/** @addtogroup n25q128a - * @{ - */ - -/** @defgroup N25Q128A_Exported_Types - * @{ - */ - -/** - * @} - */ - -/** @defgroup N25Q128A_Exported_Constants - * @{ - */ - -/** - * @brief N25Q128A Configuration - */ -#define N25Q128A_FLASH_SIZE 0x1000000 /* 128 MBits => 16MBytes */ -#define N25Q128A_SECTOR_SIZE 0x10000 /* 256 sectors of 64KBytes */ -#define N25Q128A_SUBSECTOR_SIZE 0x1000 /* 4096 subsectors of 4kBytes */ -#define N25Q128A_PAGE_SIZE 0x100 /* 65536 pages of 256 bytes */ - -#define N25Q128A_DUMMY_CYCLES_READ 8 -#define N25Q128A_DUMMY_CYCLES_READ_QUAD 10 - -#define N25Q128A_BULK_ERASE_MAX_TIME 250000 -#define N25Q128A_SECTOR_ERASE_MAX_TIME 3000 -#define N25Q128A_SUBSECTOR_ERASE_MAX_TIME 800 - -/** - * @brief N25Q128A Commands - */ -/* Reset Operations */ -#define RESET_ENABLE_CMD 0x66 -#define RESET_MEMORY_CMD 0x99 - -/* Identification Operations */ -#define READ_ID_CMD 0x9E -#define READ_ID_CMD2 0x9F -#define MULTIPLE_IO_READ_ID_CMD 0xAF -#define READ_SERIAL_FLASH_DISCO_PARAM_CMD 0x5A - -/* Read Operations */ -#define READ_CMD 0x03 -#define FAST_READ_CMD 0x0B -#define DUAL_OUT_FAST_READ_CMD 0x3B -#define DUAL_INOUT_FAST_READ_CMD 0xBB -#define QUAD_OUT_FAST_READ_CMD 0x6B -#define QUAD_INOUT_FAST_READ_CMD 0xEB - -/* Write Operations */ -#define WRITE_ENABLE_CMD 0x06 -#define WRITE_DISABLE_CMD 0x04 - -/* Register Operations */ -#define READ_STATUS_REG_CMD 0x05 -#define WRITE_STATUS_REG_CMD 0x01 - -#define READ_LOCK_REG_CMD 0xE8 -#define WRITE_LOCK_REG_CMD 0xE5 - -#define READ_FLAG_STATUS_REG_CMD 0x70 -#define CLEAR_FLAG_STATUS_REG_CMD 0x50 - -#define READ_NONVOL_CFG_REG_CMD 0xB5 -#define WRITE_NONVOL_CFG_REG_CMD 0xB1 - -#define READ_VOL_CFG_REG_CMD 0x85 -#define WRITE_VOL_CFG_REG_CMD 0x81 - -#define READ_ENHANCED_VOL_CFG_REG_CMD 0x65 -#define WRITE_ENHANCED_VOL_CFG_REG_CMD 0x61 - -/* Program Operations */ -#define PAGE_PROG_CMD 0x02 -#define DUAL_IN_FAST_PROG_CMD 0xA2 -#define EXT_DUAL_IN_FAST_PROG_CMD 0xD2 -#define QUAD_IN_FAST_PROG_CMD 0x32 -#define EXT_QUAD_IN_FAST_PROG_CMD 0x12 - -/* Erase Operations */ -#define SUBSECTOR_ERASE_CMD 0x20 -#define SECTOR_ERASE_CMD 0xD8 -#define BULK_ERASE_CMD 0xC7 - -#define PROG_ERASE_RESUME_CMD 0x7A -#define PROG_ERASE_SUSPEND_CMD 0x75 - -/* One-Time Programmable Operations */ -#define READ_OTP_ARRAY_CMD 0x4B -#define PROG_OTP_ARRAY_CMD 0x42 - -/** - * @brief N25Q128A Registers - */ -/* Status Register */ -#define N25Q128A_SR_WIP ((uint8_t)0x01) /*!< Write in progress */ -#define N25Q128A_SR_WREN ((uint8_t)0x02) /*!< Write enable latch */ -#define N25Q128A_SR_BLOCKPR ((uint8_t)0x5C) /*!< Block protected against program and erase operations */ -#define N25Q128A_SR_PRBOTTOM ((uint8_t)0x20) /*!< Protected memory area defined by BLOCKPR starts from top or bottom */ -#define N25Q128A_SR_SRWREN ((uint8_t)0x80) /*!< Status register write enable/disable */ - -/* Nonvolatile Configuration Register */ -#define N25Q128A_NVCR_LOCK ((uint16_t)0x0001) /*!< Lock nonvolatile configuration register */ -#define N25Q128A_NVCR_DUAL ((uint16_t)0x0004) /*!< Dual I/O protocol */ -#define N25Q128A_NVCR_QUAB ((uint16_t)0x0008) /*!< Quad I/O protocol */ -#define N25Q128A_NVCR_RH ((uint16_t)0x0010) /*!< Reset/hold */ -#define N25Q128A_NVCR_ODS ((uint16_t)0x01C0) /*!< Output driver strength */ -#define N25Q128A_NVCR_XIP ((uint16_t)0x0E00) /*!< XIP mode at power-on reset */ -#define N25Q128A_NVCR_NB_DUMMY ((uint16_t)0xF000) /*!< Number of dummy clock cycles */ - -/* Volatile Configuration Register */ -#define N25Q128A_VCR_WRAP ((uint8_t)0x03) /*!< Wrap */ -#define N25Q128A_VCR_XIP ((uint8_t)0x08) /*!< XIP */ -#define N25Q128A_VCR_NB_DUMMY ((uint8_t)0xF0) /*!< Number of dummy clock cycles */ - -/* Enhanced Volatile Configuration Register */ -#define N25Q128A_EVCR_ODS ((uint8_t)0x07) /*!< Output driver strength */ -#define N25Q128A_EVCR_VPPA ((uint8_t)0x08) /*!< Vpp accelerator */ -#define N25Q128A_EVCR_RH ((uint8_t)0x10) /*!< Reset/hold */ -#define N25Q128A_EVCR_DUAL ((uint8_t)0x40) /*!< Dual I/O protocol */ -#define N25Q128A_EVCR_QUAD ((uint8_t)0x80) /*!< Quad I/O protocol */ - -/* Flag Status Register */ -#define N25Q128A_FSR_PRERR ((uint8_t)0x02) /*!< Protection error */ -#define N25Q128A_FSR_PGSUS ((uint8_t)0x04) /*!< Program operation suspended */ -#define N25Q128A_FSR_VPPERR ((uint8_t)0x08) /*!< Invalid voltage during program or erase */ -#define N25Q128A_FSR_PGERR ((uint8_t)0x10) /*!< Program error */ -#define N25Q128A_FSR_ERERR ((uint8_t)0x20) /*!< Erase error */ -#define N25Q128A_FSR_ERSUS ((uint8_t)0x40) /*!< Erase operation suspended */ -#define N25Q128A_FSR_READY ((uint8_t)0x80) /*!< Ready or command in progress */ - -/** - * @} - */ - -/** @defgroup N25Q128A_Exported_Functions - * @{ - */ -/** - * @} - */ - -/** - * @} - */ - -/** - * @} - */ - -/** - * @} - */ - -#ifdef __cplusplus -} -#endif - -#endif /* __N25Q128A_H */ - -/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
--- a/Components/otm8009a/otm8009a.c Mon May 30 11:09:05 2016 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,449 +0,0 @@ -/** - ****************************************************************************** - * @file otm8009a.c - * @author MCD Application Team - * @version V1.0.0 - * @date 03-August-2015 - * @brief This file provides the LCD Driver for KoD KM-040TMP-02-0621 (WVGA) - * DSI LCD Display OTM8009A. - ****************************************************************************** - * @attention - * - * <h2><center>© COPYRIGHT(c) 2015 STMicroelectronics</center></h2> - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. Neither the name of STMicroelectronics nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - ****************************************************************************** - */ - -/* Includes ------------------------------------------------------------------*/ -#include "otm8009a.h" - -/** @addtogroup BSP - * @{ - */ - -/** @addtogroup Components - * @{ - */ - -/** @defgroup OTM8009A OTM8009A - * @brief This file provides a set of functions needed to drive the - * otm8009a IC display driver. - * @{ - */ - -/* Private types -------------------------------------------------------------*/ -/* Private variables ---------------------------------------------------------*/ -/* Private constants ---------------------------------------------------------*/ -/** @defgroup OTM8009A_Private_Constants OTM8009A Private Constants - * @{ - */ - -/* - * @brief Constant tables of register settings used to transmit DSI - * command packets as power up initialization sequence of the KoD LCD (OTM8009A LCD Driver) - */ -const uint8_t lcdRegData1[] = {0x80,0x09,0x01,0xFF}; -const uint8_t lcdRegData2[] = {0x80,0x09,0xFF}; -const uint8_t lcdRegData3[] = {0x00,0x09,0x0F,0x0E,0x07,0x10,0x0B,0x0A,0x04,0x07,0x0B,0x08,0x0F,0x10,0x0A,0x01,0xE1}; -const uint8_t lcdRegData4[] = {0x00,0x09,0x0F,0x0E,0x07,0x10,0x0B,0x0A,0x04,0x07,0x0B,0x08,0x0F,0x10,0x0A,0x01,0xE2}; -const uint8_t lcdRegData5[] = {0x79,0x79,0xD8}; -const uint8_t lcdRegData6[] = {0x00,0x01,0xB3}; -const uint8_t lcdRegData7[] = {0x85,0x01,0x00,0x84,0x01,0x00,0xCE}; -const uint8_t lcdRegData8[] = {0x18,0x04,0x03,0x39,0x00,0x00,0x00,0x18,0x03,0x03,0x3A,0x00,0x00,0x00,0xCE}; -const uint8_t lcdRegData9[] = {0x18,0x02,0x03,0x3B,0x00,0x00,0x00,0x18,0x01,0x03,0x3C,0x00,0x00,0x00,0xCE}; -const uint8_t lcdRegData10[] = {0x01,0x01,0x20,0x20,0x00,0x00,0x01,0x02,0x00,0x00,0xCF}; -const uint8_t lcdRegData11[] = {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xCB}; -const uint8_t lcdRegData12[] = {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xCB}; -const uint8_t lcdRegData13[] = {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xCB}; -const uint8_t lcdRegData14[] = {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xCB}; -const uint8_t lcdRegData15[] = {0x00,0x04,0x04,0x04,0x04,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xCB}; -const uint8_t lcdRegData16[] = {0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x04,0x04,0x04,0x04,0x00,0x00,0x00,0x00,0xCB}; -const uint8_t lcdRegData17[] = {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xCB}; -const uint8_t lcdRegData18[] = {0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xCB}; -const uint8_t lcdRegData19[] = {0x00,0x26,0x09,0x0B,0x01,0x25,0x00,0x00,0x00,0x00,0xCC}; -const uint8_t lcdRegData20[] = {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x26,0x0A,0x0C,0x02,0xCC}; -const uint8_t lcdRegData21[] = {0x25,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xCC}; -const uint8_t lcdRegData22[] = {0x00,0x25,0x0C,0x0A,0x02,0x26,0x00,0x00,0x00,0x00,0xCC}; -const uint8_t lcdRegData23[] = {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x25,0x0B,0x09,0x01,0xCC}; -const uint8_t lcdRegData24[] = {0x26,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xCC}; -const uint8_t lcdRegData25[] = {0xFF,0xFF,0xFF,0xFF}; -/* - * CASET value (Column Address Set) : X direction LCD GRAM boundaries - * depending on LCD orientation mode and PASET value (Page Address Set) : Y direction - * LCD GRAM boundaries depending on LCD orientation mode - * XS[15:0] = 0x000 = 0, XE[15:0] = 0x31F = 799 for landscape mode : apply to CASET - * YS[15:0] = 0x000 = 0, YE[15:0] = 0x31F = 799 for portrait mode : : apply to PASET - */ -const uint8_t lcdRegData27[] = {0x00, 0x00, 0x03, 0x1F, OTM8009A_CMD_CASET}; -/* - * XS[15:0] = 0x000 = 0, XE[15:0] = 0x1DF = 479 for portrait mode : apply to CASET - * YS[15:0] = 0x000 = 0, YE[15:0] = 0x1DF = 479 for landscape mode : apply to PASET - */ -const uint8_t lcdRegData28[] = {0x00, 0x00, 0x01, 0xDF, OTM8009A_CMD_PASET}; - - -const uint8_t ShortRegData1[] = {OTM8009A_CMD_NOP, 0x00}; -const uint8_t ShortRegData2[] = {OTM8009A_CMD_NOP, 0x80}; -const uint8_t ShortRegData3[] = {0xC4, 0x30}; -const uint8_t ShortRegData4[] = {OTM8009A_CMD_NOP, 0x8A}; -const uint8_t ShortRegData5[] = {0xC4, 0x40}; -const uint8_t ShortRegData6[] = {OTM8009A_CMD_NOP, 0xB1}; -const uint8_t ShortRegData7[] = {0xC5, 0xA9}; -const uint8_t ShortRegData8[] = {OTM8009A_CMD_NOP, 0x91}; -const uint8_t ShortRegData9[] = {0xC5, 0x34}; -const uint8_t ShortRegData10[] = {OTM8009A_CMD_NOP, 0xB4}; -const uint8_t ShortRegData11[] = {0xC0, 0x50}; -const uint8_t ShortRegData12[] = {0xD9, 0x4E}; -const uint8_t ShortRegData13[] = {OTM8009A_CMD_NOP, 0x81}; -const uint8_t ShortRegData14[] = {0xC1, 0x66}; -const uint8_t ShortRegData15[] = {OTM8009A_CMD_NOP, 0xA1}; -const uint8_t ShortRegData16[] = {0xC1, 0x08}; -const uint8_t ShortRegData17[] = {OTM8009A_CMD_NOP, 0x92}; -const uint8_t ShortRegData18[] = {0xC5, 0x01}; -const uint8_t ShortRegData19[] = {OTM8009A_CMD_NOP, 0x95}; -const uint8_t ShortRegData20[] = {OTM8009A_CMD_NOP, 0x94}; -const uint8_t ShortRegData21[] = {0xC5, 0x33}; -const uint8_t ShortRegData22[] = {OTM8009A_CMD_NOP, 0xA3}; -const uint8_t ShortRegData23[] = {0xC0, 0x1B}; -const uint8_t ShortRegData24[] = {OTM8009A_CMD_NOP, 0x82}; -const uint8_t ShortRegData25[] = {0xC5, 0x83}; -const uint8_t ShortRegData26[] = {0xC4, 0x83}; -const uint8_t ShortRegData27[] = {0xC1, 0x0E}; -const uint8_t ShortRegData28[] = {OTM8009A_CMD_NOP, 0xA6}; -const uint8_t ShortRegData29[] = {OTM8009A_CMD_NOP, 0xA0}; -const uint8_t ShortRegData30[] = {OTM8009A_CMD_NOP, 0xB0}; -const uint8_t ShortRegData31[] = {OTM8009A_CMD_NOP, 0xC0}; -const uint8_t ShortRegData32[] = {OTM8009A_CMD_NOP, 0xD0}; -const uint8_t ShortRegData33[] = {OTM8009A_CMD_NOP, 0x90}; -const uint8_t ShortRegData34[] = {OTM8009A_CMD_NOP, 0xE0}; -const uint8_t ShortRegData35[] = {OTM8009A_CMD_NOP, 0xF0}; -const uint8_t ShortRegData36[] = {OTM8009A_CMD_SLPOUT, 0x00}; -const uint8_t ShortRegData37[] = {OTM8009A_CMD_COLMOD, OTM8009A_COLMOD_RGB565}; -const uint8_t ShortRegData38[] = {OTM8009A_CMD_COLMOD, OTM8009A_COLMOD_RGB888}; -const uint8_t ShortRegData39[] = {OTM8009A_CMD_MADCTR, OTM8009A_MADCTR_MODE_LANDSCAPE}; -const uint8_t ShortRegData40[] = {OTM8009A_CMD_WRDISBV, 0x7F}; -const uint8_t ShortRegData41[] = {OTM8009A_CMD_WRCTRLD, 0x2C}; -const uint8_t ShortRegData42[] = {OTM8009A_CMD_WRCABC, 0x02}; -const uint8_t ShortRegData43[] = {OTM8009A_CMD_WRCABCMB, 0xFF}; -const uint8_t ShortRegData44[] = {OTM8009A_CMD_DISPON, 0x00}; -const uint8_t ShortRegData45[] = {OTM8009A_CMD_RAMWR, 0x00}; -const uint8_t ShortRegData46[] = {0xCF, 0x00}; -const uint8_t ShortRegData47[] = {0xC5, 0x66}; -const uint8_t ShortRegData48[] = {OTM8009A_CMD_NOP, 0xB6}; -const uint8_t ShortRegData49[] = {0xF5, 0x06}; - -/** - * @} - */ - -/* Private macros ------------------------------------------------------------*/ -/* Private functions ---------------------------------------------------------*/ -/** @defgroup OTM8009A_Exported_Variables - * @{ - */ - -/** - * @} - */ - -/* Exported functions ---------------------------------------------------------*/ -/** @defgroup OTM8009A_Exported_Functions OTM8009A Exported Functions - * @{ - */ - -/** - * @brief DSI IO write short/long command. - * @note : Can be surcharged by application code implementation of the function. - */ -__weak void DSI_IO_WriteCmd(uint32_t NbrParams, uint8_t *pParams) -{ - /* NOTE : This function Should not be modified, when it is needed, - the DSI_IO_WriteCmd could be implemented in the user file - */ -} - -/** - * @brief Initializes the LCD KoD display part by communication in DSI mode in Video Mode - * with IC Display Driver OTM8009A (see IC Driver specification for more information). - * @param hdsi_eval : pointer on DSI configuration structure - * @param hdsivideo_handle : pointer on DSI video mode configuration structure - * @retval Status - */ -uint8_t OTM8009A_Init(uint32_t ColorCoding, uint32_t orientation) -{ - /* Enable CMD2 to access vendor specific commands */ - /* Enter in command 2 mode and set EXTC to enable address shift function (0x00) */ - DSI_IO_WriteCmd(0, (uint8_t *)ShortRegData1); - DSI_IO_WriteCmd( 3, (uint8_t *)lcdRegData1); - - /* Enter ORISE Command 2 */ - DSI_IO_WriteCmd(0, (uint8_t *)ShortRegData2); /* Shift address to 0x80 */ - DSI_IO_WriteCmd( 2, (uint8_t *)lcdRegData2); - - ///////////////////////////////////////////////////////////////////// - /* SD_PCH_CTRL - 0xC480h - 129th parameter - Default 0x00 */ - /* Set SD_PT */ - /* -> Source output level during porch and non-display area to GND */ - DSI_IO_WriteCmd(0, (uint8_t *)ShortRegData2); - DSI_IO_WriteCmd(0, (uint8_t *)ShortRegData3); - OTM8009A_IO_Delay(10); - /* Not documented */ - DSI_IO_WriteCmd(0, (uint8_t *)ShortRegData4); - DSI_IO_WriteCmd(0, (uint8_t *)ShortRegData5); - OTM8009A_IO_Delay(10); - ///////////////////////////////////////////////////////////////////// - - /* PWR_CTRL4 - 0xC4B0h - 178th parameter - Default 0xA8 */ - /* Set gvdd_en_test */ - /* -> enable GVDD test mode !!! */ - DSI_IO_WriteCmd(0, (uint8_t *)ShortRegData6); - DSI_IO_WriteCmd(0, (uint8_t *)ShortRegData7); - - /* PWR_CTRL2 - 0xC590h - 146th parameter - Default 0x79 */ - /* Set pump 4 vgh voltage */ - /* -> from 15.0v down to 13.0v */ - /* Set pump 5 vgh voltage */ - /* -> from -12.0v downto -9.0v */ - DSI_IO_WriteCmd(0, (uint8_t *)ShortRegData8); - DSI_IO_WriteCmd(0, (uint8_t *)ShortRegData9); - - /* P_DRV_M - 0xC0B4h - 181th parameter - Default 0x00 */ - /* -> Column inversion */ - DSI_IO_WriteCmd(0, (uint8_t *)ShortRegData10); - DSI_IO_WriteCmd(0, (uint8_t *)ShortRegData11); - - /* VCOMDC - 0xD900h - 1st parameter - Default 0x39h */ - /* VCOM Voltage settings */ - /* -> from -1.0000v downto -1.2625v */ - DSI_IO_WriteCmd(0, (uint8_t *)ShortRegData1); - DSI_IO_WriteCmd(0, (uint8_t *)ShortRegData12); - - /* Oscillator adjustment for Idle/Normal mode (LPDT only) set to 65Hz (default is 60Hz) */ - DSI_IO_WriteCmd(0, (uint8_t *)ShortRegData13); - DSI_IO_WriteCmd(0, (uint8_t *)ShortRegData14); - - /* Video mode internal */ - DSI_IO_WriteCmd(0, (uint8_t *)ShortRegData15); - DSI_IO_WriteCmd(0, (uint8_t *)ShortRegData16); - - /* PWR_CTRL2 - 0xC590h - 147h parameter - Default 0x00 */ - /* Set pump 4&5 x6 */ - /* -> ONLY VALID when PUMP4_EN_ASDM_HV = "0" */ - DSI_IO_WriteCmd(0, (uint8_t *)ShortRegData17); - DSI_IO_WriteCmd(0, (uint8_t *)ShortRegData18); - - /* PWR_CTRL2 - 0xC590h - 150th parameter - Default 0x33h */ - /* Change pump4 clock ratio */ - /* -> from 1 line to 1/2 line */ - DSI_IO_WriteCmd(0, (uint8_t *)ShortRegData19); - DSI_IO_WriteCmd(0, (uint8_t *)ShortRegData9); - - /* GVDD/NGVDD settings */ - DSI_IO_WriteCmd(0, (uint8_t *)ShortRegData1); - DSI_IO_WriteCmd( 2, (uint8_t *)lcdRegData5); - - /* PWR_CTRL2 - 0xC590h - 149th parameter - Default 0x33h */ - /* Rewrite the default value ! */ - DSI_IO_WriteCmd(0, (uint8_t *)ShortRegData20); - DSI_IO_WriteCmd(0, (uint8_t *)ShortRegData21); - - /* Panel display timing Setting 3 */ - DSI_IO_WriteCmd(0, (uint8_t *)ShortRegData22); - DSI_IO_WriteCmd(0, (uint8_t *)ShortRegData23); - - /* Power control 1 */ - DSI_IO_WriteCmd(0, (uint8_t *)ShortRegData24); - DSI_IO_WriteCmd(0, (uint8_t *)ShortRegData25); - - /* Source driver precharge */ - DSI_IO_WriteCmd(0, (uint8_t *)ShortRegData13); - DSI_IO_WriteCmd(0, (uint8_t *)ShortRegData26); - - DSI_IO_WriteCmd(0, (uint8_t *)ShortRegData15); - DSI_IO_WriteCmd(0, (uint8_t *)ShortRegData27); - - DSI_IO_WriteCmd(0, (uint8_t *)ShortRegData28); - DSI_IO_WriteCmd( 2, (uint8_t *)lcdRegData6); - - /* GOAVST */ - DSI_IO_WriteCmd(0, (uint8_t *)ShortRegData2); - DSI_IO_WriteCmd( 6, (uint8_t *)lcdRegData7); - - DSI_IO_WriteCmd(0, (uint8_t *)ShortRegData29); - DSI_IO_WriteCmd( 14, (uint8_t *)lcdRegData8); - - DSI_IO_WriteCmd(0, (uint8_t *)ShortRegData30); - DSI_IO_WriteCmd( 14, (uint8_t *)lcdRegData9); - - DSI_IO_WriteCmd(0, (uint8_t *)ShortRegData31); - DSI_IO_WriteCmd( 10, (uint8_t *)lcdRegData10); - - DSI_IO_WriteCmd(0, (uint8_t *)ShortRegData32); - DSI_IO_WriteCmd(0, (uint8_t *)ShortRegData46); - - DSI_IO_WriteCmd(0, (uint8_t *)ShortRegData2); - DSI_IO_WriteCmd( 10, (uint8_t *)lcdRegData11); - - DSI_IO_WriteCmd(0, (uint8_t *)ShortRegData33); - DSI_IO_WriteCmd( 15, (uint8_t *)lcdRegData12); - - DSI_IO_WriteCmd(0, (uint8_t *)ShortRegData29); - DSI_IO_WriteCmd( 15, (uint8_t *)lcdRegData13); - - DSI_IO_WriteCmd(0, (uint8_t *)ShortRegData30); - DSI_IO_WriteCmd( 10, (uint8_t *)lcdRegData14); - - DSI_IO_WriteCmd(0, (uint8_t *)ShortRegData31); - DSI_IO_WriteCmd( 15, (uint8_t *)lcdRegData15); - - DSI_IO_WriteCmd(0, (uint8_t *)ShortRegData32); - DSI_IO_WriteCmd( 15, (uint8_t *)lcdRegData16); - - DSI_IO_WriteCmd(0, (uint8_t *)ShortRegData34); - DSI_IO_WriteCmd( 10, (uint8_t *)lcdRegData17); - - DSI_IO_WriteCmd(0, (uint8_t *)ShortRegData35); - DSI_IO_WriteCmd( 10, (uint8_t *)lcdRegData18); - - DSI_IO_WriteCmd(0, (uint8_t *)ShortRegData2); - DSI_IO_WriteCmd( 10, (uint8_t *)lcdRegData19); - - DSI_IO_WriteCmd(0, (uint8_t *)ShortRegData33); - DSI_IO_WriteCmd( 15, (uint8_t *)lcdRegData20); - - DSI_IO_WriteCmd(0, (uint8_t *)ShortRegData29); - DSI_IO_WriteCmd( 15, (uint8_t *)lcdRegData21); - - DSI_IO_WriteCmd(0, (uint8_t *)ShortRegData30); - DSI_IO_WriteCmd( 10, (uint8_t *)lcdRegData22); - - DSI_IO_WriteCmd(0, (uint8_t *)ShortRegData31); - DSI_IO_WriteCmd( 15, (uint8_t *)lcdRegData23); - - DSI_IO_WriteCmd(0, (uint8_t *)ShortRegData32); - DSI_IO_WriteCmd( 15, (uint8_t *)lcdRegData24); - - ///////////////////////////////////////////////////////////////////////////// - /* PWR_CTRL1 - 0xc580h - 130th parameter - default 0x00 */ - /* Pump 1 min and max DM */ - DSI_IO_WriteCmd(0, (uint8_t *)ShortRegData13); - DSI_IO_WriteCmd(0, (uint8_t *)ShortRegData47); - DSI_IO_WriteCmd(0, (uint8_t *)ShortRegData48); - DSI_IO_WriteCmd(0, (uint8_t *)ShortRegData49); - ///////////////////////////////////////////////////////////////////////////// - - /* Exit CMD2 mode */ - DSI_IO_WriteCmd(0, (uint8_t *)ShortRegData1); - DSI_IO_WriteCmd( 3, (uint8_t *)lcdRegData25); - - /*************************************************************************** */ - /* Standard DCS Initialization TO KEEP CAN BE DONE IN HSDT */ - /*************************************************************************** */ - - /* NOP - goes back to DCS std command ? */ - DSI_IO_WriteCmd(0, (uint8_t *)ShortRegData1); - - /* Gamma correction 2.2+ table (HSDT possible) */ - DSI_IO_WriteCmd(0, (uint8_t *)ShortRegData1); - DSI_IO_WriteCmd( 16, (uint8_t *)lcdRegData3); - - /* Gamma correction 2.2- table (HSDT possible) */ - DSI_IO_WriteCmd(0, (uint8_t *)ShortRegData1); - DSI_IO_WriteCmd( 16, (uint8_t *)lcdRegData4); - - /* Send Sleep Out command to display : no parameter */ - DSI_IO_WriteCmd(0, (uint8_t *)ShortRegData36); - - /* Wait for sleep out exit */ - OTM8009A_IO_Delay(120); - - switch(ColorCoding) - { - case OTM8009A_FORMAT_RBG565 : - /* Set Pixel color format to RGB565 */ - DSI_IO_WriteCmd(0, (uint8_t *)ShortRegData37); - break; - case OTM8009A_FORMAT_RGB888 : - /* Set Pixel color format to RGB888 */ - DSI_IO_WriteCmd(0, (uint8_t *)ShortRegData38); - break; - default : - break; - } - - /* Send command to configure display in landscape orientation mode. By default - the orientation mode is portrait */ - if(orientation == OTM8009A_ORIENTATION_LANDSCAPE) - { - DSI_IO_WriteCmd(0, (uint8_t *)ShortRegData39); - DSI_IO_WriteCmd( 4, (uint8_t *)lcdRegData27); - DSI_IO_WriteCmd( 4, (uint8_t *)lcdRegData28); - } - - /** CABC : Content Adaptive Backlight Control section start >> */ - /* Note : defaut is 0 (lowest Brightness), 0xFF is highest Brightness, try 0x7F : intermediate value */ - DSI_IO_WriteCmd(0, (uint8_t *)ShortRegData40); - - /* defaut is 0, try 0x2C - Brightness Control Block, Display Dimming & BackLight on */ - DSI_IO_WriteCmd(0, (uint8_t *)ShortRegData41); - - /* defaut is 0, try 0x02 - image Content based Adaptive Brightness [Still Picture] */ - DSI_IO_WriteCmd(0, (uint8_t *)ShortRegData42); - - /* defaut is 0 (lowest Brightness), 0xFF is highest Brightness */ - DSI_IO_WriteCmd(0, (uint8_t *)ShortRegData43); - - /** CABC : Content Adaptive Backlight Control section end << */ - - /* Send Command Display On */ - DSI_IO_WriteCmd(0, (uint8_t *)ShortRegData44); - - /* NOP command */ - DSI_IO_WriteCmd(0, (uint8_t *)ShortRegData1); - - /* Send Command GRAM memory write (no parameters) : this initiates frame write via other DSI commands sent by */ - /* DSI host from LTDC incoming pixels in video mode */ - DSI_IO_WriteCmd(0, (uint8_t *)ShortRegData45); - - return 0; -} - -/** - * @} - */ - -/** - * @} - */ - -/** - * @} - */ - -/** - * @} - */ - -/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
--- a/Components/otm8009a/otm8009a.h Mon May 30 11:09:05 2016 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,224 +0,0 @@ -/** - ****************************************************************************** - * @file otm8009a.h - * @author MCD Application Team - * @version V1.0.0 - * @date 03-August-2015 - * @brief This file contains all the constants parameters for the OTM8009A - * which is the LCD Driver for KoD KM-040TMP-02-0621 (WVGA) - * DSI LCD Display. - ****************************************************************************** - * @attention - * - * <h2><center>© COPYRIGHT(c) 2015 STMicroelectronics</center></h2> - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. Neither the name of STMicroelectronics nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - ****************************************************************************** - */ - -/* Define to prevent recursive inclusion -------------------------------------*/ -#ifndef __OTM8009A_H -#define __OTM8009A_H - -#ifdef __cplusplus - extern "C" { -#endif - -/* Includes ------------------------------------------------------------------*/ -#include <stdint.h> -/** @addtogroup BSP - * @{ - */ - -/** @addtogroup Components - * @{ - */ - -/** @addtogroup otm8009a - * @{ - */ - -/** @addtogroup OTM8009A_Exported_Variables - * @{ - */ - -#if defined ( __GNUC__ ) -#ifndef __weak -#define __weak __attribute__((weak)) -#endif /* __weak */ -#endif /* __GNUC__ */ - -/** - * @brief LCD_OrientationTypeDef - * Possible values of Display Orientation - */ -#define OTM8009A_ORIENTATION_PORTRAIT ((uint32_t)0x00) /* Portrait orientation choice of LCD screen */ -#define OTM8009A_ORIENTATION_LANDSCAPE ((uint32_t)0x01) /* Landscape orientation choice of LCD screen */ - -/** - * @brief Possible values of - * pixel data format (ie color coding) transmitted on DSI Data lane in DSI packets - */ -#define OTM8009A_FORMAT_RGB888 ((uint32_t)0x00) /* Pixel format chosen is RGB888 : 24 bpp */ -#define OTM8009A_FORMAT_RBG565 ((uint32_t)0x02) /* Pixel format chosen is RGB565 : 16 bpp */ - -/** - * @brief otm8009a_480x800 Size - */ - -/* Width and Height in Portrait mode */ -#define OTM8009A_480X800_WIDTH ((uint16_t)480) /* LCD PIXEL WIDTH */ -#define OTM8009A_480X800_HEIGHT ((uint16_t)800) /* LCD PIXEL HEIGHT */ - -/* Width and Height in Landscape mode */ -#define OTM8009A_800X480_WIDTH ((uint16_t)800) /* LCD PIXEL WIDTH */ -#define OTM8009A_800X480_HEIGHT ((uint16_t)480) /* LCD PIXEL HEIGHT */ - -/** - * @brief OTM8009A_480X800 Timing parameters for Portrait orientation mode - */ -#define OTM8009A_480X800_HSYNC ((uint16_t)120) /* Horizontal synchronization */ -#define OTM8009A_480X800_HBP ((uint16_t)120) /* Horizontal back porch */ -#define OTM8009A_480X800_HFP ((uint16_t)120) /* Horizontal front porch */ -#define OTM8009A_480X800_VSYNC ((uint16_t)12) /* Vertical synchronization */ -#define OTM8009A_480X800_VBP ((uint16_t)12) /* Vertical back porch */ -#define OTM8009A_480X800_VFP ((uint16_t)12) /* Vertical front porch */ - -/** - * @brief OTM8009A_800X480 Timing parameters for Landscape orientation mode - * Same values as for Portrait mode in fact. - */ -#define OTM8009A_800X480_HSYNC OTM8009A_480X800_HSYNC /* Horizontal synchronization */ -#define OTM8009A_800X480_HBP OTM8009A_480X800_HBP /* Horizontal back porch */ -#define OTM8009A_800X480_HFP OTM8009A_480X800_HFP /* Horizontal front porch */ -#define OTM8009A_800X480_VSYNC OTM8009A_480X800_VSYNC /* Vertical synchronization */ -#define OTM8009A_800X480_VBP OTM8009A_480X800_VBP /* Vertical back porch */ -#define OTM8009A_800X480_VFP OTM8009A_480X800_VFP /* Vertical front porch */ - - -/* List of OTM8009A used commands */ -/* Detailed in OTM8009A Data Sheet 'DATA_SHEET_OTM8009A_V0 92.pdf' */ -/* Version of 14 June 2012 */ -#define OTM8009A_CMD_NOP 0x00 /* NOP command */ -#define OTM8009A_CMD_SWRESET 0x01 /* Sw reset command */ -#define OTM8009A_CMD_RDDMADCTL 0x0B /* Read Display MADCTR command : read memory display access ctrl */ -#define OTM8009A_CMD_RDDCOLMOD 0x0C /* Read Display pixel format */ -#define OTM8009A_CMD_SLPIN 0x10 /* Sleep In command */ -#define OTM8009A_CMD_SLPOUT 0x11 /* Sleep Out command */ -#define OTM8009A_CMD_PTLON 0x12 /* Partial mode On command */ - -#define OTM8009A_CMD_DISPOFF 0x28 /* Display Off command */ -#define OTM8009A_CMD_DISPON 0x29 /* Display On command */ - -#define OTM8009A_CMD_CASET 0x2A /* Column address set command */ -#define OTM8009A_CMD_PASET 0x2B /* Page address set command */ - -#define OTM8009A_CMD_RAMWR 0x2C /* Memory (GRAM) write command */ -#define OTM8009A_CMD_RAMRD 0x2E /* Memory (GRAM) read command */ - -#define OTM8009A_CMD_PLTAR 0x30 /* Partial area command (4 parameters) */ - -#define OTM8009A_CMD_TEOFF 0x34 /* Tearing Effect Line Off command : command with no parameter */ - -#define OTM8009A_CMD_TEEON 0x35 /* Tearing Effect Line On command : command with 1 parameter 'TELOM' */ - -/* Parameter TELOM : Tearing Effect Line Output Mode : possible values */ -#define OTM8009A_TEEON_TELOM_VBLANKING_INFO_ONLY 0x00 -#define OTM8009A_TEEON_TELOM_VBLANKING_AND_HBLANKING_INFO 0x01 - -#define OTM8009A_CMD_MADCTR 0x36 /* Memory Access write control command */ - -/* Possible used values of MADCTR */ -#define OTM8009A_MADCTR_MODE_PORTRAIT 0x00 -#define OTM8009A_MADCTR_MODE_LANDSCAPE 0x60 /* MY = 0, MX = 1, MV = 1, ML = 0, RGB = 0 */ - -#define OTM8009A_CMD_IDMOFF 0x38 /* Idle mode Off command */ -#define OTM8009A_CMD_IDMON 0x39 /* Idle mode On command */ - -#define OTM8009A_CMD_COLMOD 0x3A /* Interface Pixel format command */ - -/* Possible values of COLMOD parameter corresponding to used pixel formats */ -#define OTM8009A_COLMOD_RGB565 0x55 -#define OTM8009A_COLMOD_RGB888 0x77 - -#define OTM8009A_CMD_RAMWRC 0x3C /* Memory write continue command */ -#define OTM8009A_CMD_RAMRDC 0x3E /* Memory read continue command */ - -#define OTM8009A_CMD_WRTESCN 0x44 /* Write Tearing Effect Scan line command */ -#define OTM8009A_CMD_RDSCNL 0x45 /* Read Tearing Effect Scan line command */ - -/* CABC Management : ie : Content Adaptive Back light Control in IC OTM8009a */ -#define OTM8009A_CMD_WRDISBV 0x51 /* Write Display Brightness command */ -#define OTM8009A_CMD_WRCTRLD 0x53 /* Write CTRL Display command */ -#define OTM8009A_CMD_WRCABC 0x55 /* Write Content Adaptive Brightness command */ -#define OTM8009A_CMD_WRCABCMB 0x5E /* Write CABC Minimum Brightness command */ - -/** - * @brief OTM8009A_480X800 frequency divider - */ -#define OTM8009A_480X800_FREQUENCY_DIVIDER 2 /* LCD Frequency divider */ - -/** - * @} - */ - -/* Exported macro ------------------------------------------------------------*/ - -/** @defgroup OTM8009A_Exported_Macros OTM8009A Exported Macros - * @{ - */ - -/** - * @} - */ - -/* Exported functions --------------------------------------------------------*/ - -/** @addtogroup OTM8009A_Exported_Functions - * @{ - */ -void DSI_IO_WriteCmd(uint32_t NbrParams, uint8_t *pParams); -uint8_t OTM8009A_Init(uint32_t ColorCoding, uint32_t orientation); -void OTM8009A_IO_Delay(uint32_t Delay); -/** - * @} - */ -#ifdef __cplusplus -} -#endif - -#endif /* __OTM8009A_480X800_H */ -/** - * @} - */ - -/** - * @} - */ - -/** - * @} - */ - -/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Drivers/BSP/Components/Common/audio.h Tue May 16 10:50:26 2017 +0200 @@ -0,0 +1,122 @@ +/** + ****************************************************************************** + * @file audio.h + * @author MCD Application Team + * @version V4.0.1 + * @date 21-July-2015 + * @brief This header file contains the common defines and functions prototypes + * for the Audio driver. + ****************************************************************************** + * @attention + * + * <h2><center>© COPYRIGHT(c) 2015 STMicroelectronics</center></h2> + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * 3. Neither the name of STMicroelectronics nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + ****************************************************************************** + */ + +/* Define to prevent recursive inclusion -------------------------------------*/ +#ifndef __AUDIO_H +#define __AUDIO_H + +#ifdef __cplusplus + extern "C" { +#endif + +/* Includes ------------------------------------------------------------------*/ +#include <stdint.h> + +/** @addtogroup BSP + * @{ + */ + +/** @addtogroup Components + * @{ + */ + +/** @addtogroup AUDIO + * @{ + */ + +/** @defgroup AUDIO_Exported_Constants + * @{ + */ + +/* Codec audio Standards */ +#define CODEC_STANDARD 0x04 +#define I2S_STANDARD I2S_STANDARD_PHILIPS + +/** + * @} + */ + +/** @defgroup AUDIO_Exported_Types + * @{ + */ + +/** @defgroup AUDIO_Driver_structure Audio Driver structure + * @{ + */ +typedef struct +{ + uint32_t (*Init)(uint16_t, uint16_t, uint8_t, uint32_t); + void (*DeInit)(void); + uint32_t (*ReadID)(uint16_t); + uint32_t (*Play)(uint16_t, uint16_t*, uint16_t); + uint32_t (*Pause)(uint16_t); + uint32_t (*Resume)(uint16_t); + uint32_t (*Stop)(uint16_t, uint32_t); + uint32_t (*SetFrequency)(uint16_t, uint32_t); + uint32_t (*SetVolume)(uint16_t, uint8_t); + uint32_t (*SetMute)(uint16_t, uint32_t); + uint32_t (*SetOutputMode)(uint16_t, uint8_t); + uint32_t (*Reset)(uint16_t); +}AUDIO_DrvTypeDef; +/** + * @} + */ + +/** + * @} + */ + +/** + * @} + */ + +/** + * @} + */ + +/** + * @} + */ + +#ifdef __cplusplus +} +#endif + +#endif /* __AUDIO_H */ + +/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Drivers/BSP/Components/Common/gyro.h Tue May 16 10:50:26 2017 +0200 @@ -0,0 +1,145 @@ +/** + ****************************************************************************** + * @file gyro.h + * @author MCD Application Team + * @version V4.0.1 + * @date 21-July-2015 + * @brief This header file contains the functions prototypes for the gyroscope driver. + ****************************************************************************** + * @attention + * + * <h2><center>© COPYRIGHT(c) 2015 STMicroelectronics</center></h2> + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * 3. Neither the name of STMicroelectronics nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + ****************************************************************************** + */ + + +/* Define to prevent recursive inclusion -------------------------------------*/ +#ifndef __GYRO_H +#define __GYRO_H + +#ifdef __cplusplus + extern "C" { +#endif + +/* Includes ------------------------------------------------------------------*/ +#include <stdint.h> + +/** @addtogroup BSP + * @{ + */ + +/** @addtogroup Components + * @{ + */ + +/** @addtogroup GYRO + * @{ + */ + +/** @defgroup GYRO_Exported_Types + * @{ + */ + +/** @defgroup GYRO_Driver_structure Gyroscope Driver structure + * @{ + */ +typedef struct +{ + void (*Init)(uint16_t); + void (*DeInit)(void); + uint8_t (*ReadID)(void); + void (*Reset)(void); + void (*LowPower)(uint16_t); + void (*ConfigIT)(uint16_t); + void (*EnableIT)(uint8_t); + void (*DisableIT)(uint8_t); + uint8_t (*ITStatus)(uint16_t, uint16_t); + void (*ClearIT)(uint16_t, uint16_t); + void (*FilterConfig)(uint8_t); + void (*FilterCmd)(uint8_t); + void (*GetXYZ)(float *); +}GYRO_DrvTypeDef; +/** + * @} + */ + +/** @defgroup GYRO_Config_structure Gyroscope Configuration structure + * @{ + */ + +typedef struct +{ + uint8_t Power_Mode; /* Power-down/Sleep/Normal Mode */ + uint8_t Output_DataRate; /* OUT data rate */ + uint8_t Axes_Enable; /* Axes enable */ + uint8_t Band_Width; /* Bandwidth selection */ + uint8_t BlockData_Update; /* Block Data Update */ + uint8_t Endianness; /* Endian Data selection */ + uint8_t Full_Scale; /* Full Scale selection */ +}GYRO_InitTypeDef; + +/* GYRO High Pass Filter struct */ +typedef struct +{ + uint8_t HighPassFilter_Mode_Selection; /* Internal filter mode */ + uint8_t HighPassFilter_CutOff_Frequency; /* High pass filter cut-off frequency */ +}GYRO_FilterConfigTypeDef; + +/*GYRO Interrupt struct */ +typedef struct +{ + uint8_t Latch_Request; /* Latch interrupt request into CLICK_SRC register */ + uint8_t Interrupt_Axes; /* X, Y, Z Axes Interrupts */ + uint8_t Interrupt_ActiveEdge; /* Interrupt Active edge */ +}GYRO_InterruptConfigTypeDef; + +/** + * @} + */ + +/** + * @} + */ + +/** + * @} + */ + +/** + * @} + */ + +/** + * @} + */ + +#ifdef __cplusplus +} +#endif + +#endif /* __GYRO_H */ + +/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Drivers/BSP/Components/Common/io.h Tue May 16 10:50:26 2017 +0200 @@ -0,0 +1,150 @@ +/** + ****************************************************************************** + * @file io.h + * @author MCD Application Team + * @version V4.0.1 + * @date 21-July-2015 + * @brief This file contains all the functions prototypes for the IO driver. + ****************************************************************************** + * @attention + * + * <h2><center>© COPYRIGHT(c) 2015 STMicroelectronics</center></h2> + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * 3. Neither the name of STMicroelectronics nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + ****************************************************************************** + */ + +/* Define to prevent recursive inclusion -------------------------------------*/ +#ifndef __IO_H +#define __IO_H + +#ifdef __cplusplus + extern "C" { +#endif + +/* Includes ------------------------------------------------------------------*/ +#include <stdint.h> + +/** @addtogroup BSP + * @{ + */ + +/** @addtogroup Components + * @{ + */ + +/** @addtogroup IO + * @{ + */ + +/** @defgroup IO_Exported_Types + * @{ + */ + +/** + * @brief IO Bit SET and Bit RESET enumeration + */ +typedef enum +{ + IO_PIN_RESET = 0, + IO_PIN_SET +}IO_PinState; + +typedef enum +{ + IO_MODE_INPUT = 0, /* input floating */ + IO_MODE_OUTPUT, /* output Push Pull */ + IO_MODE_IT_RISING_EDGE, /* float input - irq detect on rising edge */ + IO_MODE_IT_FALLING_EDGE, /* float input - irq detect on falling edge */ + IO_MODE_IT_LOW_LEVEL, /* float input - irq detect on low level */ + IO_MODE_IT_HIGH_LEVEL, /* float input - irq detect on high level */ + /* following modes only available on MFX*/ + IO_MODE_ANALOG, /* analog mode */ + IO_MODE_OFF, /* when pin isn't used*/ + IO_MODE_INPUT_PU, /* input with internal pull up resistor */ + IO_MODE_INPUT_PD, /* input with internal pull down resistor */ + IO_MODE_OUTPUT_OD, /* Open Drain output without internal resistor */ + IO_MODE_OUTPUT_OD_PU, /* Open Drain output with internal pullup resistor */ + IO_MODE_OUTPUT_OD_PD, /* Open Drain output with internal pulldown resistor */ + IO_MODE_OUTPUT_PP, /* PushPull output without internal resistor */ + IO_MODE_OUTPUT_PP_PU, /* PushPull output with internal pullup resistor */ + IO_MODE_OUTPUT_PP_PD, /* PushPull output with internal pulldown resistor */ + IO_MODE_IT_RISING_EDGE_PU, /* push up resistor input - irq on rising edge */ + IO_MODE_IT_RISING_EDGE_PD, /* push dw resistor input - irq on rising edge */ + IO_MODE_IT_FALLING_EDGE_PU, /* push up resistor input - irq on falling edge */ + IO_MODE_IT_FALLING_EDGE_PD, /* push dw resistor input - irq on falling edge */ + IO_MODE_IT_LOW_LEVEL_PU, /* push up resistor input - irq detect on low level */ + IO_MODE_IT_LOW_LEVEL_PD, /* push dw resistor input - irq detect on low level */ + IO_MODE_IT_HIGH_LEVEL_PU, /* push up resistor input - irq detect on high level */ + IO_MODE_IT_HIGH_LEVEL_PD, /* push dw resistor input - irq detect on high level */ + +}IO_ModeTypedef; + +/** @defgroup IO_Driver_structure IO Driver structure + * @{ + */ +typedef struct +{ + void (*Init)(uint16_t); + uint16_t (*ReadID)(uint16_t); + void (*Reset)(uint16_t); + + void (*Start)(uint16_t, uint32_t); + uint8_t (*Config)(uint16_t, uint32_t, IO_ModeTypedef); + void (*WritePin)(uint16_t, uint32_t, uint8_t); + uint32_t (*ReadPin)(uint16_t, uint32_t); + + void (*EnableIT)(uint16_t); + void (*DisableIT)(uint16_t); + uint32_t (*ITStatus)(uint16_t, uint32_t); + void (*ClearIT)(uint16_t, uint32_t); + +}IO_DrvTypeDef; +/** + * @} + */ + +/** + * @} + */ + +/** + * @} + */ + +/** + * @} + */ + +/** + * @} + */ + +#ifdef __cplusplus +} +#endif + +#endif /* __IO_H */ + +/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Drivers/BSP/Components/Common/lcd.h Tue May 16 10:50:26 2017 +0200 @@ -0,0 +1,114 @@ +/** + ****************************************************************************** + * @file lcd.h + * @author MCD Application Team + * @version V4.0.1 + * @date 21-July-2015 + * @brief This file contains all the functions prototypes for the LCD driver. + ****************************************************************************** + * @attention + * + * <h2><center>© COPYRIGHT(c) 2015 STMicroelectronics</center></h2> + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * 3. Neither the name of STMicroelectronics nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + ****************************************************************************** + */ + +/* Define to prevent recursive inclusion -------------------------------------*/ +#ifndef __LCD_H +#define __LCD_H + +#ifdef __cplusplus + extern "C" { +#endif + +/* Includes ------------------------------------------------------------------*/ +#include <stdint.h> + +/** @addtogroup BSP + * @{ + */ + +/** @addtogroup Components + * @{ + */ + +/** @addtogroup LCD + * @{ + */ + +/** @defgroup LCD_Exported_Types + * @{ + */ + +/** @defgroup LCD_Driver_structure LCD Driver structure + * @{ + */ +typedef struct +{ + void (*Init)(void); + uint16_t (*ReadID)(void); + void (*DisplayOn)(void); + void (*DisplayOff)(void); + void (*SetCursor)(uint16_t, uint16_t); + void (*WritePixel)(uint16_t, uint16_t, uint16_t); + uint16_t (*ReadPixel)(uint16_t, uint16_t); + + /* Optimized operation */ + void (*SetDisplayWindow)(uint16_t, uint16_t, uint16_t, uint16_t); + void (*DrawHLine)(uint16_t, uint16_t, uint16_t, uint16_t); + void (*DrawVLine)(uint16_t, uint16_t, uint16_t, uint16_t); + + uint16_t (*GetLcdPixelWidth)(void); + uint16_t (*GetLcdPixelHeight)(void); + void (*DrawBitmap)(uint16_t, uint16_t, uint8_t*); + void (*DrawRGBImage)(uint16_t, uint16_t, uint16_t, uint16_t, uint8_t*); +}LCD_DrvTypeDef; +/** + * @} + */ + +/** + * @} + */ + +/** + * @} + */ + +/** + * @} + */ + +/** + * @} + */ + +#ifdef __cplusplus +} +#endif + +#endif /* __LCD_H */ + +/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Drivers/BSP/Components/Common/ts.h Tue May 16 10:50:26 2017 +0200 @@ -0,0 +1,107 @@ +/** + ****************************************************************************** + * @file ts.h + * @author MCD Application Team + * @version V4.0.1 + * @date 21-July-2015 + * @brief This file contains all the functions prototypes for the Touch Screen driver. + ****************************************************************************** + * @attention + * + * <h2><center>© COPYRIGHT(c) 2015 STMicroelectronics</center></h2> + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * 3. Neither the name of STMicroelectronics nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + ****************************************************************************** + */ + +/* Define to prevent recursive inclusion -------------------------------------*/ +#ifndef __TS_H +#define __TS_H + +#ifdef __cplusplus + extern "C" { +#endif + +/* Includes ------------------------------------------------------------------*/ +#include <stdint.h> + +/** @addtogroup BSP + * @{ + */ + +/** @addtogroup Components + * @{ + */ + +/** @addtogroup TS + * @{ + */ + +/** @defgroup TS_Exported_Types + * @{ + */ + +/** @defgroup TS_Driver_structure Touch Sensor Driver structure + * @{ + */ +typedef struct +{ + void (*Init)(uint16_t); + uint16_t (*ReadID)(uint16_t); + void (*Reset)(uint16_t); + void (*Start)(uint16_t); + uint8_t (*DetectTouch)(uint16_t); + void (*GetXY)(uint16_t, uint16_t*, uint16_t*); + void (*EnableIT)(uint16_t); + void (*ClearIT)(uint16_t); + uint8_t (*GetITStatus)(uint16_t); + void (*DisableIT)(uint16_t); +}TS_DrvTypeDef; +/** + * @} + */ + +/** + * @} + */ + +/** + * @} + */ + +/** + * @} + */ + +/** + * @} + */ + +#ifdef __cplusplus +} +#endif + +#endif /* __TS_H */ + +/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Drivers/BSP/Components/cs43l22/cs43l22.c Tue May 16 10:50:26 2017 +0200 @@ -0,0 +1,494 @@ +/** + ****************************************************************************** + * @file cs43l22.c + * @author MCD Application Team + * @version V2.0.2 + * @date 06-October-2015 + * @brief This file provides the CS43L22 Audio Codec driver. + ****************************************************************************** + * @attention + * + * <h2><center>© COPYRIGHT(c) 2015 STMicroelectronics</center></h2> + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * 3. Neither the name of STMicroelectronics nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + ****************************************************************************** + */ + +/* Includes ------------------------------------------------------------------*/ +#include "cs43l22.h" + +/** @addtogroup BSP + * @{ + */ + +/** @addtogroup Components + * @{ + */ + +/** @addtogroup CS43L22 + * @brief This file provides a set of functions needed to drive the + * CS43L22 audio codec. + * @{ + */ + +/** @defgroup CS43L22_Private_Types + * @{ + */ + +/** + * @} + */ + +/** @defgroup CS43L22_Private_Defines + * @{ + */ +#define VOLUME_CONVERT(Volume) (((Volume) > 100)? 100:((uint8_t)(((Volume) * 255) / 100))) +/* Uncomment this line to enable verifying data sent to codec after each write + operation (for debug purpose) */ +#if !defined (VERIFY_WRITTENDATA) +/* #define VERIFY_WRITTENDATA */ +#endif /* VERIFY_WRITTENDATA */ +/** + * @} + */ + +/** @defgroup CS43L22_Private_Macros + * @{ + */ + +/** + * @} + */ + +/** @defgroup CS43L22_Private_Variables + * @{ + */ + +/* Audio codec driver structure initialization */ +AUDIO_DrvTypeDef cs43l22_drv = +{ + cs43l22_Init, + cs43l22_DeInit, + cs43l22_ReadID, + + cs43l22_Play, + cs43l22_Pause, + cs43l22_Resume, + cs43l22_Stop, + + cs43l22_SetFrequency, + cs43l22_SetVolume, + cs43l22_SetMute, + cs43l22_SetOutputMode, + cs43l22_Reset, +}; + +static uint8_t Is_cs43l22_Stop = 1; + +volatile uint8_t OutputDev = 0; + +/** + * @} + */ + +/** @defgroup CS43L22_Function_Prototypes + * @{ + */ +static uint8_t CODEC_IO_Write(uint8_t Addr, uint8_t Reg, uint8_t Value); +/** + * @} + */ + +/** @defgroup CS43L22_Private_Functions + * @{ + */ + +/** + * @brief Initializes the audio codec and the control interface. + * @param DeviceAddr: Device address on communication Bus. + * @param OutputDevice: can be OUTPUT_DEVICE_SPEAKER, OUTPUT_DEVICE_HEADPHONE, + * OUTPUT_DEVICE_BOTH or OUTPUT_DEVICE_AUTO . + * @param Volume: Initial volume level (from 0 (Mute) to 100 (Max)) + * @retval 0 if correct communication, else wrong communication + */ +uint32_t cs43l22_Init(uint16_t DeviceAddr, uint16_t OutputDevice, uint8_t Volume, uint32_t AudioFreq) +{ + uint32_t counter = 0; + + /* Initialize the Control interface of the Audio Codec */ + AUDIO_IO_Init(); + + /* Keep Codec powered OFF */ + counter += CODEC_IO_Write(DeviceAddr, CS43L22_REG_POWER_CTL1, 0x01); + + /*Save Output device for mute ON/OFF procedure*/ + switch (OutputDevice) + { + case OUTPUT_DEVICE_SPEAKER: + OutputDev = 0xFA; + break; + + case OUTPUT_DEVICE_HEADPHONE: + OutputDev = 0xAF; + break; + + case OUTPUT_DEVICE_BOTH: + OutputDev = 0xAA; + break; + + case OUTPUT_DEVICE_AUTO: + OutputDev = 0x05; + break; + + default: + OutputDev = 0x05; + break; + } + + counter += CODEC_IO_Write(DeviceAddr, CS43L22_REG_POWER_CTL2, OutputDev); + + /* Clock configuration: Auto detection */ + counter += CODEC_IO_Write(DeviceAddr, CS43L22_REG_CLOCKING_CTL, 0x81); + + /* Set the Slave Mode and the audio Standard */ + counter += CODEC_IO_Write(DeviceAddr, CS43L22_REG_INTERFACE_CTL1, CODEC_STANDARD); + + /* Set the Master volume */ + counter += cs43l22_SetVolume(DeviceAddr, Volume); + + /* If the Speaker is enabled, set the Mono mode and volume attenuation level */ + if(OutputDevice != OUTPUT_DEVICE_HEADPHONE) + { + /* Set the Speaker Mono mode */ + counter += CODEC_IO_Write(DeviceAddr, CS43L22_REG_PLAYBACK_CTL2, 0x06); + + /* Set the Speaker attenuation level */ + counter += CODEC_IO_Write(DeviceAddr, CS43L22_REG_SPEAKER_A_VOL, 0x00); + counter += CODEC_IO_Write(DeviceAddr, CS43L22_REG_SPEAKER_B_VOL, 0x00); + } + + /* Additional configuration for the CODEC. These configurations are done to reduce + the time needed for the Codec to power off. If these configurations are removed, + then a long delay should be added between powering off the Codec and switching + off the I2S peripheral MCLK clock (which is the operating clock for Codec). + If this delay is not inserted, then the codec will not shut down properly and + it results in high noise after shut down. */ + + /* Disable the analog soft ramp */ + counter += CODEC_IO_Write(DeviceAddr, CS43L22_REG_ANALOG_ZC_SR_SETT, 0x00); + /* Disable the digital soft ramp */ + counter += CODEC_IO_Write(DeviceAddr, CS43L22_REG_MISC_CTL, 0x04); + /* Disable the limiter attack level */ + counter += CODEC_IO_Write(DeviceAddr, CS43L22_REG_LIMIT_CTL1, 0x00); + /* Adjust Bass and Treble levels */ + counter += CODEC_IO_Write(DeviceAddr, CS43L22_REG_TONE_CTL, 0x0F); + /* Adjust PCM volume level */ + counter += CODEC_IO_Write(DeviceAddr, CS43L22_REG_PCMA_VOL, 0x0A); + counter += CODEC_IO_Write(DeviceAddr, CS43L22_REG_PCMB_VOL, 0x0A); + + /* Return communication control value */ + return counter; +} + +/** + * @brief Deinitializes the audio codec. + * @param None + * @retval None + */ +void cs43l22_DeInit(void) +{ + /* Deinitialize Audio Codec interface */ + AUDIO_IO_DeInit(); +} + +/** + * @brief Get the CS43L22 ID. + * @param DeviceAddr: Device address on communication Bus. + * @retval The CS43L22 ID + */ +uint32_t cs43l22_ReadID(uint16_t DeviceAddr) +{ + uint8_t Value; + /* Initialize the Control interface of the Audio Codec */ + AUDIO_IO_Init(); + + Value = AUDIO_IO_Read(DeviceAddr, CS43L22_CHIPID_ADDR); + Value = (Value & CS43L22_ID_MASK); + + return((uint32_t) Value); +} + +/** + * @brief Start the audio Codec play feature. + * @note For this codec no Play options are required. + * @param DeviceAddr: Device address on communication Bus. + * @retval 0 if correct communication, else wrong communication + */ +uint32_t cs43l22_Play(uint16_t DeviceAddr, uint16_t* pBuffer, uint16_t Size) +{ + uint32_t counter = 0; + + if(Is_cs43l22_Stop == 1) + { + /* Enable the digital soft ramp */ + counter += CODEC_IO_Write(DeviceAddr, CS43L22_REG_MISC_CTL, 0x06); + + /* Enable Output device */ + counter += cs43l22_SetMute(DeviceAddr, AUDIO_MUTE_OFF); + + /* Power on the Codec */ + counter += CODEC_IO_Write(DeviceAddr, CS43L22_REG_POWER_CTL1, 0x9E); + Is_cs43l22_Stop = 0; + } + + /* Return communication control value */ + return counter; +} + +/** + * @brief Pauses playing on the audio codec. + * @param DeviceAddr: Device address on communication Bus. + * @retval 0 if correct communication, else wrong communication + */ +uint32_t cs43l22_Pause(uint16_t DeviceAddr) +{ + uint32_t counter = 0; + + /* Pause the audio file playing */ + /* Mute the output first */ + counter += cs43l22_SetMute(DeviceAddr, AUDIO_MUTE_ON); + + /* Put the Codec in Power save mode */ + counter += CODEC_IO_Write(DeviceAddr, CS43L22_REG_POWER_CTL1, 0x01); + + return counter; +} + +/** + * @brief Resumes playing on the audio codec. + * @param DeviceAddr: Device address on communication Bus. + * @retval 0 if correct communication, else wrong communication + */ +uint32_t cs43l22_Resume(uint16_t DeviceAddr) +{ + uint32_t counter = 0; + volatile uint32_t index = 0x00; + /* Resumes the audio file playing */ + /* Unmute the output first */ + counter += cs43l22_SetMute(DeviceAddr, AUDIO_MUTE_OFF); + + for(index = 0x00; index < 0xFF; index++); + + counter += CODEC_IO_Write(DeviceAddr, CS43L22_REG_POWER_CTL2, OutputDev); + + /* Exit the Power save mode */ + counter += CODEC_IO_Write(DeviceAddr, CS43L22_REG_POWER_CTL1, 0x9E); + + return counter; +} + +/** + * @brief Stops audio Codec playing. It powers down the codec. + * @param DeviceAddr: Device address on communication Bus. + * @param CodecPdwnMode: selects the power down mode. + * - CODEC_PDWN_HW: Physically power down the codec. When resuming from this + * mode, the codec is set to default configuration + * (user should re-Initialize the codec in order to + * play again the audio stream). + * @retval 0 if correct communication, else wrong communication + */ +uint32_t cs43l22_Stop(uint16_t DeviceAddr, uint32_t CodecPdwnMode) +{ + uint32_t counter = 0; + + /* Mute the output first */ + counter += cs43l22_SetMute(DeviceAddr, AUDIO_MUTE_ON); + + /* Disable the digital soft ramp */ + counter += CODEC_IO_Write(DeviceAddr, CS43L22_REG_MISC_CTL, 0x04); + + /* Power down the DAC and the speaker (PMDAC and PMSPK bits)*/ + counter += CODEC_IO_Write(DeviceAddr, CS43L22_REG_POWER_CTL1, 0x9F); + + Is_cs43l22_Stop = 1; + return counter; +} + +/** + * @brief Sets higher or lower the codec volume level. + * @param DeviceAddr: Device address on communication Bus. + * @param Volume: a byte value from 0 to 255 (refer to codec registers + * description for more details). + * @retval 0 if correct communication, else wrong communication + */ +uint32_t cs43l22_SetVolume(uint16_t DeviceAddr, uint8_t Volume) +{ + uint32_t counter = 0; + uint8_t convertedvol = VOLUME_CONVERT(Volume); + + if(Volume > 0xE6) + { + /* Set the Master volume */ + counter += CODEC_IO_Write(DeviceAddr, CS43L22_REG_MASTER_A_VOL, convertedvol - 0xE7); + counter += CODEC_IO_Write(DeviceAddr, CS43L22_REG_MASTER_B_VOL, convertedvol - 0xE7); + } + else + { + /* Set the Master volume */ + counter += CODEC_IO_Write(DeviceAddr, CS43L22_REG_MASTER_A_VOL, convertedvol + 0x19); + counter += CODEC_IO_Write(DeviceAddr, CS43L22_REG_MASTER_B_VOL, convertedvol + 0x19); + } + + return counter; +} + +/** + * @brief Sets new frequency. + * @param DeviceAddr: Device address on communication Bus. + * @param AudioFreq: Audio frequency used to play the audio stream. + * @retval 0 if correct communication, else wrong communication + */ +uint32_t cs43l22_SetFrequency(uint16_t DeviceAddr, uint32_t AudioFreq) +{ + return 0; +} + +/** + * @brief Enables or disables the mute feature on the audio codec. + * @param DeviceAddr: Device address on communication Bus. + * @param Cmd: AUDIO_MUTE_ON to enable the mute or AUDIO_MUTE_OFF to disable the + * mute mode. + * @retval 0 if correct communication, else wrong communication + */ +uint32_t cs43l22_SetMute(uint16_t DeviceAddr, uint32_t Cmd) +{ + uint32_t counter = 0; + + /* Set the Mute mode */ + if(Cmd == AUDIO_MUTE_ON) + { + counter += CODEC_IO_Write(DeviceAddr, CS43L22_REG_POWER_CTL2, 0xFF); + counter += CODEC_IO_Write(DeviceAddr, CS43L22_REG_HEADPHONE_A_VOL, 0x01); + counter += CODEC_IO_Write(DeviceAddr, CS43L22_REG_HEADPHONE_B_VOL, 0x01); + } + else /* AUDIO_MUTE_OFF Disable the Mute */ + { + counter += CODEC_IO_Write(DeviceAddr, CS43L22_REG_HEADPHONE_A_VOL, 0x00); + counter += CODEC_IO_Write(DeviceAddr, CS43L22_REG_HEADPHONE_B_VOL, 0x00); + counter += CODEC_IO_Write(DeviceAddr, CS43L22_REG_POWER_CTL2, OutputDev); + } + return counter; +} + +/** + * @brief Switch dynamically (while audio file is played) the output target + * (speaker or headphone). + * @note This function modifies a global variable of the audio codec driver: OutputDev. + * @param DeviceAddr: Device address on communication Bus. + * @param Output: specifies the audio output target: OUTPUT_DEVICE_SPEAKER, + * OUTPUT_DEVICE_HEADPHONE, OUTPUT_DEVICE_BOTH or OUTPUT_DEVICE_AUTO + * @retval 0 if correct communication, else wrong communication + */ +uint32_t cs43l22_SetOutputMode(uint16_t DeviceAddr, uint8_t Output) +{ + uint32_t counter = 0; + + switch (Output) + { + case OUTPUT_DEVICE_SPEAKER: + counter += CODEC_IO_Write(DeviceAddr, CS43L22_REG_POWER_CTL2, 0xFA); /* SPK always ON & HP always OFF */ + OutputDev = 0xFA; + break; + + case OUTPUT_DEVICE_HEADPHONE: + counter += CODEC_IO_Write(DeviceAddr, CS43L22_REG_POWER_CTL2, 0xAF); /* SPK always OFF & HP always ON */ + OutputDev = 0xAF; + break; + + case OUTPUT_DEVICE_BOTH: + counter += CODEC_IO_Write(DeviceAddr, CS43L22_REG_POWER_CTL2, 0xAA); /* SPK always ON & HP always ON */ + OutputDev = 0xAA; + break; + + case OUTPUT_DEVICE_AUTO: + counter += CODEC_IO_Write(DeviceAddr, CS43L22_REG_POWER_CTL2, 0x05); /* Detect the HP or the SPK automatically */ + OutputDev = 0x05; + break; + + default: + counter += CODEC_IO_Write(DeviceAddr, CS43L22_REG_POWER_CTL2, 0x05); /* Detect the HP or the SPK automatically */ + OutputDev = 0x05; + break; + } + return counter; +} + +/** + * @brief Resets cs43l22 registers. + * @param DeviceAddr: Device address on communication Bus. + * @retval 0 if correct communication, else wrong communication + */ +uint32_t cs43l22_Reset(uint16_t DeviceAddr) +{ + return 0; +} + +/** + * @brief Writes/Read a single data. + * @param Addr: I2C address + * @param Reg: Reg address + * @param Value: Data to be written + * @retval None + */ +static uint8_t CODEC_IO_Write(uint8_t Addr, uint8_t Reg, uint8_t Value) +{ + uint32_t result = 0; + + AUDIO_IO_Write(Addr, Reg, Value); + +#ifdef VERIFY_WRITTENDATA + /* Verify that the data has been correctly written */ + result = (AUDIO_IO_Read(Addr, Reg) == Value)? 0:1; +#endif /* VERIFY_WRITTENDATA */ + + return result; +} + +/** + * @} + */ + +/** + * @} + */ + +/** + * @} + */ + +/** + * @} + */ + +/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Drivers/BSP/Components/cs43l22/cs43l22.h Tue May 16 10:50:26 2017 +0200 @@ -0,0 +1,228 @@ +/** + ****************************************************************************** + * @file cs43l22.h + * @author MCD Application Team + * @version V2.0.2 + * @date 06-October-2015 + * @brief This file contains all the functions prototypes for the cs43l22.c driver. + ****************************************************************************** + * @attention + * + * <h2><center>© COPYRIGHT(c) 2015 STMicroelectronics</center></h2> + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * 3. Neither the name of STMicroelectronics nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + ****************************************************************************** + */ + +/* Define to prevent recursive inclusion -------------------------------------*/ +#ifndef __CS43L22_H +#define __CS43L22_H + +/* Includes ------------------------------------------------------------------*/ +#include "../Common/audio.h" + +/** @addtogroup BSP + * @{ + */ + +/** @addtogroup Component + * @{ + */ + +/** @addtogroup CS43L22 + * @{ + */ + +/** @defgroup CS43L22_Exported_Types + * @{ + */ + +/** + * @} + */ + +/** @defgroup CS43L22_Exported_Constants + * @{ + */ + +/******************************************************************************/ +/*************************** Codec User defines ******************************/ +/******************************************************************************/ +/* Codec output DEVICE */ +#define OUTPUT_DEVICE_SPEAKER 1 +#define OUTPUT_DEVICE_HEADPHONE 2 +#define OUTPUT_DEVICE_BOTH 3 +#define OUTPUT_DEVICE_AUTO 4 + +/* Volume Levels values */ +#define DEFAULT_VOLMIN 0x00 +#define DEFAULT_VOLMAX 0xFF +#define DEFAULT_VOLSTEP 0x04 + +#define AUDIO_PAUSE 0 +#define AUDIO_RESUME 1 + +/* Codec POWER DOWN modes */ +#define CODEC_PDWN_HW 1 +#define CODEC_PDWN_SW 2 + +/* MUTE commands */ +#define AUDIO_MUTE_ON 1 +#define AUDIO_MUTE_OFF 0 + +/* AUDIO FREQUENCY */ +#define AUDIO_FREQUENCY_192K ((uint32_t)192000) +#define AUDIO_FREQUENCY_96K ((uint32_t)96000) +#define AUDIO_FREQUENCY_48K ((uint32_t)48000) +#define AUDIO_FREQUENCY_44K ((uint32_t)44100) +#define AUDIO_FREQUENCY_32K ((uint32_t)32000) +#define AUDIO_FREQUENCY_22K ((uint32_t)22050) +#define AUDIO_FREQUENCY_16K ((uint32_t)16000) +#define AUDIO_FREQUENCY_11K ((uint32_t)11025) +#define AUDIO_FREQUENCY_8K ((uint32_t)8000) + +/** CS43l22 Registers ***/ +#define CS43L22_REG_ID 0x01 +#define CS43L22_REG_POWER_CTL1 0x02 +#define CS43L22_REG_POWER_CTL2 0x04 +#define CS43L22_REG_CLOCKING_CTL 0x05 +#define CS43L22_REG_INTERFACE_CTL1 0x06 +#define CS43L22_REG_INTERFACE_CTL2 0x07 +#define CS43L22_REG_PASSTHR_A_SELECT 0x08 +#define CS43L22_REG_PASSTHR_B_SELECT 0x09 +#define CS43L22_REG_ANALOG_ZC_SR_SETT 0x0A +#define CS43L22_REG_PASSTHR_GANG_CTL 0x0C +#define CS43L22_REG_PLAYBACK_CTL1 0x0D +#define CS43L22_REG_MISC_CTL 0x0E +#define CS43L22_REG_PLAYBACK_CTL2 0x0F +#define CS43L22_REG_PASSTHR_A_VOL 0x14 +#define CS43L22_REG_PASSTHR_B_VOL 0x15 +#define CS43L22_REG_PCMA_VOL 0x1A +#define CS43L22_REG_PCMB_VOL 0x1B +#define CS43L22_REG_BEEP_FREQ_ON_TIME 0x1C +#define CS43L22_REG_BEEP_VOL_OFF_TIME 0x1D +#define CS43L22_REG_BEEP_TONE_CFG 0x1E +#define CS43L22_REG_TONE_CTL 0x1F +#define CS43L22_REG_MASTER_A_VOL 0x20 +#define CS43L22_REG_MASTER_B_VOL 0x21 +#define CS43L22_REG_HEADPHONE_A_VOL 0x22 +#define CS43L22_REG_HEADPHONE_B_VOL 0x23 +#define CS43L22_REG_SPEAKER_A_VOL 0x24 +#define CS43L22_REG_SPEAKER_B_VOL 0x25 +#define CS43L22_REG_CH_MIXER_SWAP 0x26 +#define CS43L22_REG_LIMIT_CTL1 0x27 +#define CS43L22_REG_LIMIT_CTL2 0x28 +#define CS43L22_REG_LIMIT_ATTACK_RATE 0x29 +#define CS43L22_REG_OVF_CLK_STATUS 0x2E +#define CS43L22_REG_BATT_COMPENSATION 0x2F +#define CS43L22_REG_VP_BATTERY_LEVEL 0x30 +#define CS43L22_REG_SPEAKER_STATUS 0x31 +#define CS43L22_REG_TEMPMONITOR_CTL 0x32 +#define CS43L22_REG_THERMAL_FOLDBACK 0x33 +#define CS43L22_REG_CHARGE_PUMP_FREQ 0x34 + +/******************************************************************************/ +/****************************** REGISTER MAPPING ******************************/ +/******************************************************************************/ +/** + * @brief CS43L22 ID + */ +#define CS43L22_ID 0xE0 +#define CS43L22_ID_MASK 0xF8 +/** + * @brief Chip ID Register: Chip I.D. and Revision Register + * Read only register + * Default value: 0x01 + * [7:3] CHIPID[4:0]: I.D. code for the CS43L22. + * Default value: 11100b + * [2:0] REVID[2:0]: CS43L22 revision level. + * Default value: + * 000 - Rev A0 + * 001 - Rev A1 + * 010 - Rev B0 + * 011 - Rev B1 + */ +#define CS43L22_CHIPID_ADDR 0x01 + +/** + * @} + */ + +/** @defgroup CS43L22_Exported_Macros + * @{ + */ + +/** + * @} + */ + +/** @defgroup CS43L22_Exported_Functions + * @{ + */ + +/*------------------------------------------------------------------------------ + Audio Codec functions +------------------------------------------------------------------------------*/ +/* High Layer codec functions */ +uint32_t cs43l22_Init(uint16_t DeviceAddr, uint16_t OutputDevice, uint8_t Volume, uint32_t AudioFreq); +void cs43l22_DeInit(void); +uint32_t cs43l22_ReadID(uint16_t DeviceAddr); +uint32_t cs43l22_Play(uint16_t DeviceAddr, uint16_t* pBuffer, uint16_t Size); +uint32_t cs43l22_Pause(uint16_t DeviceAddr); +uint32_t cs43l22_Resume(uint16_t DeviceAddr); +uint32_t cs43l22_Stop(uint16_t DeviceAddr, uint32_t Cmd); +uint32_t cs43l22_SetVolume(uint16_t DeviceAddr, uint8_t Volume); +uint32_t cs43l22_SetFrequency(uint16_t DeviceAddr, uint32_t AudioFreq); +uint32_t cs43l22_SetMute(uint16_t DeviceAddr, uint32_t Cmd); +uint32_t cs43l22_SetOutputMode(uint16_t DeviceAddr, uint8_t Output); +uint32_t cs43l22_Reset(uint16_t DeviceAddr); + +/* AUDIO IO functions */ +void AUDIO_IO_Init(void); +void AUDIO_IO_DeInit(void); +void AUDIO_IO_Write(uint8_t Addr, uint8_t Reg, uint8_t Value); +uint8_t AUDIO_IO_Read(uint8_t Addr, uint8_t Reg); + +/* Audio driver structure */ +extern AUDIO_DrvTypeDef cs43l22_drv; + +#endif /* __CS43L22_H */ + +/** + * @} + */ + +/** + * @} + */ + +/** + * @} + */ + +/** + * @} + */ + +/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Drivers/BSP/Components/ft6x06/ft6x06.c Tue May 16 10:50:26 2017 +0200 @@ -0,0 +1,514 @@ +/** + ****************************************************************************** + * @file ft6x06.c + * @author MCD Application Team + * @version V1.0.1 + * @date 03-May-2016 + * @brief This file provides a set of functions needed to manage the FT6X06 + * IO Expander devices. + ****************************************************************************** + * @attention + * + * <h2><center>© COPYRIGHT(c) 2016 STMicroelectronics</center></h2> + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * 3. Neither the name of STMicroelectronics nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + ****************************************************************************** + */ + +/* Includes ------------------------------------------------------------------*/ +#include "ft6x06.h" + +/** @addtogroup BSP + * @{ + */ + +/** @addtogroup Component + * @{ + */ + +/** @defgroup FT6X06 + * @{ + */ + +/* Private typedef -----------------------------------------------------------*/ + +/** @defgroup FT6X06_Private_Defines FT6X06 Private Defines + * @{ + */ +#define FT6x06_MAX_INSTANCE 2 +/** + * @} + */ + +/* Private macro -------------------------------------------------------------*/ + +/** @defgroup FT6X06_Private_Variables FT6X06 Private Variables + * @{ + */ + +/* Touch screen driver structure initialization */ +TS_DrvTypeDef ft6x06_ts_drv = +{ + ft6x06_Init, + ft6x06_ReadID, + ft6x06_Reset, + + ft6x06_TS_Start, + ft6x06_TS_DetectTouch, + ft6x06_TS_GetXY, + + ft6x06_TS_EnableIT, + ft6x06_TS_ClearIT, + ft6x06_TS_ITStatus, + ft6x06_TS_DisableIT +}; + +/* ft6x06 instances by address */ +uint8_t ft6x06[FT6x06_MAX_INSTANCE] = {0}; + +/* Global ft6x06 handle */ +static ft6x06_handle_TypeDef ft6x06_handle = { FT6206_I2C_NOT_INITIALIZED, 0, 0}; + +/** + * @} + */ + +/** @defgroup ft6x06_Private_Function_Prototypes ft6x06 Private Function Prototypes + * @{ + */ +static uint8_t ft6x06_GetInstance(uint16_t DeviceAddr); +/* Private functions prototypes-----------------------------------------------*/ +#if (TS_AUTO_CALIBRATION_SUPPORTED == 1) +/** + * @brief Start TouchScreen calibration phase + * @param DeviceAddr: FT6206 Device address for communication on I2C Bus. + * @retval Status FT6206_STATUS_OK or FT6206_STATUS_NOT_OK. + */ +static uint32_t ft6x06_TS_Calibration(uint16_t DeviceAddr); +#endif /* TS_AUTO_CALIBRATION_SUPPORTED == 1 */ + +/** + * @brief Basic static configuration of TouchScreen + * @param DeviceAddr: FT6206 Device address for communication on I2C Bus. + * @retval Status FT6206_STATUS_OK or FT6206_STATUS_NOT_OK. + */ +static uint32_t ft6x06_TS_Configure(uint16_t DeviceAddr); + +/** + * @} + */ + +/** @defgroup ft6x06_Private_Functions ft6x06 Private Functions + * @{ + */ + +/** + * @brief Initialize the ft6x06 communication bus + * from MCU to FT6206 : ie I2C channel initialization (if required). + * @param DeviceAddr: Device address on communication Bus (I2C slave address of FT6206). + * @retval None + */ +void ft6x06_Init(uint16_t DeviceAddr) +{ + uint8_t instance; + uint8_t empty; + + /* Check if device instance already exists */ + instance = ft6x06_GetInstance(DeviceAddr); + + /* To prevent double initialization */ + if(instance == 0xFF) + { + /* Look for empty instance */ + empty = ft6x06_GetInstance(0); + + if(empty < FT6x06_MAX_INSTANCE) + { + /* Register the current device instance */ + ft6x06[empty] = DeviceAddr; + + /* Initialize IO BUS layer */ + TS_IO_Init(); + } + } +} + +/** + * @brief Software Reset the ft6x06. + * @note : Not applicable to FT6206. + * @param DeviceAddr: Device address on communication Bus (I2C slave address of FT6206). + * @retval None + */ +void ft6x06_Reset(uint16_t DeviceAddr) +{ + /* Do nothing */ + /* No software reset sequence available in FT6206 IC */ +} + +/** + * @brief Read the ft6x06 device ID, pre initialize I2C in case of need to be + * able to read the FT6206 device ID, and verify this is a FT6206. + * @param DeviceAddr: I2C FT6x06 Slave address. + * @retval The Device ID (two bytes). + */ +uint16_t ft6x06_ReadID(uint16_t DeviceAddr) +{ + /* Initialize I2C link if needed */ + TS_IO_Init(); + + /* Return the device ID value */ + return (TS_IO_Read(DeviceAddr, FT6206_CHIP_ID_REG)); +} + +/** + * @brief Configures the touch Screen IC device to start detecting touches + * It goes through an internal calibration process (Hw calibration sequence of + * the touch screen). + * @param DeviceAddr: Device address on communication Bus (I2C slave address). + * @retval None. + */ +void ft6x06_TS_Start(uint16_t DeviceAddr) +{ +#if (TS_AUTO_CALIBRATION_SUPPORTED == 1) + /* Hw Calibration sequence start : should be done once after each power up */ + /* This is called internal calibration of the touch screen */ + ft6x06_TS_Calibration(DeviceAddr); +#endif + /* Minimum static configuration of FT6206 */ + ft6x06_TS_Configure(DeviceAddr); + + /* By default set FT6206 IC in Polling mode : no INT generation on FT6206 for new touch available */ + /* Note TS_INT is active low */ + ft6x06_TS_DisableIT(DeviceAddr); +} + +/** + * @brief Return if there is touches detected or not. + * Try to detect new touches and forget the old ones (reset internal global + * variables). + * @param DeviceAddr: Device address on communication Bus. + * @retval : Number of active touches detected (can be 0, 1 or 2). + */ +uint8_t ft6x06_TS_DetectTouch(uint16_t DeviceAddr) +{ + volatile uint8_t nbTouch = 0; + + /* Read register FT6206_TD_STAT_REG to check number of touches detection */ + nbTouch = TS_IO_Read(DeviceAddr, FT6206_TD_STAT_REG); + nbTouch &= FT6206_TD_STAT_MASK; + + if(nbTouch > FT6206_MAX_DETECTABLE_TOUCH) + { + /* If invalid number of touch detected, set it to zero */ + nbTouch = 0; + } + + /* Update ft6x06 driver internal global : current number of active touches */ + ft6x06_handle.currActiveTouchNb = nbTouch; + + /* Reset current active touch index on which to work on */ + ft6x06_handle.currActiveTouchIdx = 0; + + return(nbTouch); +} + +/** + * @brief Get the touch screen X and Y positions values + * Manage multi touch thanks to touch Index global + * variable 'ft6x06_handle.currActiveTouchIdx'. + * @param DeviceAddr: Device address on communication Bus. + * @param X: Pointer to X position value + * @param Y: Pointer to Y position value + * @retval None. + */ +void ft6x06_TS_GetXY(uint16_t DeviceAddr, uint16_t *X, uint16_t *Y) +{ + uint8_t regAddress = 0; + uint8_t dataxy[4]; + + if(ft6x06_handle.currActiveTouchIdx < ft6x06_handle.currActiveTouchNb) + { + switch(ft6x06_handle.currActiveTouchIdx) + { + case 0 : + regAddress = FT6206_P1_XH_REG; + break; + case 1 : + regAddress = FT6206_P2_XH_REG; + break; + + default : + break; + } + + /* Read X and Y positions */ + TS_IO_ReadMultiple(DeviceAddr, regAddress, dataxy, sizeof(dataxy)); + + /* Send back ready X position to caller */ + *X = ((dataxy[0] & FT6206_MSB_MASK) << 8) | (dataxy[1] & FT6206_LSB_MASK); + + /* Send back ready Y position to caller */ + *Y = ((dataxy[2] & FT6206_MSB_MASK) << 8) | (dataxy[3] & FT6206_LSB_MASK); + + ft6x06_handle.currActiveTouchIdx++; + } +} + +/** + * @brief Configure the FT6206 device to generate IT on given INT pin + * connected to MCU as EXTI. + * @param DeviceAddr: Device address on communication Bus (Slave I2C address of FT6206). + * @retval None + */ +void ft6x06_TS_EnableIT(uint16_t DeviceAddr) +{ + uint8_t regValue = 0; + regValue = (FT6206_G_MODE_INTERRUPT_TRIGGER & (FT6206_G_MODE_INTERRUPT_MASK >> FT6206_G_MODE_INTERRUPT_SHIFT)) << FT6206_G_MODE_INTERRUPT_SHIFT; + + /* Set interrupt trigger mode in FT6206_GMODE_REG */ + TS_IO_Write(DeviceAddr, FT6206_GMODE_REG, regValue); +} + +/** + * @brief Configure the FT6206 device to stop generating IT on the given INT pin + * connected to MCU as EXTI. + * @param DeviceAddr: Device address on communication Bus (Slave I2C address of FT6206). + * @retval None + */ +void ft6x06_TS_DisableIT(uint16_t DeviceAddr) +{ + uint8_t regValue = 0; + regValue = (FT6206_G_MODE_INTERRUPT_POLLING & (FT6206_G_MODE_INTERRUPT_MASK >> FT6206_G_MODE_INTERRUPT_SHIFT)) << FT6206_G_MODE_INTERRUPT_SHIFT; + + /* Set interrupt polling mode in FT6206_GMODE_REG */ + TS_IO_Write(DeviceAddr, FT6206_GMODE_REG, regValue); +} + +/** + * @brief Get IT status from FT6206 interrupt status registers + * Should be called Following an EXTI coming to the MCU to know the detailed + * reason of the interrupt. + * @note : This feature is not applicable to FT6206. + * @param DeviceAddr: Device address on communication Bus (I2C slave address of FT6206). + * @retval TS interrupts status : always return 0 here + */ +uint8_t ft6x06_TS_ITStatus(uint16_t DeviceAddr) +{ + /* Always return 0 as feature not applicable to FT6206 */ + return 0; +} + +/** + * @brief Clear IT status in FT6206 interrupt status clear registers + * Should be called Following an EXTI coming to the MCU. + * @note : This feature is not applicable to FT6206. + * @param DeviceAddr: Device address on communication Bus (I2C slave address of FT6206). + * @retval None + */ +void ft6x06_TS_ClearIT(uint16_t DeviceAddr) +{ + /* Nothing to be done here for FT6206 */ +} + +/**** NEW FEATURES enabled when Multi-touch support is enabled ****/ + +#if (TS_MULTI_TOUCH_SUPPORTED == 1) +/** + * @brief Get the last touch gesture identification (zoom, move up/down...). + * @param DeviceAddr: Device address on communication Bus (I2C slave address of FT6x06). + * @param pGestureId : Pointer to get last touch gesture Identification. + * @retval None. + */ +void ft6x06_TS_GetGestureID(uint16_t DeviceAddr, uint32_t * pGestureId) +{ + volatile uint8_t ucReadData = 0; + + ucReadData = TS_IO_Read(DeviceAddr, FT6206_GEST_ID_REG); + + * pGestureId = ucReadData; +} + +/** + * @brief Get the touch detailed informations on touch number 'touchIdx' (0..1) + * This touch detailed information contains : + * - weight that was applied to this touch + * - sub-area of the touch in the touch panel + * - event of linked to the touch (press down, lift up, ...) + * @param DeviceAddr: Device address on communication Bus (I2C slave address of FT6x06). + * @param touchIdx : Passed index of the touch (0..1) on which we want to get the + * detailed information. + * @param pWeight : Pointer to to get the weight information of 'touchIdx'. + * @param pArea : Pointer to to get the sub-area information of 'touchIdx'. + * @param pEvent : Pointer to to get the event information of 'touchIdx'. + + * @retval None. + */ +void ft6x06_TS_GetTouchInfo(uint16_t DeviceAddr, + uint32_t touchIdx, + uint32_t * pWeight, + uint32_t * pArea, + uint32_t * pEvent) +{ + uint8_t regAddress = 0; + uint8_t dataxy[3]; + + if(touchIdx < ft6x06_handle.currActiveTouchNb) + { + switch(touchIdx) + { + case 0 : + regAddress = FT6206_P1_WEIGHT_REG; + break; + + case 1 : + regAddress = FT6206_P2_WEIGHT_REG; + break; + + default : + break; + + } /* end switch(touchIdx) */ + + /* Read weight, area and Event Id of touch index */ + TS_IO_ReadMultiple(DeviceAddr, regAddress, dataxy, sizeof(dataxy)); + + /* Return weight of touch index */ + * pWeight = (dataxy[0] & FT6206_TOUCH_WEIGHT_MASK) >> FT6206_TOUCH_WEIGHT_SHIFT; + /* Return area of touch index */ + * pArea = (dataxy[1] & FT6206_TOUCH_AREA_MASK) >> FT6206_TOUCH_AREA_SHIFT; + /* Return Event Id of touch index */ + * pEvent = (dataxy[2] & FT6206_TOUCH_EVT_FLAG_MASK) >> FT6206_TOUCH_EVT_FLAG_SHIFT; + + } /* of if(touchIdx < ft6x06_handle.currActiveTouchNb) */ +} + +#endif /* TS_MULTI_TOUCH_SUPPORTED == 1 */ + +#if (TS_AUTO_CALIBRATION_SUPPORTED == 1) +/** + * @brief Start TouchScreen calibration phase + * @param DeviceAddr: FT6206 Device address for communication on I2C Bus. + * @retval Status FT6206_STATUS_OK or FT6206_STATUS_NOT_OK. + */ +static uint32_t ft6x06_TS_Calibration(uint16_t DeviceAddr) +{ + uint32_t nbAttempt = 0; + volatile uint8_t ucReadData; + volatile uint8_t regValue; + uint32_t status = FT6206_STATUS_OK; + uint8_t bEndCalibration = 0; + + /* >> Calibration sequence start */ + + /* Switch FT6206 back to factory mode to calibrate */ + regValue = (FT6206_DEV_MODE_FACTORY & FT6206_DEV_MODE_MASK) << FT6206_DEV_MODE_SHIFT; + TS_IO_Write(DeviceAddr, FT6206_DEV_MODE_REG, regValue); /* 0x40 */ + + /* Read back the same register FT6206_DEV_MODE_REG */ + ucReadData = TS_IO_Read(DeviceAddr, FT6206_DEV_MODE_REG); + TS_IO_Delay(300); /* Wait 300 ms */ + + if(((ucReadData & (FT6206_DEV_MODE_MASK << FT6206_DEV_MODE_SHIFT)) >> FT6206_DEV_MODE_SHIFT) != FT6206_DEV_MODE_FACTORY ) + { + /* Return error to caller */ + return(FT6206_STATUS_NOT_OK); + } + + /* Start calibration command */ + TS_IO_Write(DeviceAddr, FT6206_TD_STAT_REG, 0x04); + TS_IO_Delay(300); /* Wait 300 ms */ + + /* 100 attempts to wait switch from factory mode (calibration) to working mode */ + for (nbAttempt=0; ((nbAttempt < 100) && (!bEndCalibration)) ; nbAttempt++) + { + ucReadData = TS_IO_Read(DeviceAddr, FT6206_DEV_MODE_REG); + ucReadData = (ucReadData & (FT6206_DEV_MODE_MASK << FT6206_DEV_MODE_SHIFT)) >> FT6206_DEV_MODE_SHIFT; + if(ucReadData == FT6206_DEV_MODE_WORKING) + { + /* Auto Switch to FT6206_DEV_MODE_WORKING : means calibration have ended */ + bEndCalibration = 1; /* exit for loop */ + } + + TS_IO_Delay(200); /* Wait 200 ms */ + } + + /* Calibration sequence end << */ + + return(status); +} +#endif /* TS_AUTO_CALIBRATION_SUPPORTED == 1 */ + +/** + * @brief Basic static configuration of TouchScreen + * @param DeviceAddr: FT6206 Device address for communication on I2C Bus. + * @retval Status FT6206_STATUS_OK or FT6206_STATUS_NOT_OK. + */ +static uint32_t ft6x06_TS_Configure(uint16_t DeviceAddr) +{ + uint32_t status = FT6206_STATUS_OK; + + /* Nothing special to be done for FT6206 */ + + return(status); +} + +/** + * @brief Check if the device instance of the selected address is already registered + * and return its index + * @param DeviceAddr: Device address on communication Bus. + * @retval Index of the device instance if registered, 0xFF if not. + */ +static uint8_t ft6x06_GetInstance(uint16_t DeviceAddr) +{ + uint8_t idx = 0; + + /* Check all the registered instances */ + for(idx = 0; idx < FT6x06_MAX_INSTANCE ; idx ++) + { + if(ft6x06[idx] == DeviceAddr) + { + return idx; + } + } + + return 0xFF; +} + +/** + * @} + */ + +/** + * @} + */ + +/** + * @} + */ + +/** + * @} + */ + +/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Drivers/BSP/Components/ft6x06/ft6x06.h Tue May 16 10:50:26 2017 +0200 @@ -0,0 +1,471 @@ +/** + ****************************************************************************** + * @file ft6x06.h + * @author MCD Application Team + * @version V1.0.1 + * @date 03-May-2016 + * @brief This file contains all the functions prototypes for the + * ft6x06.c IO expander driver. + ****************************************************************************** + * @attention + * + * <h2><center>© COPYRIGHT(c) 2016 STMicroelectronics</center></h2> + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * 3. Neither the name of STMicroelectronics nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + ****************************************************************************** + */ + +/* Define to prevent recursive inclusion -------------------------------------*/ +#ifndef __FT6X06_H +#define __FT6X06_H + +#ifdef __cplusplus +extern "C" { +#endif + +/* Set Multi-touch as non supported */ +#ifndef TS_MULTI_TOUCH_SUPPORTED + #define TS_MULTI_TOUCH_SUPPORTED 0 +#endif + +/* Set Auto-calibration as non supported */ +#ifndef TS_AUTO_CALIBRATION_SUPPORTED + #define TS_AUTO_CALIBRATION_SUPPORTED 0 +#endif + +/* Includes ------------------------------------------------------------------*/ +#include "../Common/ts.h" + +/* Macros --------------------------------------------------------------------*/ + +/** @typedef ft6x06_handle_TypeDef + * ft6x06 Handle definition. + */ +typedef struct +{ + uint8_t i2cInitialized; + + /* field holding the current number of simultaneous active touches */ + uint8_t currActiveTouchNb; + + /* field holding the touch index currently managed */ + uint8_t currActiveTouchIdx; + +} ft6x06_handle_TypeDef; + + /** @addtogroup BSP + * @{ + */ + + /** @addtogroup Component + * @{ + */ + + /** @defgroup FT6X06 + * @{ + */ + + /* Exported types ------------------------------------------------------------*/ + + /** @defgroup FT6X06_Exported_Types + * @{ + */ + + /* Exported constants --------------------------------------------------------*/ + + /** @defgroup FT6X06_Exported_Constants + * @{ + */ + + /* Maximum border values of the touchscreen pad */ +#define FT_6206_MAX_WIDTH ((uint16_t)800) /* Touchscreen pad max width */ +#define FT_6206_MAX_HEIGHT ((uint16_t)480) /* Touchscreen pad max height */ + + /* Touchscreen pad max width and height values for FT6x36 Touch*/ +#define FT_6206_MAX_WIDTH_HEIGHT ((uint16_t)240) + + /* Possible values of driver functions return status */ +#define FT6206_STATUS_OK 0 +#define FT6206_STATUS_NOT_OK 1 + + /* Possible values of global variable 'TS_I2C_Initialized' */ +#define FT6206_I2C_NOT_INITIALIZED 0 +#define FT6206_I2C_INITIALIZED 1 + + /* Max detectable simultaneous touches */ +#define FT6206_MAX_DETECTABLE_TOUCH 2 + + /** + * @brief : Definitions for FT6206 I2C register addresses on 8 bit + **/ + + /* Current mode register of the FT6206 (R/W) */ +#define FT6206_DEV_MODE_REG 0x00 + + /* Possible values of FT6206_DEV_MODE_REG */ +#define FT6206_DEV_MODE_WORKING 0x00 +#define FT6206_DEV_MODE_FACTORY 0x04 + +#define FT6206_DEV_MODE_MASK 0x7 +#define FT6206_DEV_MODE_SHIFT 4 + + /* Gesture ID register */ +#define FT6206_GEST_ID_REG 0x01 + + /* Possible values of FT6206_GEST_ID_REG */ +#define FT6206_GEST_ID_NO_GESTURE 0x00 +#define FT6206_GEST_ID_MOVE_UP 0x10 +#define FT6206_GEST_ID_MOVE_RIGHT 0x14 +#define FT6206_GEST_ID_MOVE_DOWN 0x18 +#define FT6206_GEST_ID_MOVE_LEFT 0x1C +#define FT6206_GEST_ID_ZOOM_IN 0x48 +#define FT6206_GEST_ID_ZOOM_OUT 0x49 + + /* Touch Data Status register : gives number of active touch points (0..2) */ +#define FT6206_TD_STAT_REG 0x02 + + /* Values related to FT6206_TD_STAT_REG */ +#define FT6206_TD_STAT_MASK 0x0F +#define FT6206_TD_STAT_SHIFT 0x00 + + /* Values Pn_XH and Pn_YH related */ +#define FT6206_TOUCH_EVT_FLAG_PRESS_DOWN 0x00 +#define FT6206_TOUCH_EVT_FLAG_LIFT_UP 0x01 +#define FT6206_TOUCH_EVT_FLAG_CONTACT 0x02 +#define FT6206_TOUCH_EVT_FLAG_NO_EVENT 0x03 + +#define FT6206_TOUCH_EVT_FLAG_SHIFT 6 +#define FT6206_TOUCH_EVT_FLAG_MASK (3 << FT6206_TOUCH_EVT_FLAG_SHIFT) + +#define FT6206_MSB_MASK 0x0F +#define FT6206_MSB_SHIFT 0 + + /* Values Pn_XL and Pn_YL related */ +#define FT6206_LSB_MASK 0xFF +#define FT6206_LSB_SHIFT 0 + +#define FT6206_P1_XH_REG 0x03 +#define FT6206_P1_XL_REG 0x04 +#define FT6206_P1_YH_REG 0x05 +#define FT6206_P1_YL_REG 0x06 + + /* Touch Pressure register value (R) */ +#define FT6206_P1_WEIGHT_REG 0x07 + + /* Values Pn_WEIGHT related */ +#define FT6206_TOUCH_WEIGHT_MASK 0xFF +#define FT6206_TOUCH_WEIGHT_SHIFT 0 + + /* Touch area register */ +#define FT6206_P1_MISC_REG 0x08 + + /* Values related to FT6206_Pn_MISC_REG */ +#define FT6206_TOUCH_AREA_MASK (0x04 << 4) +#define FT6206_TOUCH_AREA_SHIFT 0x04 + +#define FT6206_P2_XH_REG 0x09 +#define FT6206_P2_XL_REG 0x0A +#define FT6206_P2_YH_REG 0x0B +#define FT6206_P2_YL_REG 0x0C +#define FT6206_P2_WEIGHT_REG 0x0D +#define FT6206_P2_MISC_REG 0x0E + + /* Threshold for touch detection */ +#define FT6206_TH_GROUP_REG 0x80 + + /* Values FT6206_TH_GROUP_REG : threshold related */ +#define FT6206_THRESHOLD_MASK 0xFF +#define FT6206_THRESHOLD_SHIFT 0 + + /* Filter function coefficients */ +#define FT6206_TH_DIFF_REG 0x85 + + /* Control register */ +#define FT6206_CTRL_REG 0x86 + + /* Values related to FT6206_CTRL_REG */ + + /* Will keep the Active mode when there is no touching */ +#define FT6206_CTRL_KEEP_ACTIVE_MODE 0x00 + + /* Switching from Active mode to Monitor mode automatically when there is no touching */ +#define FT6206_CTRL_KEEP_AUTO_SWITCH_MONITOR_MODE 0x01 + + /* The time period of switching from Active mode to Monitor mode when there is no touching */ +#define FT6206_TIMEENTERMONITOR_REG 0x87 + + /* Report rate in Active mode */ +#define FT6206_PERIODACTIVE_REG 0x88 + + /* Report rate in Monitor mode */ +#define FT6206_PERIODMONITOR_REG 0x89 + + /* The value of the minimum allowed angle while Rotating gesture mode */ +#define FT6206_RADIAN_VALUE_REG 0x91 + + /* Maximum offset while Moving Left and Moving Right gesture */ +#define FT6206_OFFSET_LEFT_RIGHT_REG 0x92 + + /* Maximum offset while Moving Up and Moving Down gesture */ +#define FT6206_OFFSET_UP_DOWN_REG 0x93 + + /* Minimum distance while Moving Left and Moving Right gesture */ +#define FT6206_DISTANCE_LEFT_RIGHT_REG 0x94 + + /* Minimum distance while Moving Up and Moving Down gesture */ +#define FT6206_DISTANCE_UP_DOWN_REG 0x95 + + /* Maximum distance while Zoom In and Zoom Out gesture */ +#define FT6206_DISTANCE_ZOOM_REG 0x96 + + /* High 8-bit of LIB Version info */ +#define FT6206_LIB_VER_H_REG 0xA1 + + /* Low 8-bit of LIB Version info */ +#define FT6206_LIB_VER_L_REG 0xA2 + + /* Chip Selecting */ +#define FT6206_CIPHER_REG 0xA3 + + /* Interrupt mode register (used when in interrupt mode) */ +#define FT6206_GMODE_REG 0xA4 + +#define FT6206_G_MODE_INTERRUPT_MASK 0x03 +#define FT6206_G_MODE_INTERRUPT_SHIFT 0x00 + + /* Possible values of FT6206_GMODE_REG */ +#define FT6206_G_MODE_INTERRUPT_POLLING 0x00 +#define FT6206_G_MODE_INTERRUPT_TRIGGER 0x01 + + /* Current power mode the FT6206 system is in (R) */ +#define FT6206_PWR_MODE_REG 0xA5 + + /* FT6206 firmware version */ +#define FT6206_FIRMID_REG 0xA6 + + /* FT6206 Chip identification register */ +#define FT6206_CHIP_ID_REG 0xA8 + + /* Possible values of FT6206_CHIP_ID_REG */ +#define FT6206_ID_VALUE 0x11 +#define FT6x36_ID_VALUE 0xCD + + /* Release code version */ +#define FT6206_RELEASE_CODE_ID_REG 0xAF + + /* Current operating mode the FT6206 system is in (R) */ +#define FT6206_STATE_REG 0xBC + + /** + * @} + */ + + /* Exported macro ------------------------------------------------------------*/ + + /** @defgroup ft6x06_Exported_Macros + * @{ + */ + + /* Exported functions --------------------------------------------------------*/ + + /** @defgroup ft6x06_Exported_Functions + * @{ + */ + + /** + * @brief ft6x06 Control functions + */ + + +/** + * @brief Initialize the ft6x06 communication bus + * from MCU to FT6206 : ie I2C channel initialization (if required). + * @param DeviceAddr: Device address on communication Bus (I2C slave address of FT6206). + * @retval None + */ +void ft6x06_Init(uint16_t DeviceAddr); + +/** + * @brief Software Reset the ft6x06. + * @param DeviceAddr: Device address on communication Bus (I2C slave address of FT6206). + * @retval None + */ +void ft6x06_Reset(uint16_t DeviceAddr); + +/** + * @brief Read the ft6x06 device ID, pre intitalize I2C in case of need to be + * able to read the FT6206 device ID, and verify this is a FT6206. + * @param DeviceAddr: I2C FT6x06 Slave address. + * @retval The Device ID (two bytes). + */ +uint16_t ft6x06_ReadID(uint16_t DeviceAddr); + +/** + * @brief Configures the touch Screen IC device to start detecting touches + * @param DeviceAddr: Device address on communication Bus (I2C slave address). + * @retval None. + */ +void ft6x06_TS_Start(uint16_t DeviceAddr); + +/** + * @brief Return if there is touches detected or not. + * Try to detect new touches and forget the old ones (reset internal global + * variables). + * @param DeviceAddr: Device address on communication Bus. + * @retval : Number of active touches detected (can be 0, 1 or 2). + */ +uint8_t ft6x06_TS_DetectTouch(uint16_t DeviceAddr); + +/** + * @brief Get the touch screen X and Y positions values + * Manage multi touch thanks to touch Index global + * variable 'ft6x06_handle.currActiveTouchIdx'. + * @param DeviceAddr: Device address on communication Bus. + * @param X: Pointer to X position value + * @param Y: Pointer to Y position value + * @retval None. + */ +void ft6x06_TS_GetXY(uint16_t DeviceAddr, uint16_t *X, uint16_t *Y); + +/** + * @brief Configure the FT6206 device to generate IT on given INT pin + * connected to MCU as EXTI. + * @param DeviceAddr: Device address on communication Bus (Slave I2C address of FT6206). + * @retval None + */ +void ft6x06_TS_EnableIT(uint16_t DeviceAddr); + +/** + * @brief Configure the FT6206 device to stop generating IT on the given INT pin + * connected to MCU as EXTI. + * @param DeviceAddr: Device address on communication Bus (Slave I2C address of FT6206). + * @retval None + */ +void ft6x06_TS_DisableIT(uint16_t DeviceAddr); + +/** + * @brief Get IT status from FT6206 interrupt status registers + * Should be called Following an EXTI coming to the MCU to know the detailed + * reason of the interrupt. + * @param DeviceAddr: Device address on communication Bus (I2C slave address of FT6206). + * @retval TS interrupts status + */ +uint8_t ft6x06_TS_ITStatus (uint16_t DeviceAddr); + +/** + * @brief Clear IT status in FT6206 interrupt status clear registers + * Should be called Following an EXTI coming to the MCU. + * @param DeviceAddr: Device address on communication Bus (I2C slave address of FT6206). + * @retval TS interrupts status + */ +void ft6x06_TS_ClearIT (uint16_t DeviceAddr); + +/**** NEW FEATURES enabled when Multi-touch support is enabled ****/ + +#if (TS_MULTI_TOUCH_SUPPORTED == 1) + +/** + * @brief Get the last touch gesture identification (zoom, move up/down...). + * @param DeviceAddr: Device address on communication Bus (I2C slave address of FT6x06). + * @param pGestureId : Pointer to get last touch gesture Identification. + * @retval None. + */ +void ft6x06_TS_GetGestureID(uint16_t DeviceAddr, uint32_t * pGestureId); + +/** + * @brief Get the touch detailed informations on touch number 'touchIdx' (0..1) + * This touch detailed information contains : + * - weight that was applied to this touch + * - sub-area of the touch in the touch panel + * - event of linked to the touch (press down, lift up, ...) + * @param DeviceAddr: Device address on communication Bus (I2C slave address of FT6x06). + * @param touchIdx : Passed index of the touch (0..1) on which we want to get the + * detailed information. + * @param pWeight : Pointer to to get the weight information of 'touchIdx'. + * @param pArea : Pointer to to get the sub-area information of 'touchIdx'. + * @param pEvent : Pointer to to get the event information of 'touchIdx'. + + * @retval None. + */ +void ft6x06_TS_GetTouchInfo(uint16_t DeviceAddr, + uint32_t touchIdx, + uint32_t * pWeight, + uint32_t * pArea, + uint32_t * pEvent); + +#endif /* TS_MULTI_TOUCH_SUPPORTED == 1 */ + +/* Imported TS IO functions --------------------------------------------------------*/ + +/** @defgroup ft6x06_Imported_Functions + * @{ + */ + +/* TouchScreen (TS) external IO functions */ +extern void TS_IO_Init(void); +extern void TS_IO_Write(uint8_t Addr, uint8_t Reg, uint8_t Value); +extern uint8_t TS_IO_Read(uint8_t Addr, uint8_t Reg); +extern uint16_t TS_IO_ReadMultiple(uint8_t Addr, uint8_t Reg, uint8_t *Buffer, uint16_t Length); +extern void TS_IO_Delay(uint32_t Delay); + + /** + * @} + */ + + /* Imported global variables --------------------------------------------------------*/ + + /** @defgroup ft6x06_Imported_Globals + * @{ + */ + + +/* Touch screen driver structure */ +extern TS_DrvTypeDef ft6x06_ts_drv; + + /** + * @} + */ + +#ifdef __cplusplus +} +#endif +#endif /* __FT6X06_H */ + + +/** + * @} + */ + +/** + * @} + */ + +/** + * @} + */ + +/** + * @} + */ +/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Drivers/BSP/Components/n25q128a/n25q128a.h Tue May 16 10:50:26 2017 +0200 @@ -0,0 +1,219 @@ +/** + ****************************************************************************** + * @file n25q128a.h + * @author MCD Application Team + * @version V1.0.0 + * @date 29-May-2015 + * @brief This file contains all the description of the N25Q128A QSPI memory. + ****************************************************************************** + * @attention + * + * <h2><center>© COPYRIGHT(c) 2015 STMicroelectronics</center></h2> + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * 3. Neither the name of STMicroelectronics nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + ****************************************************************************** + */ + +/* Define to prevent recursive inclusion -------------------------------------*/ +#ifndef __N25Q128A_H +#define __N25Q128A_H + +#ifdef __cplusplus + extern "C" { +#endif + +/* Includes ------------------------------------------------------------------*/ + +/** @addtogroup BSP + * @{ + */ + +/** @addtogroup Components + * @{ + */ + +/** @addtogroup n25q128a + * @{ + */ + +/** @defgroup N25Q128A_Exported_Types + * @{ + */ + +/** + * @} + */ + +/** @defgroup N25Q128A_Exported_Constants + * @{ + */ + +/** + * @brief N25Q128A Configuration + */ +#define N25Q128A_FLASH_SIZE 0x1000000 /* 128 MBits => 16MBytes */ +#define N25Q128A_SECTOR_SIZE 0x10000 /* 256 sectors of 64KBytes */ +#define N25Q128A_SUBSECTOR_SIZE 0x1000 /* 4096 subsectors of 4kBytes */ +#define N25Q128A_PAGE_SIZE 0x100 /* 65536 pages of 256 bytes */ + +#define N25Q128A_DUMMY_CYCLES_READ 8 +#define N25Q128A_DUMMY_CYCLES_READ_QUAD 10 + +#define N25Q128A_BULK_ERASE_MAX_TIME 250000 +#define N25Q128A_SECTOR_ERASE_MAX_TIME 3000 +#define N25Q128A_SUBSECTOR_ERASE_MAX_TIME 800 + +/** + * @brief N25Q128A Commands + */ +/* Reset Operations */ +#define RESET_ENABLE_CMD 0x66 +#define RESET_MEMORY_CMD 0x99 + +/* Identification Operations */ +#define READ_ID_CMD 0x9E +#define READ_ID_CMD2 0x9F +#define MULTIPLE_IO_READ_ID_CMD 0xAF +#define READ_SERIAL_FLASH_DISCO_PARAM_CMD 0x5A + +/* Read Operations */ +#define READ_CMD 0x03 +#define FAST_READ_CMD 0x0B +#define DUAL_OUT_FAST_READ_CMD 0x3B +#define DUAL_INOUT_FAST_READ_CMD 0xBB +#define QUAD_OUT_FAST_READ_CMD 0x6B +#define QUAD_INOUT_FAST_READ_CMD 0xEB + +/* Write Operations */ +#define WRITE_ENABLE_CMD 0x06 +#define WRITE_DISABLE_CMD 0x04 + +/* Register Operations */ +#define READ_STATUS_REG_CMD 0x05 +#define WRITE_STATUS_REG_CMD 0x01 + +#define READ_LOCK_REG_CMD 0xE8 +#define WRITE_LOCK_REG_CMD 0xE5 + +#define READ_FLAG_STATUS_REG_CMD 0x70 +#define CLEAR_FLAG_STATUS_REG_CMD 0x50 + +#define READ_NONVOL_CFG_REG_CMD 0xB5 +#define WRITE_NONVOL_CFG_REG_CMD 0xB1 + +#define READ_VOL_CFG_REG_CMD 0x85 +#define WRITE_VOL_CFG_REG_CMD 0x81 + +#define READ_ENHANCED_VOL_CFG_REG_CMD 0x65 +#define WRITE_ENHANCED_VOL_CFG_REG_CMD 0x61 + +/* Program Operations */ +#define PAGE_PROG_CMD 0x02 +#define DUAL_IN_FAST_PROG_CMD 0xA2 +#define EXT_DUAL_IN_FAST_PROG_CMD 0xD2 +#define QUAD_IN_FAST_PROG_CMD 0x32 +#define EXT_QUAD_IN_FAST_PROG_CMD 0x12 + +/* Erase Operations */ +#define SUBSECTOR_ERASE_CMD 0x20 +#define SECTOR_ERASE_CMD 0xD8 +#define BULK_ERASE_CMD 0xC7 + +#define PROG_ERASE_RESUME_CMD 0x7A +#define PROG_ERASE_SUSPEND_CMD 0x75 + +/* One-Time Programmable Operations */ +#define READ_OTP_ARRAY_CMD 0x4B +#define PROG_OTP_ARRAY_CMD 0x42 + +/** + * @brief N25Q128A Registers + */ +/* Status Register */ +#define N25Q128A_SR_WIP ((uint8_t)0x01) /*!< Write in progress */ +#define N25Q128A_SR_WREN ((uint8_t)0x02) /*!< Write enable latch */ +#define N25Q128A_SR_BLOCKPR ((uint8_t)0x5C) /*!< Block protected against program and erase operations */ +#define N25Q128A_SR_PRBOTTOM ((uint8_t)0x20) /*!< Protected memory area defined by BLOCKPR starts from top or bottom */ +#define N25Q128A_SR_SRWREN ((uint8_t)0x80) /*!< Status register write enable/disable */ + +/* Nonvolatile Configuration Register */ +#define N25Q128A_NVCR_LOCK ((uint16_t)0x0001) /*!< Lock nonvolatile configuration register */ +#define N25Q128A_NVCR_DUAL ((uint16_t)0x0004) /*!< Dual I/O protocol */ +#define N25Q128A_NVCR_QUAB ((uint16_t)0x0008) /*!< Quad I/O protocol */ +#define N25Q128A_NVCR_RH ((uint16_t)0x0010) /*!< Reset/hold */ +#define N25Q128A_NVCR_ODS ((uint16_t)0x01C0) /*!< Output driver strength */ +#define N25Q128A_NVCR_XIP ((uint16_t)0x0E00) /*!< XIP mode at power-on reset */ +#define N25Q128A_NVCR_NB_DUMMY ((uint16_t)0xF000) /*!< Number of dummy clock cycles */ + +/* Volatile Configuration Register */ +#define N25Q128A_VCR_WRAP ((uint8_t)0x03) /*!< Wrap */ +#define N25Q128A_VCR_XIP ((uint8_t)0x08) /*!< XIP */ +#define N25Q128A_VCR_NB_DUMMY ((uint8_t)0xF0) /*!< Number of dummy clock cycles */ + +/* Enhanced Volatile Configuration Register */ +#define N25Q128A_EVCR_ODS ((uint8_t)0x07) /*!< Output driver strength */ +#define N25Q128A_EVCR_VPPA ((uint8_t)0x08) /*!< Vpp accelerator */ +#define N25Q128A_EVCR_RH ((uint8_t)0x10) /*!< Reset/hold */ +#define N25Q128A_EVCR_DUAL ((uint8_t)0x40) /*!< Dual I/O protocol */ +#define N25Q128A_EVCR_QUAD ((uint8_t)0x80) /*!< Quad I/O protocol */ + +/* Flag Status Register */ +#define N25Q128A_FSR_PRERR ((uint8_t)0x02) /*!< Protection error */ +#define N25Q128A_FSR_PGSUS ((uint8_t)0x04) /*!< Program operation suspended */ +#define N25Q128A_FSR_VPPERR ((uint8_t)0x08) /*!< Invalid voltage during program or erase */ +#define N25Q128A_FSR_PGERR ((uint8_t)0x10) /*!< Program error */ +#define N25Q128A_FSR_ERERR ((uint8_t)0x20) /*!< Erase error */ +#define N25Q128A_FSR_ERSUS ((uint8_t)0x40) /*!< Erase operation suspended */ +#define N25Q128A_FSR_READY ((uint8_t)0x80) /*!< Ready or command in progress */ + +/** + * @} + */ + +/** @defgroup N25Q128A_Exported_Functions + * @{ + */ +/** + * @} + */ + +/** + * @} + */ + +/** + * @} + */ + +/** + * @} + */ + +#ifdef __cplusplus +} +#endif + +#endif /* __N25Q128A_H */ + +/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Drivers/BSP/Components/otm8009a/otm8009a.c Tue May 16 10:50:26 2017 +0200 @@ -0,0 +1,454 @@ +/** + ****************************************************************************** + * @file otm8009a.c + * @author MCD Application Team + * @version V1.0.2 + * @date 27-January-2017 + * @brief This file provides the LCD Driver for KoD KM-040TMP-02-0621 (WVGA) + * DSI LCD Display OTM8009A. + ****************************************************************************** + * @attention + * + * <h2><center>© COPYRIGHT(c) 2017 STMicroelectronics</center></h2> + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * 3. Neither the name of STMicroelectronics nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + ****************************************************************************** + */ + +/* Includes ------------------------------------------------------------------*/ +#include "otm8009a.h" + +/** @addtogroup BSP + * @{ + */ + +/** @addtogroup Components + * @{ + */ + +/** @defgroup OTM8009A OTM8009A + * @brief This file provides a set of functions needed to drive the + * otm8009a IC display driver. + * @{ + */ + +/* Private types -------------------------------------------------------------*/ +/* Private variables ---------------------------------------------------------*/ +/* Private constants ---------------------------------------------------------*/ +/** @defgroup OTM8009A_Private_Constants OTM8009A Private Constants + * @{ + */ + +/* + * @brief Constant tables of register settings used to transmit DSI + * command packets as power up initialization sequence of the KoD LCD (OTM8009A LCD Driver) + */ +const uint8_t lcdRegData1[] = {0x80,0x09,0x01,0xFF}; +const uint8_t lcdRegData2[] = {0x80,0x09,0xFF}; +const uint8_t lcdRegData3[] = {0x00,0x09,0x0F,0x0E,0x07,0x10,0x0B,0x0A,0x04,0x07,0x0B,0x08,0x0F,0x10,0x0A,0x01,0xE1}; +const uint8_t lcdRegData4[] = {0x00,0x09,0x0F,0x0E,0x07,0x10,0x0B,0x0A,0x04,0x07,0x0B,0x08,0x0F,0x10,0x0A,0x01,0xE2}; +const uint8_t lcdRegData5[] = {0x79,0x79,0xD8}; +const uint8_t lcdRegData6[] = {0x00,0x01,0xB3}; +const uint8_t lcdRegData7[] = {0x85,0x01,0x00,0x84,0x01,0x00,0xCE}; +const uint8_t lcdRegData8[] = {0x18,0x04,0x03,0x39,0x00,0x00,0x00,0x18,0x03,0x03,0x3A,0x00,0x00,0x00,0xCE}; +const uint8_t lcdRegData9[] = {0x18,0x02,0x03,0x3B,0x00,0x00,0x00,0x18,0x01,0x03,0x3C,0x00,0x00,0x00,0xCE}; +const uint8_t lcdRegData10[] = {0x01,0x01,0x20,0x20,0x00,0x00,0x01,0x02,0x00,0x00,0xCF}; +const uint8_t lcdRegData11[] = {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xCB}; +const uint8_t lcdRegData12[] = {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xCB}; +const uint8_t lcdRegData13[] = {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xCB}; +const uint8_t lcdRegData14[] = {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xCB}; +const uint8_t lcdRegData15[] = {0x00,0x04,0x04,0x04,0x04,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xCB}; +const uint8_t lcdRegData16[] = {0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x04,0x04,0x04,0x04,0x00,0x00,0x00,0x00,0xCB}; +const uint8_t lcdRegData17[] = {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xCB}; +const uint8_t lcdRegData18[] = {0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xCB}; +const uint8_t lcdRegData19[] = {0x00,0x26,0x09,0x0B,0x01,0x25,0x00,0x00,0x00,0x00,0xCC}; +const uint8_t lcdRegData20[] = {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x26,0x0A,0x0C,0x02,0xCC}; +const uint8_t lcdRegData21[] = {0x25,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xCC}; +const uint8_t lcdRegData22[] = {0x00,0x25,0x0C,0x0A,0x02,0x26,0x00,0x00,0x00,0x00,0xCC}; +const uint8_t lcdRegData23[] = {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x25,0x0B,0x09,0x01,0xCC}; +const uint8_t lcdRegData24[] = {0x26,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xCC}; +const uint8_t lcdRegData25[] = {0xFF,0xFF,0xFF,0xFF}; +/* + * CASET value (Column Address Set) : X direction LCD GRAM boundaries + * depending on LCD orientation mode and PASET value (Page Address Set) : Y direction + * LCD GRAM boundaries depending on LCD orientation mode + * XS[15:0] = 0x000 = 0, XE[15:0] = 0x31F = 799 for landscape mode : apply to CASET + * YS[15:0] = 0x000 = 0, YE[15:0] = 0x31F = 799 for portrait mode : : apply to PASET + */ +const uint8_t lcdRegData27[] = {0x00, 0x00, 0x03, 0x1F, OTM8009A_CMD_CASET}; +/* + * XS[15:0] = 0x000 = 0, XE[15:0] = 0x1DF = 479 for portrait mode : apply to CASET + * YS[15:0] = 0x000 = 0, YE[15:0] = 0x1DF = 479 for landscape mode : apply to PASET + */ +const uint8_t lcdRegData28[] = {0x00, 0x00, 0x01, 0xDF, OTM8009A_CMD_PASET}; + + +const uint8_t ShortRegData1[] = {OTM8009A_CMD_NOP, 0x00}; +const uint8_t ShortRegData2[] = {OTM8009A_CMD_NOP, 0x80}; +const uint8_t ShortRegData3[] = {0xC4, 0x30}; +const uint8_t ShortRegData4[] = {OTM8009A_CMD_NOP, 0x8A}; +const uint8_t ShortRegData5[] = {0xC4, 0x40}; +const uint8_t ShortRegData6[] = {OTM8009A_CMD_NOP, 0xB1}; +const uint8_t ShortRegData7[] = {0xC5, 0xA9}; +const uint8_t ShortRegData8[] = {OTM8009A_CMD_NOP, 0x91}; +const uint8_t ShortRegData9[] = {0xC5, 0x34}; +const uint8_t ShortRegData10[] = {OTM8009A_CMD_NOP, 0xB4}; +const uint8_t ShortRegData11[] = {0xC0, 0x50}; +const uint8_t ShortRegData12[] = {0xD9, 0x4E}; +const uint8_t ShortRegData13[] = {OTM8009A_CMD_NOP, 0x81}; +const uint8_t ShortRegData14[] = {0xC1, 0x66}; +const uint8_t ShortRegData15[] = {OTM8009A_CMD_NOP, 0xA1}; +const uint8_t ShortRegData16[] = {0xC1, 0x08}; +const uint8_t ShortRegData17[] = {OTM8009A_CMD_NOP, 0x92}; +const uint8_t ShortRegData18[] = {0xC5, 0x01}; +const uint8_t ShortRegData19[] = {OTM8009A_CMD_NOP, 0x95}; +const uint8_t ShortRegData20[] = {OTM8009A_CMD_NOP, 0x94}; +const uint8_t ShortRegData21[] = {0xC5, 0x33}; +const uint8_t ShortRegData22[] = {OTM8009A_CMD_NOP, 0xA3}; +const uint8_t ShortRegData23[] = {0xC0, 0x1B}; +const uint8_t ShortRegData24[] = {OTM8009A_CMD_NOP, 0x82}; +const uint8_t ShortRegData25[] = {0xC5, 0x83}; +const uint8_t ShortRegData26[] = {0xC4, 0x83}; +const uint8_t ShortRegData27[] = {0xC1, 0x0E}; +const uint8_t ShortRegData28[] = {OTM8009A_CMD_NOP, 0xA6}; +const uint8_t ShortRegData29[] = {OTM8009A_CMD_NOP, 0xA0}; +const uint8_t ShortRegData30[] = {OTM8009A_CMD_NOP, 0xB0}; +const uint8_t ShortRegData31[] = {OTM8009A_CMD_NOP, 0xC0}; +const uint8_t ShortRegData32[] = {OTM8009A_CMD_NOP, 0xD0}; +const uint8_t ShortRegData33[] = {OTM8009A_CMD_NOP, 0x90}; +const uint8_t ShortRegData34[] = {OTM8009A_CMD_NOP, 0xE0}; +const uint8_t ShortRegData35[] = {OTM8009A_CMD_NOP, 0xF0}; +const uint8_t ShortRegData36[] = {OTM8009A_CMD_SLPOUT, 0x00}; +const uint8_t ShortRegData37[] = {OTM8009A_CMD_COLMOD, OTM8009A_COLMOD_RGB565}; +const uint8_t ShortRegData38[] = {OTM8009A_CMD_COLMOD, OTM8009A_COLMOD_RGB888}; +const uint8_t ShortRegData39[] = {OTM8009A_CMD_MADCTR, OTM8009A_MADCTR_MODE_LANDSCAPE}; +const uint8_t ShortRegData40[] = {OTM8009A_CMD_WRDISBV, 0x7F}; +const uint8_t ShortRegData41[] = {OTM8009A_CMD_WRCTRLD, 0x2C}; +const uint8_t ShortRegData42[] = {OTM8009A_CMD_WRCABC, 0x02}; +const uint8_t ShortRegData43[] = {OTM8009A_CMD_WRCABCMB, 0xFF}; +const uint8_t ShortRegData44[] = {OTM8009A_CMD_DISPON, 0x00}; +const uint8_t ShortRegData45[] = {OTM8009A_CMD_RAMWR, 0x00}; +const uint8_t ShortRegData46[] = {0xCF, 0x00}; +const uint8_t ShortRegData47[] = {0xC5, 0x66}; +const uint8_t ShortRegData48[] = {OTM8009A_CMD_NOP, 0xB6}; +const uint8_t ShortRegData49[] = {0xF5, 0x06}; +const uint8_t ShortRegData50[] = {OTM8009A_CMD_NOP, 0xB1}; +const uint8_t ShortRegData51[] = {0xC6, 0x06}; +/** + * @} + */ + +/* Private macros ------------------------------------------------------------*/ +/* Private functions ---------------------------------------------------------*/ +/** @defgroup OTM8009A_Exported_Variables + * @{ + */ + +/** + * @} + */ + +/* Exported functions ---------------------------------------------------------*/ +/** @defgroup OTM8009A_Exported_Functions OTM8009A Exported Functions + * @{ + */ + +/** + * @brief DSI IO write short/long command. + * @note : Can be surcharged by application code implementation of the function. + */ +__weak void DSI_IO_WriteCmd(uint32_t NbrParams, uint8_t *pParams) +{ + /* NOTE : This function Should not be modified, when it is needed, + the DSI_IO_WriteCmd could be implemented in the user file + */ +} + +/** + * @brief Initializes the LCD KoD display part by communication in DSI mode in Video Mode + * with IC Display Driver OTM8009A (see IC Driver specification for more information). + * @param hdsi_eval : pointer on DSI configuration structure + * @param hdsivideo_handle : pointer on DSI video mode configuration structure + * @retval Status + */ +uint8_t OTM8009A_Init(uint32_t ColorCoding, uint32_t orientation) +{ + /* Enable CMD2 to access vendor specific commands */ + /* Enter in command 2 mode and set EXTC to enable address shift function (0x00) */ + DSI_IO_WriteCmd(0, (uint8_t *)ShortRegData1); + DSI_IO_WriteCmd( 3, (uint8_t *)lcdRegData1); + + /* Enter ORISE Command 2 */ + DSI_IO_WriteCmd(0, (uint8_t *)ShortRegData2); /* Shift address to 0x80 */ + DSI_IO_WriteCmd( 2, (uint8_t *)lcdRegData2); + + ///////////////////////////////////////////////////////////////////// + /* SD_PCH_CTRL - 0xC480h - 129th parameter - Default 0x00 */ + /* Set SD_PT */ + /* -> Source output level during porch and non-display area to GND */ + DSI_IO_WriteCmd(0, (uint8_t *)ShortRegData2); + DSI_IO_WriteCmd(0, (uint8_t *)ShortRegData3); + OTM8009A_IO_Delay(10); + /* Not documented */ + DSI_IO_WriteCmd(0, (uint8_t *)ShortRegData4); + DSI_IO_WriteCmd(0, (uint8_t *)ShortRegData5); + OTM8009A_IO_Delay(10); + ///////////////////////////////////////////////////////////////////// + + /* PWR_CTRL4 - 0xC4B0h - 178th parameter - Default 0xA8 */ + /* Set gvdd_en_test */ + /* -> enable GVDD test mode !!! */ + DSI_IO_WriteCmd(0, (uint8_t *)ShortRegData6); + DSI_IO_WriteCmd(0, (uint8_t *)ShortRegData7); + + /* PWR_CTRL2 - 0xC590h - 146th parameter - Default 0x79 */ + /* Set pump 4 vgh voltage */ + /* -> from 15.0v down to 13.0v */ + /* Set pump 5 vgh voltage */ + /* -> from -12.0v downto -9.0v */ + DSI_IO_WriteCmd(0, (uint8_t *)ShortRegData8); + DSI_IO_WriteCmd(0, (uint8_t *)ShortRegData9); + + /* P_DRV_M - 0xC0B4h - 181th parameter - Default 0x00 */ + /* -> Column inversion */ + DSI_IO_WriteCmd(0, (uint8_t *)ShortRegData10); + DSI_IO_WriteCmd(0, (uint8_t *)ShortRegData11); + + /* VCOMDC - 0xD900h - 1st parameter - Default 0x39h */ + /* VCOM Voltage settings */ + /* -> from -1.0000v downto -1.2625v */ + DSI_IO_WriteCmd(0, (uint8_t *)ShortRegData1); + DSI_IO_WriteCmd(0, (uint8_t *)ShortRegData12); + + /* Oscillator adjustment for Idle/Normal mode (LPDT only) set to 65Hz (default is 60Hz) */ + DSI_IO_WriteCmd(0, (uint8_t *)ShortRegData13); + DSI_IO_WriteCmd(0, (uint8_t *)ShortRegData14); + + /* Video mode internal */ + DSI_IO_WriteCmd(0, (uint8_t *)ShortRegData15); + DSI_IO_WriteCmd(0, (uint8_t *)ShortRegData16); + + /* PWR_CTRL2 - 0xC590h - 147h parameter - Default 0x00 */ + /* Set pump 4&5 x6 */ + /* -> ONLY VALID when PUMP4_EN_ASDM_HV = "0" */ + DSI_IO_WriteCmd(0, (uint8_t *)ShortRegData17); + DSI_IO_WriteCmd(0, (uint8_t *)ShortRegData18); + + /* PWR_CTRL2 - 0xC590h - 150th parameter - Default 0x33h */ + /* Change pump4 clock ratio */ + /* -> from 1 line to 1/2 line */ + DSI_IO_WriteCmd(0, (uint8_t *)ShortRegData19); + DSI_IO_WriteCmd(0, (uint8_t *)ShortRegData9); + + /* GVDD/NGVDD settings */ + DSI_IO_WriteCmd(0, (uint8_t *)ShortRegData1); + DSI_IO_WriteCmd( 2, (uint8_t *)lcdRegData5); + + /* PWR_CTRL2 - 0xC590h - 149th parameter - Default 0x33h */ + /* Rewrite the default value ! */ + DSI_IO_WriteCmd(0, (uint8_t *)ShortRegData20); + DSI_IO_WriteCmd(0, (uint8_t *)ShortRegData21); + + /* Panel display timing Setting 3 */ + DSI_IO_WriteCmd(0, (uint8_t *)ShortRegData22); + DSI_IO_WriteCmd(0, (uint8_t *)ShortRegData23); + + /* Power control 1 */ + DSI_IO_WriteCmd(0, (uint8_t *)ShortRegData24); + DSI_IO_WriteCmd(0, (uint8_t *)ShortRegData25); + + /* Source driver precharge */ + DSI_IO_WriteCmd(0, (uint8_t *)ShortRegData13); + DSI_IO_WriteCmd(0, (uint8_t *)ShortRegData26); + + DSI_IO_WriteCmd(0, (uint8_t *)ShortRegData15); + DSI_IO_WriteCmd(0, (uint8_t *)ShortRegData27); + + DSI_IO_WriteCmd(0, (uint8_t *)ShortRegData28); + DSI_IO_WriteCmd( 2, (uint8_t *)lcdRegData6); + + /* GOAVST */ + DSI_IO_WriteCmd(0, (uint8_t *)ShortRegData2); + DSI_IO_WriteCmd( 6, (uint8_t *)lcdRegData7); + + DSI_IO_WriteCmd(0, (uint8_t *)ShortRegData29); + DSI_IO_WriteCmd( 14, (uint8_t *)lcdRegData8); + + DSI_IO_WriteCmd(0, (uint8_t *)ShortRegData30); + DSI_IO_WriteCmd( 14, (uint8_t *)lcdRegData9); + + DSI_IO_WriteCmd(0, (uint8_t *)ShortRegData31); + DSI_IO_WriteCmd( 10, (uint8_t *)lcdRegData10); + + DSI_IO_WriteCmd(0, (uint8_t *)ShortRegData32); + DSI_IO_WriteCmd(0, (uint8_t *)ShortRegData46); + + DSI_IO_WriteCmd(0, (uint8_t *)ShortRegData2); + DSI_IO_WriteCmd( 10, (uint8_t *)lcdRegData11); + + DSI_IO_WriteCmd(0, (uint8_t *)ShortRegData33); + DSI_IO_WriteCmd( 15, (uint8_t *)lcdRegData12); + + DSI_IO_WriteCmd(0, (uint8_t *)ShortRegData29); + DSI_IO_WriteCmd( 15, (uint8_t *)lcdRegData13); + + DSI_IO_WriteCmd(0, (uint8_t *)ShortRegData30); + DSI_IO_WriteCmd( 10, (uint8_t *)lcdRegData14); + + DSI_IO_WriteCmd(0, (uint8_t *)ShortRegData31); + DSI_IO_WriteCmd( 15, (uint8_t *)lcdRegData15); + + DSI_IO_WriteCmd(0, (uint8_t *)ShortRegData32); + DSI_IO_WriteCmd( 15, (uint8_t *)lcdRegData16); + + DSI_IO_WriteCmd(0, (uint8_t *)ShortRegData34); + DSI_IO_WriteCmd( 10, (uint8_t *)lcdRegData17); + + DSI_IO_WriteCmd(0, (uint8_t *)ShortRegData35); + DSI_IO_WriteCmd( 10, (uint8_t *)lcdRegData18); + + DSI_IO_WriteCmd(0, (uint8_t *)ShortRegData2); + DSI_IO_WriteCmd( 10, (uint8_t *)lcdRegData19); + + DSI_IO_WriteCmd(0, (uint8_t *)ShortRegData33); + DSI_IO_WriteCmd( 15, (uint8_t *)lcdRegData20); + + DSI_IO_WriteCmd(0, (uint8_t *)ShortRegData29); + DSI_IO_WriteCmd( 15, (uint8_t *)lcdRegData21); + + DSI_IO_WriteCmd(0, (uint8_t *)ShortRegData30); + DSI_IO_WriteCmd( 10, (uint8_t *)lcdRegData22); + + DSI_IO_WriteCmd(0, (uint8_t *)ShortRegData31); + DSI_IO_WriteCmd( 15, (uint8_t *)lcdRegData23); + + DSI_IO_WriteCmd(0, (uint8_t *)ShortRegData32); + DSI_IO_WriteCmd( 15, (uint8_t *)lcdRegData24); + + ///////////////////////////////////////////////////////////////////////////// + /* PWR_CTRL1 - 0xc580h - 130th parameter - default 0x00 */ + /* Pump 1 min and max DM */ + DSI_IO_WriteCmd(0, (uint8_t *)ShortRegData13); + DSI_IO_WriteCmd(0, (uint8_t *)ShortRegData47); + DSI_IO_WriteCmd(0, (uint8_t *)ShortRegData48); + DSI_IO_WriteCmd(0, (uint8_t *)ShortRegData49); + ///////////////////////////////////////////////////////////////////////////// + + /* CABC LEDPWM frequency adjusted to 19,5kHz */ + DSI_IO_WriteCmd(0, (uint8_t *)ShortRegData50); + DSI_IO_WriteCmd(0, (uint8_t *)ShortRegData51); + + /* Exit CMD2 mode */ + DSI_IO_WriteCmd(0, (uint8_t *)ShortRegData1); + DSI_IO_WriteCmd( 3, (uint8_t *)lcdRegData25); + + /*************************************************************************** */ + /* Standard DCS Initialization TO KEEP CAN BE DONE IN HSDT */ + /*************************************************************************** */ + + /* NOP - goes back to DCS std command ? */ + DSI_IO_WriteCmd(0, (uint8_t *)ShortRegData1); + + /* Gamma correction 2.2+ table (HSDT possible) */ + DSI_IO_WriteCmd(0, (uint8_t *)ShortRegData1); + DSI_IO_WriteCmd( 16, (uint8_t *)lcdRegData3); + + /* Gamma correction 2.2- table (HSDT possible) */ + DSI_IO_WriteCmd(0, (uint8_t *)ShortRegData1); + DSI_IO_WriteCmd( 16, (uint8_t *)lcdRegData4); + + /* Send Sleep Out command to display : no parameter */ + DSI_IO_WriteCmd(0, (uint8_t *)ShortRegData36); + + /* Wait for sleep out exit */ + OTM8009A_IO_Delay(120); + + switch(ColorCoding) + { + case OTM8009A_FORMAT_RBG565 : + /* Set Pixel color format to RGB565 */ + DSI_IO_WriteCmd(0, (uint8_t *)ShortRegData37); + break; + case OTM8009A_FORMAT_RGB888 : + /* Set Pixel color format to RGB888 */ + DSI_IO_WriteCmd(0, (uint8_t *)ShortRegData38); + break; + default : + break; + } + + /* Send command to configure display in landscape orientation mode. By default + the orientation mode is portrait */ + if(orientation == OTM8009A_ORIENTATION_LANDSCAPE) + { + DSI_IO_WriteCmd(0, (uint8_t *)ShortRegData39); + DSI_IO_WriteCmd( 4, (uint8_t *)lcdRegData27); + DSI_IO_WriteCmd( 4, (uint8_t *)lcdRegData28); + } + + /** CABC : Content Adaptive Backlight Control section start >> */ + /* Note : defaut is 0 (lowest Brightness), 0xFF is highest Brightness, try 0x7F : intermediate value */ + DSI_IO_WriteCmd(0, (uint8_t *)ShortRegData40); + + /* defaut is 0, try 0x2C - Brightness Control Block, Display Dimming & BackLight on */ + DSI_IO_WriteCmd(0, (uint8_t *)ShortRegData41); + + /* defaut is 0, try 0x02 - image Content based Adaptive Brightness [Still Picture] */ + DSI_IO_WriteCmd(0, (uint8_t *)ShortRegData42); + + /* defaut is 0 (lowest Brightness), 0xFF is highest Brightness */ + DSI_IO_WriteCmd(0, (uint8_t *)ShortRegData43); + + /** CABC : Content Adaptive Backlight Control section end << */ + + /* Send Command Display On */ + DSI_IO_WriteCmd(0, (uint8_t *)ShortRegData44); + + /* NOP command */ + DSI_IO_WriteCmd(0, (uint8_t *)ShortRegData1); + + /* Send Command GRAM memory write (no parameters) : this initiates frame write via other DSI commands sent by */ + /* DSI host from LTDC incoming pixels in video mode */ + DSI_IO_WriteCmd(0, (uint8_t *)ShortRegData45); + + return 0; +} + +/** + * @} + */ + +/** + * @} + */ + +/** + * @} + */ + +/** + * @} + */ + +/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Drivers/BSP/Components/otm8009a/otm8009a.h Tue May 16 10:50:26 2017 +0200 @@ -0,0 +1,224 @@ +/** + ****************************************************************************** + * @file otm8009a.h + * @author MCD Application Team + * @version V1.0.2 + * @date 27-January-2017 + * @brief This file contains all the constants parameters for the OTM8009A + * which is the LCD Driver for KoD KM-040TMP-02-0621 (WVGA) + * DSI LCD Display. + ****************************************************************************** + * @attention + * + * <h2><center>© COPYRIGHT(c) 2017 STMicroelectronics</center></h2> + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * 3. Neither the name of STMicroelectronics nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + ****************************************************************************** + */ + +/* Define to prevent recursive inclusion -------------------------------------*/ +#ifndef __OTM8009A_H +#define __OTM8009A_H + +#ifdef __cplusplus + extern "C" { +#endif + +/* Includes ------------------------------------------------------------------*/ +#include <stdint.h> +/** @addtogroup BSP + * @{ + */ + +/** @addtogroup Components + * @{ + */ + +/** @addtogroup otm8009a + * @{ + */ + +/** @addtogroup OTM8009A_Exported_Variables + * @{ + */ + +#if defined ( __GNUC__ ) +#ifndef __weak +#define __weak __attribute__((weak)) +#endif /* __weak */ +#endif /* __GNUC__ */ + +/** + * @brief LCD_OrientationTypeDef + * Possible values of Display Orientation + */ +#define OTM8009A_ORIENTATION_PORTRAIT ((uint32_t)0x00) /* Portrait orientation choice of LCD screen */ +#define OTM8009A_ORIENTATION_LANDSCAPE ((uint32_t)0x01) /* Landscape orientation choice of LCD screen */ + +/** + * @brief Possible values of + * pixel data format (ie color coding) transmitted on DSI Data lane in DSI packets + */ +#define OTM8009A_FORMAT_RGB888 ((uint32_t)0x00) /* Pixel format chosen is RGB888 : 24 bpp */ +#define OTM8009A_FORMAT_RBG565 ((uint32_t)0x02) /* Pixel format chosen is RGB565 : 16 bpp */ + +/** + * @brief otm8009a_480x800 Size + */ + +/* Width and Height in Portrait mode */ +#define OTM8009A_480X800_WIDTH ((uint16_t)480) /* LCD PIXEL WIDTH */ +#define OTM8009A_480X800_HEIGHT ((uint16_t)800) /* LCD PIXEL HEIGHT */ + +/* Width and Height in Landscape mode */ +#define OTM8009A_800X480_WIDTH ((uint16_t)800) /* LCD PIXEL WIDTH */ +#define OTM8009A_800X480_HEIGHT ((uint16_t)480) /* LCD PIXEL HEIGHT */ + +/** + * @brief OTM8009A_480X800 Timing parameters for Portrait orientation mode + */ +#define OTM8009A_480X800_HSYNC ((uint16_t)2) /* Horizontal synchronization */ +#define OTM8009A_480X800_HBP ((uint16_t)34) /* Horizontal back porch */ +#define OTM8009A_480X800_HFP ((uint16_t)34) /* Horizontal front porch */ +#define OTM8009A_480X800_VSYNC ((uint16_t)1) /* Vertical synchronization */ +#define OTM8009A_480X800_VBP ((uint16_t)15) /* Vertical back porch */ +#define OTM8009A_480X800_VFP ((uint16_t)16) /* Vertical front porch */ + +/** + * @brief OTM8009A_800X480 Timing parameters for Landscape orientation mode + * Same values as for Portrait mode in fact. + */ +#define OTM8009A_800X480_HSYNC OTM8009A_480X800_VSYNC /* Horizontal synchronization */ +#define OTM8009A_800X480_HBP OTM8009A_480X800_VBP /* Horizontal back porch */ +#define OTM8009A_800X480_HFP OTM8009A_480X800_VFP /* Horizontal front porch */ +#define OTM8009A_800X480_VSYNC OTM8009A_480X800_HSYNC /* Vertical synchronization */ +#define OTM8009A_800X480_VBP OTM8009A_480X800_HBP /* Vertical back porch */ +#define OTM8009A_800X480_VFP OTM8009A_480X800_HFP /* Vertical front porch */ + + +/* List of OTM8009A used commands */ +/* Detailed in OTM8009A Data Sheet 'DATA_SHEET_OTM8009A_V0 92.pdf' */ +/* Version of 14 June 2012 */ +#define OTM8009A_CMD_NOP 0x00 /* NOP command */ +#define OTM8009A_CMD_SWRESET 0x01 /* Sw reset command */ +#define OTM8009A_CMD_RDDMADCTL 0x0B /* Read Display MADCTR command : read memory display access ctrl */ +#define OTM8009A_CMD_RDDCOLMOD 0x0C /* Read Display pixel format */ +#define OTM8009A_CMD_SLPIN 0x10 /* Sleep In command */ +#define OTM8009A_CMD_SLPOUT 0x11 /* Sleep Out command */ +#define OTM8009A_CMD_PTLON 0x12 /* Partial mode On command */ + +#define OTM8009A_CMD_DISPOFF 0x28 /* Display Off command */ +#define OTM8009A_CMD_DISPON 0x29 /* Display On command */ + +#define OTM8009A_CMD_CASET 0x2A /* Column address set command */ +#define OTM8009A_CMD_PASET 0x2B /* Page address set command */ + +#define OTM8009A_CMD_RAMWR 0x2C /* Memory (GRAM) write command */ +#define OTM8009A_CMD_RAMRD 0x2E /* Memory (GRAM) read command */ + +#define OTM8009A_CMD_PLTAR 0x30 /* Partial area command (4 parameters) */ + +#define OTM8009A_CMD_TEOFF 0x34 /* Tearing Effect Line Off command : command with no parameter */ + +#define OTM8009A_CMD_TEEON 0x35 /* Tearing Effect Line On command : command with 1 parameter 'TELOM' */ + +/* Parameter TELOM : Tearing Effect Line Output Mode : possible values */ +#define OTM8009A_TEEON_TELOM_VBLANKING_INFO_ONLY 0x00 +#define OTM8009A_TEEON_TELOM_VBLANKING_AND_HBLANKING_INFO 0x01 + +#define OTM8009A_CMD_MADCTR 0x36 /* Memory Access write control command */ + +/* Possible used values of MADCTR */ +#define OTM8009A_MADCTR_MODE_PORTRAIT 0x00 +#define OTM8009A_MADCTR_MODE_LANDSCAPE 0x60 /* MY = 0, MX = 1, MV = 1, ML = 0, RGB = 0 */ + +#define OTM8009A_CMD_IDMOFF 0x38 /* Idle mode Off command */ +#define OTM8009A_CMD_IDMON 0x39 /* Idle mode On command */ + +#define OTM8009A_CMD_COLMOD 0x3A /* Interface Pixel format command */ + +/* Possible values of COLMOD parameter corresponding to used pixel formats */ +#define OTM8009A_COLMOD_RGB565 0x55 +#define OTM8009A_COLMOD_RGB888 0x77 + +#define OTM8009A_CMD_RAMWRC 0x3C /* Memory write continue command */ +#define OTM8009A_CMD_RAMRDC 0x3E /* Memory read continue command */ + +#define OTM8009A_CMD_WRTESCN 0x44 /* Write Tearing Effect Scan line command */ +#define OTM8009A_CMD_RDSCNL 0x45 /* Read Tearing Effect Scan line command */ + +/* CABC Management : ie : Content Adaptive Back light Control in IC OTM8009a */ +#define OTM8009A_CMD_WRDISBV 0x51 /* Write Display Brightness command */ +#define OTM8009A_CMD_WRCTRLD 0x53 /* Write CTRL Display command */ +#define OTM8009A_CMD_WRCABC 0x55 /* Write Content Adaptive Brightness command */ +#define OTM8009A_CMD_WRCABCMB 0x5E /* Write CABC Minimum Brightness command */ + +/** + * @brief OTM8009A_480X800 frequency divider + */ +#define OTM8009A_480X800_FREQUENCY_DIVIDER 2 /* LCD Frequency divider */ + +/** + * @} + */ + +/* Exported macro ------------------------------------------------------------*/ + +/** @defgroup OTM8009A_Exported_Macros OTM8009A Exported Macros + * @{ + */ + +/** + * @} + */ + +/* Exported functions --------------------------------------------------------*/ + +/** @addtogroup OTM8009A_Exported_Functions + * @{ + */ +void DSI_IO_WriteCmd(uint32_t NbrParams, uint8_t *pParams); +uint8_t OTM8009A_Init(uint32_t ColorCoding, uint32_t orientation); +void OTM8009A_IO_Delay(uint32_t Delay); +/** + * @} + */ +#ifdef __cplusplus +} +#endif + +#endif /* __OTM8009A_480X800_H */ +/** + * @} + */ + +/** + * @} + */ + +/** + * @} + */ + +/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Drivers/BSP/STM32469I-Discovery/stm32469i_discovery.c Tue May 16 10:50:26 2017 +0200 @@ -0,0 +1,938 @@ +/** + ****************************************************************************** + * @file stm32469i_discovery.c + * @author MCD Application Team + * @version V2.0.0 + * @date 27-January-2017 + * @brief This file provides a set of firmware functions to manage LEDs, + * push-buttons, external SDRAM, external QSPI Flash, RF EEPROM, + * available on STM32469I-Discovery + * board (MB1189) RevA/B from STMicroelectronics. + ****************************************************************************** + * @attention + * + * <h2><center>© COPYRIGHT(c) 2017 STMicroelectronics</center></h2> + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * 3. Neither the name of STMicroelectronics nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + ****************************************************************************** + */ + +/* Includes ------------------------------------------------------------------*/ +#include "stm32469i_discovery.h" + +/** @defgroup BSP BSP + * @{ + */ + +/** @defgroup STM32469I_Discovery STM32469I Discovery + * @{ + */ + +/** @defgroup STM32469I_Discovery_LOW_LEVEL STM32469I Discovery LOW LEVEL + * @{ + */ + +/** @defgroup STM32469I_Discovery_LOW_LEVEL_Private_TypesDefinitions STM32469I Discovery LOW LEVEL Private TypesDefinitions + * @{ + */ +/** + * @} + */ + +/** @defgroup STM32469I_Discovery_LOW_LEVEL_Private_Defines STM32469I Discovery LOW LEVEL Private Defines + * @{ + */ +/** + * @brief STM32469I Discovery BSP Driver version number V2.0.0 + */ +#define __STM32469I_DISCOVERY_BSP_VERSION_MAIN (0x02) /*!< [31:24] main version */ +#define __STM32469I_DISCOVERY_BSP_VERSION_SUB1 (0x00) /*!< [23:16] sub1 version */ +#define __STM32469I_DISCOVERY_BSP_VERSION_SUB2 (0x00) /*!< [15:8] sub2 version */ +#define __STM32469I_DISCOVERY_BSP_VERSION_RC (0x00) /*!< [7:0] release candidate */ +#define __STM32469I_DISCOVERY_BSP_VERSION ((__STM32469I_DISCOVERY_BSP_VERSION_MAIN << 24)\ + |(__STM32469I_DISCOVERY_BSP_VERSION_SUB1 << 16)\ + |(__STM32469I_DISCOVERY_BSP_VERSION_SUB2 << 8 )\ + |(__STM32469I_DISCOVERY_BSP_VERSION_RC)) +/** + * @} + */ + +/** @defgroup STM32469I_Discovery_LOW_LEVEL_Private_Macros STM32469I Discovery LOW LEVEL Private Macros + * @{ + */ +/** + * @} + */ + +/** @defgroup STM32469I_Discovery_LOW_LEVEL_Private_Variables STM32469I Discovery LOW LEVEL Private Variables + * @{ + */ +uint32_t GPIO_PIN[LEDn] = {LED1_PIN, + LED2_PIN, + LED3_PIN, + LED4_PIN}; + +GPIO_TypeDef* GPIO_PORT[LEDn] = {LED1_GPIO_PORT, + LED2_GPIO_PORT, + LED3_GPIO_PORT, + LED4_GPIO_PORT}; + +GPIO_TypeDef* BUTTON_PORT[BUTTONn] = {WAKEUP_BUTTON_GPIO_PORT }; + +const uint16_t BUTTON_PIN[BUTTONn] = {WAKEUP_BUTTON_PIN }; + +const uint16_t BUTTON_IRQn[BUTTONn] = {WAKEUP_BUTTON_EXTI_IRQn }; + + +static I2C_HandleTypeDef heval_I2c1; +static I2C_HandleTypeDef heval_I2c2; + +/** + * @} + */ + +/** @defgroup STM32469I_Discovery_LOW_LEVEL_Private_FunctionPrototypes STM32469I Discovery LOW LEVEL Private FunctionPrototypes + * @{ + */ +static void I2C1_MspInit(void); +static void I2C2_MspInit(void); +static void I2C1_Init(void); +static void I2C2_Init(void); + +#if defined(USE_IOEXPANDER) +static void I2C1_Write(uint8_t Addr, uint8_t Reg, uint8_t Value); +static uint8_t I2C1_Read(uint8_t Addr, uint8_t Reg); +#endif /* USE_IOEXPANDER */ +static HAL_StatusTypeDef I2C1_ReadMultiple(uint8_t Addr, uint16_t Reg, uint16_t MemAddSize, uint8_t *Buffer, uint16_t Length); +static HAL_StatusTypeDef I2C2_ReadMultiple(uint8_t Addr, uint16_t Reg, uint16_t MemAddSize, uint8_t *Buffer, uint16_t Length); +static HAL_StatusTypeDef I2C1_WriteMultiple(uint8_t Addr, uint16_t Reg, uint16_t MemAddSize, uint8_t *Buffer, uint16_t Length); +static HAL_StatusTypeDef I2C2_WriteMultiple(uint8_t Addr, uint16_t Reg, uint16_t MemAddSize, uint8_t *Buffer, uint16_t Length); +static HAL_StatusTypeDef I2C1_IsDeviceReady(uint16_t DevAddress, uint32_t Trials); +static void I2C1_Error(uint8_t Addr); +static void I2C2_Error(uint8_t Addr); + +/* AUDIO IO functions */ +void AUDIO_IO_Init(void); +void AUDIO_IO_DeInit(void); +void AUDIO_IO_Write(uint8_t Addr, uint8_t Reg, uint8_t Value); +uint8_t AUDIO_IO_Read(uint8_t Addr, uint8_t Reg); +void AUDIO_IO_Delay(uint32_t Delay); + + +/* I2C EEPROM IO function */ +void EEPROM_IO_Init(void); +HAL_StatusTypeDef EEPROM_IO_WriteData(uint16_t DevAddress, uint16_t MemAddress, uint8_t* pBuffer, uint32_t BufferSize); +HAL_StatusTypeDef EEPROM_IO_ReadData(uint16_t DevAddress, uint16_t MemAddress, uint8_t* pBuffer, uint32_t BufferSize); +HAL_StatusTypeDef EEPROM_IO_IsDeviceReady(uint16_t DevAddress, uint32_t Trials); + +/* TouchScreen (TS) IO functions */ +void TS_IO_Init(void); +void TS_IO_Write(uint8_t Addr, uint8_t Reg, uint8_t Value); +uint8_t TS_IO_Read(uint8_t Addr, uint8_t Reg); +uint16_t TS_IO_ReadMultiple(uint8_t Addr, uint8_t Reg, uint8_t *Buffer, uint16_t Length); +void TS_IO_WriteMultiple(uint8_t Addr, uint8_t Reg, uint8_t *Buffer, uint16_t Length); +void TS_IO_Delay(uint32_t Delay); +void OTM8009A_IO_Delay(uint32_t Delay); +/** + * @} + */ + +/** @defgroup STM32469I_Discovery_BSP_Public_Functions STM32469I Discovery BSP Public Functions + * @{ + */ + + /** + * @brief This method returns the STM32469I Discovery BSP Driver revision + * @retval version: 0xXYZR (8bits for each decimal, R for RC) + */ +uint32_t BSP_GetVersion(void) +{ + return __STM32469I_DISCOVERY_BSP_VERSION; +} + +/** + * @brief Configures LED GPIO. + * @param Led: LED to be configured. + * This parameter can be one of the following values: + * @arg LED1 + * @arg LED2 + * @arg LED3 + * @arg LED4 + */ +void BSP_LED_Init(Led_TypeDef Led) +{ + GPIO_InitTypeDef gpio_init_structure; + + if (Led <= DISCO_LED4) + { + /* Configure the GPIO_LED pin */ + gpio_init_structure.Pin = GPIO_PIN[Led]; + gpio_init_structure.Mode = GPIO_MODE_OUTPUT_PP; + gpio_init_structure.Pull = GPIO_PULLUP; + gpio_init_structure.Speed = GPIO_SPEED_HIGH; + + switch(Led) + { + case DISCO_LED1 : + LED1_GPIO_CLK_ENABLE(); + break; + case DISCO_LED2 : + LED2_GPIO_CLK_ENABLE(); + break; + case DISCO_LED3 : + LED3_GPIO_CLK_ENABLE(); + break; + case DISCO_LED4 : + LED4_GPIO_CLK_ENABLE(); + break; + default : + break; + + } /* end switch */ + + HAL_GPIO_Init(GPIO_PORT[Led], &gpio_init_structure); + + /* By default, turn off LED by setting a high level on corresponding GPIO */ + HAL_GPIO_WritePin(GPIO_PORT[Led], GPIO_PIN[Led], GPIO_PIN_SET); + + } /* of if (Led <= LED4) */ + +} + + +/** + * @brief DeInit LEDs. + * @param Led: LED to be configured. + * This parameter can be one of the following values: + * @arg LED1 + * @arg LED2 + * @arg LED3 + * @arg LED4 + * @note Led DeInit does not disable the GPIO clock nor disable the Mfx + */ +void BSP_LED_DeInit(Led_TypeDef Led) +{ + GPIO_InitTypeDef gpio_init_structure; + + if (Led <= DISCO_LED4) + { + /* DeInit the GPIO_LED pin */ + gpio_init_structure.Pin = GPIO_PIN[Led]; + + /* Turn off LED */ + HAL_GPIO_WritePin(GPIO_PORT[Led], GPIO_PIN[Led], GPIO_PIN_SET); + HAL_GPIO_DeInit(GPIO_PORT[Led], gpio_init_structure.Pin); + } + +} + +/** + * @brief Turns selected LED On. + * @param Led: LED to be set on + * This parameter can be one of the following values: + * @arg LED1 + * @arg LED2 + * @arg LED3 + * @arg LED4 + */ +void BSP_LED_On(Led_TypeDef Led) +{ + if (Led <= DISCO_LED4) + { + HAL_GPIO_WritePin(GPIO_PORT[Led], GPIO_PIN[Led], GPIO_PIN_RESET); + } + +} + +/** + * @brief Turns selected LED Off. + * @param Led: LED to be set off + * This parameter can be one of the following values: + * @arg LED1 + * @arg LED2 + * @arg LED3 + * @arg LED4 + */ +void BSP_LED_Off(Led_TypeDef Led) +{ + if (Led <= DISCO_LED4) + { + HAL_GPIO_WritePin(GPIO_PORT[Led], GPIO_PIN[Led], GPIO_PIN_SET); + } +} + +/** + * @brief Toggles the selected LED. + * @param Led: LED to be toggled + * This parameter can be one of the following values: + * @arg LED1 + * @arg LED2 + * @arg LED3 + * @arg LED4 + */ +void BSP_LED_Toggle(Led_TypeDef Led) +{ + if (Led <= DISCO_LED4) + { + HAL_GPIO_TogglePin(GPIO_PORT[Led], GPIO_PIN[Led]); + } +} + +/** + * @brief Configures button GPIO and EXTI Line. + * @param Button: Button to be configured + * This parameter can be one of the following values: + * @arg BUTTON_WAKEUP: Wakeup Push Button + * @arg BUTTON_USER: User Push Button + * @param Button_Mode: Button mode + * This parameter can be one of the following values: + * @arg BUTTON_MODE_GPIO: Button will be used as simple IO + * @arg BUTTON_MODE_EXTI: Button will be connected to EXTI line + * with interrupt generation capability + */ +void BSP_PB_Init(Button_TypeDef Button, ButtonMode_TypeDef Button_Mode) +{ + GPIO_InitTypeDef gpio_init_structure; + + /* Enable the BUTTON clock */ + BUTTON_GPIO_CLK_ENABLE(); + + if(Button_Mode == BUTTON_MODE_GPIO) + { + /* Configure Button pin as input */ + gpio_init_structure.Pin = BUTTON_PIN[Button]; + gpio_init_structure.Mode = GPIO_MODE_INPUT; + gpio_init_structure.Pull = GPIO_NOPULL; + gpio_init_structure.Speed = GPIO_SPEED_FAST; + HAL_GPIO_Init(BUTTON_PORT[Button], &gpio_init_structure); + } + + if(Button_Mode == BUTTON_MODE_EXTI) + { + /* Configure Button pin as input with External interrupt */ + gpio_init_structure.Pin = BUTTON_PIN[Button]; + gpio_init_structure.Pull = GPIO_NOPULL; + gpio_init_structure.Speed = GPIO_SPEED_FAST; + + gpio_init_structure.Mode = GPIO_MODE_IT_RISING; + + HAL_GPIO_Init(BUTTON_PORT[Button], &gpio_init_structure); + + /* Enable and set Button EXTI Interrupt to the lowest priority */ + HAL_NVIC_SetPriority((IRQn_Type)(BUTTON_IRQn[Button]), 0x0F, 0x00); + HAL_NVIC_EnableIRQ((IRQn_Type)(BUTTON_IRQn[Button])); + } +} + +/** + * @brief Push Button DeInit. + * @param Button: Button to be configured + * This parameter can be one of the following values: + * @arg BUTTON_WAKEUP: Wakeup Push Button + * @arg BUTTON_USER: User Push Button + * @note PB DeInit does not disable the GPIO clock + */ +void BSP_PB_DeInit(Button_TypeDef Button) +{ + GPIO_InitTypeDef gpio_init_structure; + + gpio_init_structure.Pin = BUTTON_PIN[Button]; + HAL_NVIC_DisableIRQ((IRQn_Type)(BUTTON_IRQn[Button])); + HAL_GPIO_DeInit(BUTTON_PORT[Button], gpio_init_structure.Pin); +} + + +/** + * @brief Returns the selected button state. + * @param Button: Button to be checked + * This parameter can be one of the following values: + * @arg BUTTON_WAKEUP: Wakeup Push Button + * @arg BUTTON_USER: User Push Button + * @retval The Button GPIO pin value + */ +uint32_t BSP_PB_GetState(Button_TypeDef Button) +{ + return HAL_GPIO_ReadPin(BUTTON_PORT[Button], BUTTON_PIN[Button]); +} + +/** + * @} + */ + +/** @defgroup STM32469I_Discovery_LOW_LEVEL_Private_Functions STM32469I Discovery LOW LEVEL Private Functions + * @{ + */ + + +/******************************************************************************* + BUS OPERATIONS +*******************************************************************************/ + +/******************************* I2C Routines *********************************/ +/** + * @brief Initializes I2C MSP. + */ +static void I2C1_MspInit(void) +{ + GPIO_InitTypeDef gpio_init_structure; + + /*** Configure the GPIOs ***/ + /* Enable GPIO clock */ + DISCO_I2C1_SCL_SDA_GPIO_CLK_ENABLE(); + + /* Configure I2C Tx as alternate function */ + gpio_init_structure.Pin = DISCO_I2C1_SCL_PIN; + gpio_init_structure.Mode = GPIO_MODE_AF_OD; + gpio_init_structure.Pull = GPIO_NOPULL; + gpio_init_structure.Speed = GPIO_SPEED_FAST; + gpio_init_structure.Alternate = DISCO_I2C1_SCL_SDA_AF; + HAL_GPIO_Init(DISCO_I2C1_SCL_SDA_GPIO_PORT, &gpio_init_structure); + + /* Configure I2C Rx as alternate function */ + gpio_init_structure.Pin = DISCO_I2C1_SDA_PIN; + HAL_GPIO_Init(DISCO_I2C1_SCL_SDA_GPIO_PORT, &gpio_init_structure); + + /*** Configure the I2C peripheral ***/ + /* Enable I2C clock */ + DISCO_I2C1_CLK_ENABLE(); + + /* Force the I2C peripheral clock reset */ + DISCO_I2C1_FORCE_RESET(); + + /* Release the I2C peripheral clock reset */ + DISCO_I2C1_RELEASE_RESET(); + + /* Enable and set I2C1 Interrupt to a lower priority */ + HAL_NVIC_SetPriority(DISCO_I2C1_EV_IRQn, 0x05, 0); + HAL_NVIC_EnableIRQ(DISCO_I2C1_EV_IRQn); + + /* Enable and set I2C1 Interrupt to a lower priority */ + HAL_NVIC_SetPriority(DISCO_I2C1_ER_IRQn, 0x05, 0); + HAL_NVIC_EnableIRQ(DISCO_I2C1_ER_IRQn); +} + +/** + * @brief Initializes I2C MSP. + */ +static void I2C2_MspInit(void) +{ + GPIO_InitTypeDef gpio_init_structure; + + /*** Configure the GPIOs ***/ + /* Enable GPIO clock */ + DISCO_I2C2_SCL_SDA_GPIO_CLK_ENABLE(); + + /* Configure I2C Tx as alternate function */ + gpio_init_structure.Pin = DISCO_I2C2_SCL_PIN; + gpio_init_structure.Mode = GPIO_MODE_AF_OD; + gpio_init_structure.Pull = GPIO_NOPULL; + gpio_init_structure.Speed = GPIO_SPEED_FAST; + gpio_init_structure.Alternate = DISCO_I2C2_SCL_SDA_AF; + HAL_GPIO_Init(DISCO_I2C2_SCL_SDA_GPIO_PORT, &gpio_init_structure); + + /* Configure I2C Rx as alternate function */ + gpio_init_structure.Pin = DISCO_I2C2_SDA_PIN; + HAL_GPIO_Init(DISCO_I2C2_SCL_SDA_GPIO_PORT, &gpio_init_structure); + + /*** Configure the I2C peripheral ***/ + /* Enable I2C clock */ + DISCO_I2C2_CLK_ENABLE(); + + /* Force the I2C peripheral clock reset */ + DISCO_I2C2_FORCE_RESET(); + + /* Release the I2C peripheral clock reset */ + DISCO_I2C2_RELEASE_RESET(); + + /* Enable and set I2C1 Interrupt to a lower priority */ + HAL_NVIC_SetPriority(DISCO_I2C2_EV_IRQn, 0x05, 0); + HAL_NVIC_EnableIRQ(DISCO_I2C2_EV_IRQn); + + /* Enable and set I2C1 Interrupt to a lower priority */ + HAL_NVIC_SetPriority(DISCO_I2C2_ER_IRQn, 0x05, 0); + HAL_NVIC_EnableIRQ(DISCO_I2C2_ER_IRQn); +} + +/** + * @brief Initializes I2C HAL. + */ +static void I2C1_Init(void) +{ + if(HAL_I2C_GetState(&heval_I2c1) == HAL_I2C_STATE_RESET) + { + heval_I2c1.Instance = I2C1; + heval_I2c1.Init.ClockSpeed = I2C1_SCL_FREQ_KHZ; + heval_I2c1.Init.DutyCycle = I2C_DUTYCYCLE_2; + heval_I2c1.Init.OwnAddress1 = 0; + heval_I2c1.Init.AddressingMode = I2C_ADDRESSINGMODE_7BIT; + heval_I2c1.Init.DualAddressMode = I2C_DUALADDRESS_DISABLE; + heval_I2c1.Init.OwnAddress2 = 0; + heval_I2c1.Init.GeneralCallMode = I2C_GENERALCALL_DISABLE; + heval_I2c1.Init.NoStretchMode = I2C_NOSTRETCH_DISABLE; + + /* Init the I2C */ + I2C1_MspInit(); + HAL_I2C_Init(&heval_I2c1); + } +} + +/** + * @brief Initializes I2C HAL. + */ +static void I2C2_Init(void) +{ + if(HAL_I2C_GetState(&heval_I2c2) == HAL_I2C_STATE_RESET) + { + heval_I2c2.Instance = I2C2; + heval_I2c2.Init.ClockSpeed = I2C2_SCL_FREQ_KHZ; + heval_I2c2.Init.DutyCycle = I2C_DUTYCYCLE_2; + heval_I2c2.Init.OwnAddress1 = 0; + heval_I2c2.Init.AddressingMode = I2C_ADDRESSINGMODE_7BIT; + heval_I2c2.Init.DualAddressMode = I2C_DUALADDRESS_DISABLE; + heval_I2c2.Init.OwnAddress2 = 0; + heval_I2c2.Init.GeneralCallMode = I2C_GENERALCALL_DISABLE; + heval_I2c2.Init.NoStretchMode = I2C_NOSTRETCH_DISABLE; + + /* Init the I2C */ + I2C2_MspInit(); + HAL_I2C_Init(&heval_I2c2); + } +} + +/** + * @brief Writes a single data. + * @param Addr: I2C address + * @param Reg: Register address + * @param Value: Data to be written + */ +static void I2C1_Write(uint8_t Addr, uint8_t Reg, uint8_t Value) +{ + HAL_StatusTypeDef status = HAL_OK; + + status = HAL_I2C_Mem_Write(&heval_I2c1, + Addr, + (uint16_t)Reg, + I2C_MEMADD_SIZE_8BIT, + &Value, + 1, + 100); + + /* Check the communication status */ + if(status != HAL_OK) + { + /* Execute user timeout callback */ + I2C1_Error(Addr); + } +} + +/** + * @brief Reads a single data. + * @param Addr: I2C address + * @param Reg: Register address + * @retval Read data + */ +static uint8_t I2C1_Read(uint8_t Addr, uint8_t Reg) +{ + HAL_StatusTypeDef status = HAL_OK; + uint8_t Value = 0; + + status = HAL_I2C_Mem_Read(&heval_I2c1, + Addr, + Reg, + I2C_MEMADD_SIZE_8BIT, + &Value, + 1, + 1000); + + /* Check the communication status */ + if(status != HAL_OK) + { + /* Execute user timeout callback */ + I2C1_Error(Addr); + } + return Value; +} + +/** + * @brief Reads multiple data. + * @param Addr: I2C address + * @param Reg: Reg address + * @param MemAddress: memory address + * @param Buffer: Pointer to data buffer + * @param Length: Length of the data + * @retval HAL status + */ +static HAL_StatusTypeDef I2C1_ReadMultiple(uint8_t Addr, + uint16_t Reg, + uint16_t MemAddress, + uint8_t *Buffer, + uint16_t Length) +{ + HAL_StatusTypeDef status = HAL_OK; + + status = HAL_I2C_Mem_Read(&heval_I2c1, + Addr, + (uint16_t)Reg, + MemAddress, + Buffer, + Length, + 1000); + + /* Check the communication status */ + if(status != HAL_OK) + { + /* I2C error occured */ + I2C1_Error(Addr); + } + return status; +} + +static HAL_StatusTypeDef I2C2_ReadMultiple(uint8_t Addr, + uint16_t Reg, + uint16_t MemAddress, + uint8_t *Buffer, + uint16_t Length) +{ + HAL_StatusTypeDef status = HAL_OK; + + status = HAL_I2C_Mem_Read(&heval_I2c2, + Addr, + (uint16_t)Reg, + MemAddress, + Buffer, + Length, + 1000); + + /* Check the communication status */ + if(status != HAL_OK) + { + /* I2C2 error occured */ + I2C2_Error(Addr); + } + return status; +} + +/** + * @brief Writes a value in a register of the device through BUS in using DMA mode. + * @param Addr: Device address on BUS Bus. + * @param Reg: The target register address to write + * @param MemAddress: memory address + * @param Buffer: The target register value to be written + * @param Length: buffer size to be written + * @retval HAL status + */ +static HAL_StatusTypeDef I2C1_WriteMultiple(uint8_t Addr, + uint16_t Reg, + uint16_t MemAddress, + uint8_t *Buffer, + uint16_t Length) +{ + HAL_StatusTypeDef status = HAL_OK; + + status = HAL_I2C_Mem_Write(&heval_I2c1, + Addr, + (uint16_t)Reg, + MemAddress, + Buffer, + Length, + 1000); + + /* Check the communication status */ + if(status != HAL_OK) + { + /* Re-Initiaize the I2C Bus */ + I2C1_Error(Addr); + } + return status; +} + +static HAL_StatusTypeDef I2C2_WriteMultiple(uint8_t Addr, + uint16_t Reg, + uint16_t MemAddress, + uint8_t *Buffer, + uint16_t Length) +{ + HAL_StatusTypeDef status = HAL_OK; + + status = HAL_I2C_Mem_Write(&heval_I2c2, + Addr, + (uint16_t)Reg, + MemAddress, + Buffer, + Length, + 1000); + + /* Check the communication status */ + if(status != HAL_OK) + { + /* Re-Initiaize the I2C2 Bus */ + I2C2_Error(Addr); + } + return status; +} + +/** + * @brief Checks if target device is ready for communication. + * @note This function is used with Memory devices + * @param DevAddress: Target device address + * @param Trials: Number of trials + * @retval HAL status + */ +static HAL_StatusTypeDef I2C1_IsDeviceReady(uint16_t DevAddress, uint32_t Trials) +{ + return (HAL_I2C_IsDeviceReady(&heval_I2c1, DevAddress, Trials, 1000)); +} + +/** + * @brief Manages error callback by re-initializing I2C. + * @param Addr: I2C Address + */ +static void I2C1_Error(uint8_t Addr) +{ + /* De-initialize the I2C comunication bus */ + HAL_I2C_DeInit(&heval_I2c1); + + /* Re-Initiaize the I2C comunication bus */ + I2C1_Init(); +} + +static void I2C2_Error(uint8_t Addr) +{ + /* De-initialize the I2C2 comunication bus */ + HAL_I2C_DeInit(&heval_I2c2); + + /* Re-Initiaize the I2C2 comunication bus */ + I2C2_Init(); +} + +/** + * @} + */ + +/******************************************************************************* + LINK OPERATIONS +*******************************************************************************/ + +/********************************* LINK AUDIO *********************************/ + +/** + * @brief Initializes Audio low level. + */ +void AUDIO_IO_Init(void) +{ + I2C2_Init(); +} + +/** + * @brief DeInitializes Audio low level. + */ +void AUDIO_IO_DeInit(void) +{ + +} + +/** + * @brief Writes a single data. + * @param Addr: I2C address + * @param Reg: Reg address + * @param Value: Data to be written + */ +void AUDIO_IO_Write(uint8_t Addr, uint8_t Reg, uint8_t Value) +{ + I2C2_WriteMultiple(Addr, (uint16_t) Reg, I2C_MEMADD_SIZE_8BIT, (uint8_t*)&Value, 1); +} + +/** + * @brief Reads a single data. + * @param Addr: I2C address + * @param Reg: Reg address + * @retval Data to be read + */ +uint8_t AUDIO_IO_Read(uint8_t Addr, uint8_t Reg) +{ + uint8_t read_value = 0; + + I2C2_ReadMultiple(Addr, (uint16_t) Reg, I2C_MEMADD_SIZE_8BIT, (uint8_t*)&read_value, 1); + + return read_value; +} + +/** + * @brief AUDIO Codec delay + * @param Delay: Delay in ms + */ +void AUDIO_IO_Delay(uint32_t Delay) +{ + //HAL_Delay(Delay); + wait_ms(Delay); +} + +/******************************** LINK I2C EEPROM *****************************/ + +/** + * @brief Initializes peripherals used by the I2C EEPROM driver. + */ +void EEPROM_IO_Init(void) +{ + I2C1_Init(); +} + +/** + * @brief Write data to I2C EEPROM driver in using DMA channel. + * @param DevAddress: Target device address + * @param MemAddress: Internal memory address + * @param pBuffer: Pointer to data buffer + * @param BufferSize: Amount of data to be sent + * @retval HAL status + */ +HAL_StatusTypeDef EEPROM_IO_WriteData(uint16_t DevAddress, uint16_t MemAddress, uint8_t* pBuffer, uint32_t BufferSize) +{ + return (I2C1_WriteMultiple(DevAddress, MemAddress, I2C_MEMADD_SIZE_16BIT, pBuffer, BufferSize)); +} + +/** + * @brief Read data from I2C EEPROM driver in using DMA channel. + * @param DevAddress: Target device address + * @param MemAddress: Internal memory address + * @param pBuffer: Pointer to data buffer + * @param BufferSize: Amount of data to be read + * @retval HAL status + */ +HAL_StatusTypeDef EEPROM_IO_ReadData(uint16_t DevAddress, uint16_t MemAddress, uint8_t* pBuffer, uint32_t BufferSize) +{ + return (I2C1_ReadMultiple(DevAddress, MemAddress, I2C_MEMADD_SIZE_16BIT, pBuffer, BufferSize)); +} + +/** + * @brief Checks if target device is ready for communication. + * @note This function is used with Memory devices + * @param DevAddress: Target device address + * @param Trials: Number of trials + * @retval HAL status + */ +HAL_StatusTypeDef EEPROM_IO_IsDeviceReady(uint16_t DevAddress, uint32_t Trials) +{ + return (I2C1_IsDeviceReady(DevAddress, Trials)); +} + +/******************************** LINK TS (TouchScreen) ***********************/ + +/** + * @brief Initialize I2C communication + * channel from MCU to TouchScreen (TS). + */ +void TS_IO_Init(void) +{ + I2C1_Init(); +} + +/** + * @brief Writes single data with I2C communication + * channel from MCU to TouchScreen. + * @param Addr: I2C address + * @param Reg: Register address + * @param Value: Data to be written + */ +void TS_IO_Write(uint8_t Addr, uint8_t Reg, uint8_t Value) +{ + I2C1_Write(Addr, Reg, Value); +} + +/** + * @brief Reads single data with I2C communication + * channel from TouchScreen. + * @param Addr: I2C address + * @param Reg: Register address + * @retval Read data + */ +uint8_t TS_IO_Read(uint8_t Addr, uint8_t Reg) +{ + return I2C1_Read(Addr, Reg); +} + +/** + * @brief Reads multiple data with I2C communication + * channel from TouchScreen. + * @param Addr: I2C address + * @param Reg: Register address + * @param Buffer: Pointer to data buffer + * @param Length: Length of the data + * @retval Number of read data + */ +uint16_t TS_IO_ReadMultiple(uint8_t Addr, uint8_t Reg, uint8_t *Buffer, uint16_t Length) +{ + return I2C1_ReadMultiple(Addr, (uint16_t)Reg, I2C_MEMADD_SIZE_8BIT, Buffer, Length); +} + +/** + * @brief Writes multiple data with I2C communication + * channel from MCU to TouchScreen. + * @param Addr: I2C address + * @param Reg: Register address + * @param Buffer: Pointer to data buffer + * @param Length: Length of the data + */ +void TS_IO_WriteMultiple(uint8_t Addr, uint8_t Reg, uint8_t *Buffer, uint16_t Length) +{ + I2C1_WriteMultiple(Addr, (uint16_t)Reg, I2C_MEMADD_SIZE_8BIT, Buffer, Length); +} + +/** + * @brief Delay function used in TouchScreen low level driver. + * @param Delay: Delay in ms + */ +void TS_IO_Delay(uint32_t Delay) +{ + //HAL_Delay(Delay); + wait_ms(Delay); +} + +/**************************** LINK OTM8009A (Display driver) ******************/ +/** + * @brief OTM8009A delay + * @param Delay: Delay in ms + */ +void OTM8009A_IO_Delay(uint32_t Delay) +{ + //HAL_Delay(Delay); + wait_ms(Delay); +} + +/** + * @} + */ + +/** + * @} + */ + +/** + * @} + */ + +/** + * @} + */ + +/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Drivers/BSP/STM32469I-Discovery/stm32469i_discovery.h Tue May 16 10:50:26 2017 +0200 @@ -0,0 +1,374 @@ +/** + ****************************************************************************** + * @file stm32469i_discovery.h + * @author MCD Application Team + * @version V2.0.0 + * @date 27-January-2017 + * @brief This file contains definitions for STM32469I-Discovery LEDs, + * push-buttons hardware resources. + ****************************************************************************** + * @attention + * + * <h2><center>© COPYRIGHT(c) 2017 STMicroelectronics</center></h2> + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * 3. Neither the name of STMicroelectronics nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + ****************************************************************************** + */ + +/* Define to prevent recursive inclusion -------------------------------------*/ +#ifndef __STM32469I_DISCOVERY_H +#define __STM32469I_DISCOVERY_H + +#ifdef __cplusplus + extern "C" { +#endif + + /* Includes ------------------------------------------------------------------*/ +#include "stm32f4xx_hal.h" + +// mbed +void wait_ms(int ms); + +/** @addtogroup BSP + * @{ + */ + +/** @addtogroup STM32469I_Discovery + * @{ + */ + +/** @addtogroup STM32469I_Discovery_LOW_LEVEL + * @{ + */ + +/** @defgroup STM32469I_Discovery_LOW_LEVEL_Exported_Types STM32469I Discovery LOW LEVEL Exported Types + * @{ + */ + +/** @brief Led_TypeDef + * STM32469I_Discovery board leds definitions. + */ +typedef enum +{ + DISCO_LED1 = 0, + DISCO_LED_GREEN = DISCO_LED1, + DISCO_LED2 = 1, + DISCO_LED_ORANGE = DISCO_LED2, + DISCO_LED3 = 2, + DISCO_LED_RED = DISCO_LED3, + DISCO_LED4 = 3, + DISCO_LED_BLUE = DISCO_LED4 + +} Led_TypeDef; + +/** @brief Button_TypeDef + * STM32469I_Discovery board Buttons definitions. + */ +typedef enum +{ + BUTTON_WAKEUP = 0 +} Button_TypeDef; + +#define BUTTON_USER BUTTON_WAKEUP + +/** @brief ButtonMode_TypeDef + * STM32469I_Discovery board Buttons Modes definitions. + */ +typedef enum +{ + BUTTON_MODE_GPIO = 0, + BUTTON_MODE_EXTI = 1 + +} ButtonMode_TypeDef; + +/** @addtogroup Exported_types + * @{ + */ +typedef enum +{ + PB_SET = 0, + PB_RESET = !PB_SET +} ButtonValue_TypeDef; + + +/** @brief DISCO_Status_TypeDef + * STM32469I_DISCO board Status return possible values. + */ +typedef enum +{ + DISCO_OK = 0, + DISCO_ERROR = 1 + +} DISCO_Status_TypeDef; + +/** + * @} + */ + +/** + * @} + */ + +/** @defgroup STM32469I_Discovery_LOW_LEVEL_Exported_Constants STM32469I Discovery LOW LEVEL Exported Constants + * @{ + */ + + +/** @defgroup STM32469I_Discovery_LOW_LEVEL_LED STM32469I Discovery LOW LEVEL LED + * @{ + */ +/* Always four leds for all revisions of Discovery boards */ +#define LEDn ((uint8_t)4) + + +/* 4 Leds are connected to MCU directly on PG6, PD4, PD5, PK3 */ +#define LED1_GPIO_PORT ((GPIO_TypeDef*)GPIOG) +#define LED2_GPIO_PORT ((GPIO_TypeDef*)GPIOD) +#define LED3_GPIO_PORT ((GPIO_TypeDef*)GPIOD) +#define LED4_GPIO_PORT ((GPIO_TypeDef*)GPIOK) + +#define LED1_GPIO_CLK_ENABLE() __HAL_RCC_GPIOG_CLK_ENABLE() +#define LED1_GPIO_CLK_DISABLE() __HAL_RCC_GPIOG_CLK_DISABLE() +#define LED2_GPIO_CLK_ENABLE() __HAL_RCC_GPIOD_CLK_ENABLE() +#define LED2_GPIO_CLK_DISABLE() __HAL_RCC_GPIOD_CLK_DISABLE() +#define LED3_GPIO_CLK_ENABLE() __HAL_RCC_GPIOD_CLK_ENABLE() +#define LED3_GPIO_CLK_DISABLE() __HAL_RCC_GPIOD_CLK_DISABLE() +#define LED4_GPIO_CLK_ENABLE() __HAL_RCC_GPIOK_CLK_ENABLE() +#define LED4_GPIO_CLK_DISABLE() __HAL_RCC_GPIOK_CLK_DISABLE() + +#define LED1_PIN ((uint32_t)GPIO_PIN_6) +#define LED2_PIN ((uint32_t)GPIO_PIN_4) +#define LED3_PIN ((uint32_t)GPIO_PIN_5) +#define LED4_PIN ((uint32_t)GPIO_PIN_3) +/** + * @} + */ + +/** @addtogroup STM32469I_Discovery_LOW_LEVEL_BUTTON STM32469I Discovery LOW LEVEL BUTTON + * @{ + */ +/* Only one User/Wakeup button */ +#define BUTTONn ((uint8_t)1) + +/** + * @brief Wakeup push-button + */ +#define WAKEUP_BUTTON_PIN GPIO_PIN_0 +#define WAKEUP_BUTTON_GPIO_PORT GPIOA +#define WAKEUP_BUTTON_GPIO_CLK_ENABLE() __HAL_RCC_GPIOA_CLK_ENABLE() +#define WAKEUP_BUTTON_GPIO_CLK_DISABLE() __HAL_RCC_GPIOA_CLK_DISABLE() +#define WAKEUP_BUTTON_EXTI_IRQn EXTI0_IRQn + +/* Define the USER button as an alias of the Wakeup button */ +#define USER_BUTTON_PIN WAKEUP_BUTTON_PIN +#define USER_BUTTON_GPIO_PORT WAKEUP_BUTTON_GPIO_PORT +#define USER_BUTTON_GPIO_CLK_ENABLE() WAKEUP_BUTTON_GPIO_CLK_ENABLE() +#define USER_BUTTON_GPIO_CLK_DISABLE() WAKEUP_BUTTON_GPIO_CLK_DISABLE() +#define USER_BUTTON_EXTI_IRQn WAKEUP_BUTTON_EXTI_IRQn + +#define BUTTON_GPIO_CLK_ENABLE() __HAL_RCC_GPIOA_CLK_ENABLE() + +/** + * @} + */ + +/** + * @brief OTG_FS1 OVER_CURRENT and POWER_SWITCH Pins definition + */ +#define AUDIO_INT_PIN GPIO_PIN_7 +#define AUDIO_INT_PORT GPIOB +#define AUDIO_INT_PORT_CLK_ENABLE() __HAL_RCC_GPIOB_CLK_ENABLE() + +#define OTG_FS1_OVER_CURRENT_PIN GPIO_PIN_7 +#define OTG_FS1_OVER_CURRENT_PORT GPIOB +#define OTG_FS1_OVER_CURRENT_PORT_CLK_ENABLE() __HAL_RCC_GPIOB_CLK_ENABLE() + +#define OTG_FS1_POWER_SWITCH_PIN GPIO_PIN_2 +#define OTG_FS1_POWER_SWITCH_PORT GPIOB +#define OTG_FS1_POWER_SWITCH_PORT_CLK_ENABLE() __HAL_RCC_GPIOB_CLK_ENABLE() + +/** + * @brief SD-detect signal + */ +#define SD_DETECT_PIN ((uint32_t)GPIO_PIN_2) +#define SD_DETECT_GPIO_PORT ((GPIO_TypeDef*)GPIOG) +#define SD_DETECT_GPIO_CLK_ENABLE() __HAL_RCC_GPIOG_CLK_ENABLE() +#define SD_DETECT_GPIO_CLK_DISABLE() __HAL_RCC_GPIOG_CLK_DISABLE() +#define SD_DETECT_EXTI_IRQn EXTI2_IRQn + +/** + * @brief TS_INT signal from TouchScreen when it is configured in interrupt mode + */ +#define TS_INT_PIN ((uint32_t)GPIO_PIN_5) +#define TS_INT_GPIO_PORT ((GPIO_TypeDef*)GPIOJ) +#define TS_INT_GPIO_CLK_ENABLE() __HAL_RCC_GPIOJ_CLK_ENABLE() +#define TS_INT_GPIO_CLK_DISABLE() __HAL_RCC_GPIOJ_CLK_DISABLE() +#define TS_INT_EXTI_IRQn EXTI9_5_IRQn + +/** + * @brief TouchScreen FT6206 Slave I2C address 1 + */ +#define TS_I2C_ADDRESS ((uint16_t)0x54) + +/** + * @brief TouchScreen FT6336G Slave I2C address 2 + */ +#define TS_I2C_ADDRESS_A02 ((uint16_t)0x70) + + +/** + * @brief Audio I2C Slave address + */ +#define AUDIO_I2C_ADDRESS ((uint16_t)0x94) + +/** + * @brief EEPROM I2C Slave address 1 + */ +#define EEPROM_I2C_ADDRESS_A01 ((uint16_t)0xA0) + +/** + * @brief EEPROM I2C Slave address 2 + */ +#define EEPROM_I2C_ADDRESS_A02 ((uint16_t)0xA6) + +/** + * @brief I2C clock speed configuration (in Hz) + * WARNING: + * Make sure that this define is not already declared in other files + * It can be used in parallel by other modules. + */ +#ifndef I2C1_SCL_FREQ_KHZ +#define I2C1_SCL_FREQ_KHZ 400000 /*!< f(I2C_SCL) = 400 kHz */ +#endif /* I2C1_SCL_FREQ_KHZ */ + +/** + * @brief User can use this section to tailor I2C1/I2C1 instance used and associated + * resources. + * Definition for I2C1 clock resources + */ +#define DISCO_I2C1 I2C1 +#define DISCO_I2C1_CLK_ENABLE() __HAL_RCC_I2C1_CLK_ENABLE() +#define DISCO_DMAx_CLK_ENABLE() __HAL_RCC_DMA1_CLK_ENABLE() +#define DISCO_I2C1_SCL_SDA_GPIO_CLK_ENABLE() __HAL_RCC_GPIOB_CLK_ENABLE() + +#define DISCO_I2C1_FORCE_RESET() __HAL_RCC_I2C1_FORCE_RESET() +#define DISCO_I2C1_RELEASE_RESET() __HAL_RCC_I2C1_RELEASE_RESET() + +/** @brief Definition for I2C1 Pins + */ +#define DISCO_I2C1_SCL_PIN GPIO_PIN_8 /*!< PB8 */ +#define DISCO_I2C1_SCL_SDA_GPIO_PORT GPIOB +#define DISCO_I2C1_SCL_SDA_AF GPIO_AF4_I2C1 +#define DISCO_I2C1_SDA_PIN GPIO_PIN_9 /*!< PB9 */ + +/** @brief Definition of I2C interrupt requests + */ +#define DISCO_I2C1_EV_IRQn I2C1_EV_IRQn +#define DISCO_I2C1_ER_IRQn I2C1_ER_IRQn + + + +/** + * @brief I2C2 clock speed configuration (in Hz) + * WARNING: + * Make sure that this define is not already declared in other files + * It can be used in parallel by other modules. + */ +#ifndef I2C2_SCL_FREQ_KHZ +#define I2C2_SCL_FREQ_KHZ 100000 /*!< f(I2C2_SCL) < 100 kHz */ +#endif /* I2C2_SCL_FREQ_KHZ */ + +/** + * @brief User can use this section to tailor I2C2/I2C2 instance used and associated + * resources (audio codec). + * Definition for I2C2 clock resources + */ +#define DISCO_I2C2 I2C2 +#define DISCO_I2C2_CLK_ENABLE() __HAL_RCC_I2C2_CLK_ENABLE() +#define DISCO_I2C2_SCL_SDA_GPIO_CLK_ENABLE() __HAL_RCC_GPIOH_CLK_ENABLE() + +#define DISCO_I2C2_FORCE_RESET() __HAL_RCC_I2C2_FORCE_RESET() +#define DISCO_I2C2_RELEASE_RESET() __HAL_RCC_I2C2_RELEASE_RESET() + +/** @brief Definition for I2C2 Pins + */ +#define DISCO_I2C2_SCL_PIN GPIO_PIN_4 /*!< PH4 */ +#define DISCO_I2C2_SCL_SDA_GPIO_PORT GPIOH +#define DISCO_I2C2_SCL_SDA_AF GPIO_AF4_I2C2 +#define DISCO_I2C2_SDA_PIN GPIO_PIN_5 /*!< PH5 */ + +/** @brief Definition of I2C2 interrupt requests + */ +#define DISCO_I2C2_EV_IRQn I2C2_EV_IRQn +#define DISCO_I2C2_ER_IRQn I2C2_ER_IRQn + + +/** + * @} + */ + +/** @defgroup STM32469I_Discovery_LOW_LEVEL_Exported_Macros STM32469I Discovery LOW LEVEL Exported Macros + * @{ + */ +/** + * @} + */ + +/** @defgroup STM32469I_Discovery_LOW_LEVEL_Exported_Functions STM32469I Discovery LOW LEVEL Exported Functions + * @{ + */ +uint32_t BSP_GetVersion(void); +void BSP_LED_Init(Led_TypeDef Led); +void BSP_LED_DeInit(Led_TypeDef Led); +void BSP_LED_On(Led_TypeDef Led); +void BSP_LED_Off(Led_TypeDef Led); +void BSP_LED_Toggle(Led_TypeDef Led); +void BSP_PB_Init(Button_TypeDef Button, ButtonMode_TypeDef Button_Mode); +void BSP_PB_DeInit(Button_TypeDef Button); +uint32_t BSP_PB_GetState(Button_TypeDef Button); + +/** + * @} + */ + +/** + * @} + */ + +/** + * @} + */ + +/** + * @} + */ + + +#ifdef __cplusplus +} +#endif + +#endif /* __STM32469I_DISCOVERY_H */ + +/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Drivers/BSP/STM32469I-Discovery/stm32469i_discovery_eeprom.c Tue May 16 10:50:26 2017 +0200 @@ -0,0 +1,474 @@ +/** + ****************************************************************************** + * @file stm32469i_discovery_eeprom.c + * @author MCD Application Team + * @version V2.0.0 + * @date 27-January-2017 + * @brief This file provides a set of functions needed to manage an I2C M24LR64 + * EEPROM memory. + * To be able to use this driver, the switch EE_M24LR64 must be defined + * in your toolchain compiler preprocessor + * + * =================================================================== + * Notes: + * - This driver is intended for STM32F4xx families devices only. + * - The I2C EEPROM memory (M24LR64) is available on separate daughter + * board ANT7-M24LR-A, which is not provided with the STM32469I-Discovery + * board. + * To use this driver you have to connect the ANT7-M24LR-A to CN11 + * connector of STM32469I-Discovery board. + * =================================================================== + * + * It implements a high level communication layer for read and write + * from/to this memory. The needed STM32F4xx hardware resources (I2C and + * GPIO) are defined in stm32469i_discovery.h file, and the initialization is + * performed in EEPROM_IO_Init() function declared in stm32469i_discovery.c + * file. + * You can easily tailor this driver to any other development board, + * by just adapting the defines for hardware resources and + * EEPROM_IO_Init() function. + * + * @note In this driver, basic read and write functions (BSP_EEPROM_ReadBuffer() + * and BSP_EEPROM_WritePage()) use DMA mode to perform the data + * transfer to/from EEPROM memory. + * + * @note Regarding BSP_EEPROM_WritePage(), it is a optimized function to perform + * small write (less than 1 page) BUT The number of bytes (combined to write start address) must not + * cross the EEPROM page boundary. This function can only write into + * the boundaries of an EEPROM page. + * This function doesn't check on boundaries condition (in this driver + * the function BSP_EEPROM_WriteBuffer() which calls BSP_EEPROM_WritePage() is + * responsible of checking on Page boundaries). + * + * + * +-----------------------------------------------------------------+ + * | Pin assignment for M24LR64 EEPROM | + * +---------------------------------------+-----------+-------------+ + * | STM32F4xx I2C Pins | EEPROM | Pin | + * +---------------------------------------+-----------+-------------+ + * | . | E0(GND) | 1 (0V) | + * | . | AC0 | 2 | + * | . | AC1 | 3 | + * | . | VSS | 4 (0V) | + * | SDA | SDA | 5 | + * | SCL | SCL | 6 | + * | . | E1(GND) | 7 (0V) | + * | . | VDD | 8 (3.3V) | + * +---------------------------------------+-----------+-------------+ + * + ****************************************************************************** + * @attention + * + * <h2><center>© COPYRIGHT(c) 2017 STMicroelectronics</center></h2> + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * 3. Neither the name of STMicroelectronics nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + ****************************************************************************** + */ +/* Includes ------------------------------------------------------------------*/ +#include "stm32469i_discovery_eeprom.h" + +/** @addtogroup BSP + * @{ + */ + +/** @addtogroup STM32469I_Discovery + * @{ + */ + +/** @defgroup STM32469I-Discovery_EEPROM STM32469I Discovery EEPROM + * @brief This file includes the I2C EEPROM driver of STM32469I-Discovery board. + * @{ + */ + +/** @defgroup STM32469I-Discovery_EEPROM_Private_Types STM32469I Discovery EEPROM Private Types + * @{ + */ +/** + * @} + */ + +/** @defgroup STM32469I-Discovery_EEPROM_Private_Defines STM32469I Discovery EEPROM Private Defines + * @{ + */ +/** + * @} + */ + +/** @defgroup STM32469I-Discovery_EEPROM_Private_Macros STM32469I Discovery EEPROM Private Macros + * @{ + */ +/** + * @} + */ + +/** @defgroup STM32469I-Discovery_EEPROM_Private_Variables STM32469I Discovery EEPROM Private Variables + * @{ + */ +__IO uint16_t EEPROMAddress = 0; +__IO uint32_t EEPROMTimeout = EEPROM_READ_TIMEOUT; +__IO uint16_t EEPROMDataRead; +__IO uint8_t EEPROMDataWrite; +/** + * @} + */ + +/** @defgroup STM32469I-Discovery_EEPROM_Private_Function_Prototypes STM32469I Discovery EEPROM Private Prototypes + * @{ + */ +/** + * @} + */ + +/** @defgroup STM32469I-Discovery_EEPROM_Private_Functions STM32469I Discovery EEPROM Private Functions + * @{ + */ + +/** + * @brief Initializes peripherals used by the I2C EEPROM driver. + * + * @note There are 2 different versions of M24LR64 (A01 & A02). + * Then try to connect on 1st one (EEPROM_I2C_ADDRESS_A01) + * and if problem, check the 2nd one (EEPROM_I2C_ADDRESS_A02) + * @retval EEPROM_OK (0) if operation is correctly performed, else return value + * different from EEPROM_OK (0) + */ +uint32_t BSP_EEPROM_Init(void) +{ + /* I2C Initialization */ + EEPROM_IO_Init(); + + /* Select the EEPROM address for A01 and check if OK */ + EEPROMAddress = EEPROM_I2C_ADDRESS_A01; + if(EEPROM_IO_IsDeviceReady(EEPROMAddress, EEPROM_MAX_TRIALS) != HAL_OK) + { + /* Select the EEPROM address for A02 and check if OK */ + EEPROMAddress = EEPROM_I2C_ADDRESS_A02; + if(EEPROM_IO_IsDeviceReady(EEPROMAddress, EEPROM_MAX_TRIALS) != HAL_OK) + { + return EEPROM_FAIL; + } + } + return EEPROM_OK; +} + +/** + * @brief DeInitializes the EEPROM. + * @retval EEPROM state + */ +uint8_t BSP_EEPROM_DeInit(void) +{ + /* I2C won't be disabled because common to other functionalities */ + return EEPROM_OK; +} + +/** + * @brief Reads a block of data from the EEPROM. + * @param pBuffer: pointer to the buffer that receives the data read from + * the EEPROM. + * @param ReadAddr: EEPROM's internal address to start reading from. + * @param NumByteToRead: pointer to the variable holding number of bytes to + * be read from the EEPROM. + * + * @note The variable pointed by NumByteToRead is reset to 0 when all the + * data are read from the EEPROM. Application should monitor this + * variable in order know when the transfer is complete. + * + * @retval EEPROM_OK (0) if operation is correctly performed, else return value + * different from EEPROM_OK (0) or the timeout user callback. + */ +uint32_t BSP_EEPROM_ReadBuffer(uint8_t* pBuffer, uint16_t ReadAddr, uint16_t* NumByteToRead) +{ + uint32_t buffersize = *NumByteToRead; + + /* Set the pointer to the Number of data to be read. This pointer will be used + by the DMA Transfer Completer interrupt Handler in order to reset the + variable to 0. User should check on this variable in order to know if the + DMA transfer has been complete or not. */ + EEPROMDataRead = *NumByteToRead; + + if(EEPROM_IO_ReadData(EEPROMAddress, ReadAddr, pBuffer, buffersize) != HAL_OK) + { + BSP_EEPROM_TIMEOUT_UserCallback(); + return EEPROM_FAIL; + } + + /* If all operations OK, return EEPROM_OK (0) */ + return EEPROM_OK; +} + +/** + * @brief Writes more than one byte to the EEPROM with a single WRITE cycle. + * + * @note The number of bytes (combined to write start address) must not + * cross the EEPROM page boundary. This function can only write into + * the boundaries of an EEPROM page. + * This function doesn't check on boundaries condition (in this driver + * the function BSP_EEPROM_WriteBuffer() which calls BSP_EEPROM_WritePage() is + * responsible of checking on Page boundaries). + * + * @param pBuffer: pointer to the buffer containing the data to be written to + * the EEPROM. + * @param WriteAddr: EEPROM's internal address to write to. + * @param NumByteToWrite: pointer to the variable holding number of bytes to + * be written into the EEPROM. + * + * @note The variable pointed by NumByteToWrite is reset to 0 when all the + * data are written to the EEPROM. Application should monitor this + * variable in order know when the transfer is complete. + * + * @note This function just configure the communication and enable the DMA + * channel to transfer data. Meanwhile, the user application may perform + * other tasks in parallel. + * + * @retval EEPROM_OK (0) if operation is correctly performed, else return value + * different from EEPROM_OK (0) or the timeout user callback. + */ +uint32_t BSP_EEPROM_WritePage(uint8_t* pBuffer, uint16_t WriteAddr, uint8_t* NumByteToWrite) +{ + uint32_t buffersize = *NumByteToWrite; + uint32_t status = EEPROM_OK; + + /* Set the pointer to the Number of data to be written. This pointer will be used + by the DMA Transfer Completer interrupt Handler in order to reset the + variable to 0. User should check on this variable in order to know if the + DMA transfer has been complete or not. */ + EEPROMDataWrite = *NumByteToWrite; + + if(EEPROM_IO_WriteData(EEPROMAddress, WriteAddr, pBuffer, buffersize) != HAL_OK) + { + BSP_EEPROM_TIMEOUT_UserCallback(); + status = EEPROM_FAIL; + } + + if(BSP_EEPROM_WaitEepromStandbyState() != EEPROM_OK) + { + return EEPROM_FAIL; + } + + /* If all operations OK, return EEPROM_OK (0) */ + return status; +} + +/** + * @brief Writes buffer of data to the I2C EEPROM. + * @param pBuffer: pointer to the buffer containing the data to be written + * to the EEPROM. + * @param WriteAddr: EEPROM's internal address to write to. + * @param NumByteToWrite: number of bytes to write to the EEPROM. + * @retval EEPROM_OK (0) if operation is correctly performed, else return value + * different from EEPROM_OK (0) or the timeout user callback. + */ +uint32_t BSP_EEPROM_WriteBuffer(uint8_t *pBuffer, uint16_t WriteAddr, uint16_t NumByteToWrite) +{ + uint16_t numofpage = 0, numofsingle = 0, count = 0; + uint16_t addr = 0; + uint8_t dataindex = 0; + uint32_t status = EEPROM_OK; + + addr = WriteAddr % EEPROM_PAGESIZE; + count = EEPROM_PAGESIZE - addr; + numofpage = NumByteToWrite / EEPROM_PAGESIZE; + numofsingle = NumByteToWrite % EEPROM_PAGESIZE; + + /* If WriteAddr is EEPROM_PAGESIZE aligned */ + if(addr == 0) + { + /* If NumByteToWrite < EEPROM_PAGESIZE */ + if(numofpage == 0) + { + /* Store the number of data to be written */ + dataindex = numofsingle; + /* Start writing data */ + status = BSP_EEPROM_WritePage(pBuffer, WriteAddr, (uint8_t*)(&dataindex)); + if(status != EEPROM_OK) + { + return status; + } + } + /* If NumByteToWrite > EEPROM_PAGESIZE */ + else + { + while(numofpage--) + { + /* Store the number of data to be written */ + dataindex = EEPROM_PAGESIZE; + status = BSP_EEPROM_WritePage(pBuffer, WriteAddr, (uint8_t*)(&dataindex)); + if(status != EEPROM_OK) + { + return status; + } + + WriteAddr += EEPROM_PAGESIZE; + pBuffer += EEPROM_PAGESIZE; + } + + if(numofsingle!=0) + { + /* Store the number of data to be written */ + dataindex = numofsingle; + status = BSP_EEPROM_WritePage(pBuffer, WriteAddr, (uint8_t*)(&dataindex)); + if(status != EEPROM_OK) + { + return status; + } + } + } + } + /* If WriteAddr is not EEPROM_PAGESIZE aligned */ + else + { + /* If NumByteToWrite < EEPROM_PAGESIZE */ + if(numofpage== 0) + { + /* If the number of data to be written is more than the remaining space + in the current page: */ + if(NumByteToWrite > count) + { + /* Store the number of data to be written */ + dataindex = count; + /* Write the data contained in same page */ + status = BSP_EEPROM_WritePage(pBuffer, WriteAddr, (uint8_t*)(&dataindex)); + if(status != EEPROM_OK) + { + return status; + } + + /* Store the number of data to be written */ + dataindex = (NumByteToWrite - count); + /* Write the remaining data in the following page */ + status = BSP_EEPROM_WritePage((uint8_t*)(pBuffer + count), (WriteAddr + count), (uint8_t*)(&dataindex)); + if(status != EEPROM_OK) + { + return status; + } + } + else + { + /* Store the number of data to be written */ + dataindex = numofsingle; + status = BSP_EEPROM_WritePage(pBuffer, WriteAddr, (uint8_t*)(&dataindex)); + if(status != EEPROM_OK) + { + return status; + } + } + } + /* If NumByteToWrite > EEPROM_PAGESIZE */ + else + { + NumByteToWrite -= count; + numofpage = NumByteToWrite / EEPROM_PAGESIZE; + numofsingle = NumByteToWrite % EEPROM_PAGESIZE; + + if(count != 0) + { + /* Store the number of data to be written */ + dataindex = count; + status = BSP_EEPROM_WritePage(pBuffer, WriteAddr, (uint8_t*)(&dataindex)); + if(status != EEPROM_OK) + { + return status; + } + WriteAddr += count; + pBuffer += count; + } + + while(numofpage--) + { + /* Store the number of data to be written */ + dataindex = EEPROM_PAGESIZE; + status = BSP_EEPROM_WritePage(pBuffer, WriteAddr, (uint8_t*)(&dataindex)); + if(status != EEPROM_OK) + { + return status; + } + WriteAddr += EEPROM_PAGESIZE; + pBuffer += EEPROM_PAGESIZE; + } + if(numofsingle != 0) + { + /* Store the number of data to be written */ + dataindex = numofsingle; + status = BSP_EEPROM_WritePage(pBuffer, WriteAddr, (uint8_t*)(&dataindex)); + if(status != EEPROM_OK) + { + return status; + } + } + } + } + + /* If all operations OK, return EEPROM_OK (0) */ + return EEPROM_OK; +} + +/** + * @brief Wait for EEPROM Standby state. + * + * @note This function allows to wait and check that EEPROM has finished the + * last operation. It is mostly used after Write operation: after receiving + * the buffer to be written, the EEPROM may need additional time to actually + * perform the write operation. During this time, it doesn't answer to + * I2C packets addressed to it. Once the write operation is complete + * the EEPROM responds to its address. + * + * @retval EEPROM_OK (0) if operation is correctly performed, else return value + * different from EEPROM_OK (0) or the timeout user callback. + */ +uint32_t BSP_EEPROM_WaitEepromStandbyState(void) +{ + /* Check if the maximum allowed number of trials has bee reached */ + if(EEPROM_IO_IsDeviceReady(EEPROMAddress, EEPROM_MAX_TRIALS) != HAL_OK) + { + /* If the maximum number of trials has been reached, exit the function */ + BSP_EEPROM_TIMEOUT_UserCallback(); + return EEPROM_TIMEOUT; + } + return EEPROM_OK; +} + +/** + * @brief Basic management of the timeout situation. + */ +__weak void BSP_EEPROM_TIMEOUT_UserCallback(void) +{ +} + +/** + * @} + */ + +/** + * @} + */ + +/** + * @} + */ + +/** + * @} + */ + +/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Drivers/BSP/STM32469I-Discovery/stm32469i_discovery_eeprom.h Tue May 16 10:50:26 2017 +0200 @@ -0,0 +1,146 @@ +/** + ****************************************************************************** + * @file stm32469i_discovery_eeprom.h + * @author MCD Application Team + * @version V2.0.0 + * @date 27-January-2017 + * @brief This file contains all the functions prototypes for + * the stm32469i_discovery_eeprom.c firmware driver. + ****************************************************************************** + * @attention + * + * <h2><center>© COPYRIGHT(c) 2017 STMicroelectronics</center></h2> + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * 3. Neither the name of STMicroelectronics nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + ****************************************************************************** + */ + +/* Define to prevent recursive inclusion -------------------------------------*/ +#ifndef __STM32F469I_DISCOVERY_EEPROM_H +#define __STM32F469I_DISCOVERY_EEPROM_H + +#ifdef __cplusplus + extern "C" { +#endif + +/* Includes ------------------------------------------------------------------*/ +#include "stm32469i_discovery.h" + +/** @addtogroup BSP + * @{ + */ + +/** @addtogroup STM32469I_Discovery + * @{ + */ + +/** @addtogroup STM32469I-Discovery_EEPROM + * @brief This file includes the I2C EEPROM driver of STM32469I-Discovery board. + * @{ + */ + +/** @defgroup STM32469I-Discovery_EEPROM_Exported_Types STM32469I Discovery EEPROM Exported Types + * @{ + */ +/** + * @} + */ + +/** @defgroup STM32469I-Discovery_EEPROM_Exported_Constants STM32469I Discovery EEPROM Exported Constants + * @{ + */ +/* EEPROM hardware address and page size */ +#define EEPROM_PAGESIZE ((uint8_t)4) +#define EEPROM_MAX_SIZE ((uint16_t)0x2000) /* 64Kbit */ + +/* Maximum Timeout values for flags and events waiting loops. +This timeout is based on systick set to 1ms*/ +/* Timeout for read based if read all the EEPROM : EEPROM_MAX_SIZE * I2C_SPEED (640ms) */ +#define EEPROM_READ_TIMEOUT ((uint32_t)(1000)) +/* Timeout for write based on max write which is EEPROM_PAGESIZE bytes: EEPROM_PAGESIZE * I2C_SPEED (320us) */ +#define EEPROM_WRITE_TIMEOUT ((uint32_t)(10)) + +/* Maximum number of trials for EEPROM_WaitEepromStandbyState() function */ +#define EEPROM_MAX_TRIALS 3000 + +#define EEPROM_OK 0 +#define EEPROM_FAIL 1 +#define EEPROM_TIMEOUT 2 +/** + * @} + */ + +/** @defgroup STM32469I-Discovery_EEPROM_Exported_Macros STM32469I Discovery EEPROM Exported Macros + * @{ + */ +/** + * @} + */ + +/** @defgroup STM32469I-Discovery_EEPROM_Exported_Functions STM32469I Discovery EEPROM Exported Functions + * @{ + */ +uint32_t BSP_EEPROM_Init(void); +uint8_t BSP_EEPROM_DeInit(void); +uint32_t BSP_EEPROM_ReadBuffer(uint8_t* pBuffer, uint16_t ReadAddr, uint16_t* NumByteToRead); +uint32_t BSP_EEPROM_WritePage(uint8_t* pBuffer, uint16_t WriteAddr, uint8_t* NumByteToWrite); +uint32_t BSP_EEPROM_WriteBuffer(uint8_t* pBuffer, uint16_t WriteAddr, uint16_t NumByteToWrite); +uint32_t BSP_EEPROM_WaitEepromStandbyState(void); + +/* USER Callbacks: This function is declared as __weak in EEPROM driver and + should be implemented into user application. + BSP_EEPROM_TIMEOUT_UserCallback() function is called whenever a timeout condition + occure during communication (waiting on an event that doesn't occur, bus + errors, busy devices ...). */ +void BSP_EEPROM_TIMEOUT_UserCallback(void); + +/* Link function for I2C EEPROM peripheral */ +void EEPROM_IO_Init(void); +HAL_StatusTypeDef EEPROM_IO_WriteData(uint16_t DevAddress, uint16_t MemAddress, uint8_t *pBuffer, uint32_t BufferSize); +HAL_StatusTypeDef EEPROM_IO_ReadData(uint16_t DevAddress, uint16_t MemAddress, uint8_t *pBuffer, uint32_t BufferSize); +HAL_StatusTypeDef EEPROM_IO_IsDeviceReady(uint16_t DevAddress, uint32_t Trials); + +/** + * @} + */ + +/** + * @} + */ + +/** + * @} + */ + +/** + * @} + */ + +#ifdef __cplusplus +} +#endif + +#endif /* __STM32F469I_DISCOVERY_EEPROM_H */ + +/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Drivers/BSP/STM32469I-Discovery/stm32469i_discovery_lcd.c Tue May 16 10:50:26 2017 +0200 @@ -0,0 +1,1653 @@ +/** + ****************************************************************************** + * @file stm32469i_discovery_lcd.c + * @author MCD Application Team + * @version V2.0.0 + * @date 27-January-2017 + * @brief This file includes the driver for Liquid Crystal Display (LCD) module + * mounted on STM32469I-Discovery evaluation board. + ****************************************************************************** + * @attention + * + * <h2><center>© COPYRIGHT(c) 2017 STMicroelectronics</center></h2> + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * 3. Neither the name of STMicroelectronics nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + ****************************************************************************** + */ + +/* File Info: ------------------------------------------------------------------ + User NOTES +1. How To use this driver: +-------------------------- + - This driver is used to drive directly in video mode a LCD TFT using the DSI interface. + The following IPs are implied : DSI Host IP block working + in conjunction to the LTDC controller. + - This driver is linked by construction to LCD KoD mounted on board MB1166. + +2. Driver description: +--------------------- + + Initialization steps: + o Initialize the LCD using the BSP_LCD_Init() function. + o Select the LCD layer to be used using the BSP_LCD_SelectLayer() function. + o Enable the LCD display using the BSP_LCD_DisplayOn() function. + + + Options + o Configure and enable the color keying functionality using the + BSP_LCD_SetColorKeying() function. + o Modify in the fly the transparency and/or the frame buffer address + using the following functions: + - BSP_LCD_SetTransparency() + - BSP_LCD_SetLayerAddress() + + + Display on LCD + o Clear the whole LCD using BSP_LCD_Clear() function or only one specified string + line using the BSP_LCD_ClearStringLine() function. + o Display a character on the specified line and column using the BSP_LCD_DisplayChar() + function or a complete string line using the BSP_LCD_DisplayStringAtLine() function. + o Display a string line on the specified position (x,y in pixel) and align mode + using the BSP_LCD_DisplayStringAtLine() function. + o Draw and fill a basic shapes (dot, line, rectangle, circle, ellipse, .. bitmap) + on LCD using the available set of functions. + +------------------------------------------------------------------------------*/ + +/* Includes ------------------------------------------------------------------*/ +#include "stm32469i_discovery_lcd.h" +#include "../Fonts/fonts.h" +//#include "../../../Utilities/Fonts/font24.c" +//#include "../../../Utilities/Fonts/font20.c" +//#include "../../../Utilities/Fonts/font16.c" +//#include "../../../Utilities/Fonts/font12.c" +//#include "../../../Utilities/Fonts/font8.c" + +/** @addtogroup BSP + * @{ + */ + +/** @addtogroup STM32469I_Discovery + * @{ + */ + +/** @defgroup STM32469I-Discovery_LCD STM32469I Discovery LCD + * @{ + */ + +/** @defgroup STM32469I-Discovery_LCD_Private_TypesDefinitions STM32469I Discovery LCD Private TypesDefinitions + * @{ + */ +static DSI_VidCfgTypeDef hdsivideo_handle; + +/** + * @} + */ + +/** @defgroup STM32469I-Discovery_LCD_Private_Defines STM32469I Discovery LCD Private Defines + * @{ + */ +/** + * @} + */ + +/** @defgroup STM32469I-Discovery_LCD_Private_Macros STM32469I Discovery LCD Private Macros + * @{ + */ +#define ABS(X) ((X) > 0 ? (X) : -(X)) + +#define POLY_X(Z) ((int32_t)((Points + (Z))->X)) +#define POLY_Y(Z) ((int32_t)((Points + (Z))->Y)) +/** + * @} + */ + +/** @defgroup STM32469I-Discovery_LCD_Exported_Variables STM32469I Discovery LCD Exported Variables + * @{ + */ + +/** + * @} + */ + + +/** @defgroup STM32469I-Discovery_LCD_Private_Variables STM32469I Discovery LCD Private Variables + * @{ + */ + +DMA2D_HandleTypeDef hdma2d_eval; +LTDC_HandleTypeDef hltdc_eval; +DSI_HandleTypeDef hdsi_eval; +uint32_t lcd_x_size = OTM8009A_800X480_WIDTH; +uint32_t lcd_y_size = OTM8009A_800X480_HEIGHT; + +/** + * @} + */ + + +/** @defgroup STM32469I-Discovery_LCD_Private_Variables STM32469I Discovery LCD Private Variables + * @{ + */ + +/** + * @brief Default Active LTDC Layer in which drawing is made is LTDC Layer Background + */ +static uint32_t ActiveLayer = LTDC_ACTIVE_LAYER_BACKGROUND; + +/** + * @brief Current Drawing Layer properties variable + */ +static LCD_DrawPropTypeDef DrawProp[LTDC_MAX_LAYER_NUMBER]; +/** + * @} + */ + +/** @defgroup STM32469I-Discovery_LCD_Private_FunctionPrototypes STM32469I Discovery LCD Private FunctionPrototypes + * @{ + */ +static void DrawChar(uint16_t Xpos, uint16_t Ypos, const uint8_t *c); +static void FillTriangle(uint16_t x1, uint16_t x2, uint16_t x3, uint16_t y1, uint16_t y2, uint16_t y3); +static void LL_FillBuffer(uint32_t LayerIndex, void *pDst, uint32_t xSize, uint32_t ySize, uint32_t OffLine, uint32_t ColorIndex); +static void LL_ConvertLineToARGB8888(void * pSrc, void *pDst, uint32_t xSize, uint32_t ColorMode); +/** + * @} + */ + +/** @defgroup STM32469I-Discovery_LCD_Exported_Functions STM32469I Discovery LCD Exported Functions + * @{ + */ + +/** + * @brief Initializes the DSI LCD. + * @retval LCD state + */ +uint8_t BSP_LCD_Init(void) +{ + return (BSP_LCD_InitEx(LCD_ORIENTATION_LANDSCAPE)); +} + +/** + * @brief Initializes the DSI LCD. + * The ititialization is done as below: + * - DSI PLL ititialization + * - DSI ititialization + * - LTDC ititialization + * - OTM8009A LCD Display IC Driver ititialization + * @retval LCD state + */ +uint8_t BSP_LCD_InitEx(LCD_OrientationTypeDef orientation) +{ + DSI_PLLInitTypeDef dsiPllInit; + DSI_PHY_TimerTypeDef PhyTimings; + static RCC_PeriphCLKInitTypeDef PeriphClkInitStruct; + uint32_t LcdClock = 27429; /*!< LcdClk = 27429 kHz */ + + uint32_t laneByteClk_kHz = 0; + uint32_t VSA; /*!< Vertical start active time in units of lines */ + uint32_t VBP; /*!< Vertical Back Porch time in units of lines */ + uint32_t VFP; /*!< Vertical Front Porch time in units of lines */ + uint32_t VACT; /*!< Vertical Active time in units of lines = imageSize Y in pixels to display */ + uint32_t HSA; /*!< Horizontal start active time in units of lcdClk */ + uint32_t HBP; /*!< Horizontal Back Porch time in units of lcdClk */ + uint32_t HFP; /*!< Horizontal Front Porch time in units of lcdClk */ + uint32_t HACT; /*!< Horizontal Active time in units of lcdClk = imageSize X in pixels to display */ + + + /* Toggle Hardware Reset of the DSI LCD using + * its XRES signal (active low) */ + BSP_LCD_Reset(); + + /* Call first MSP Initialize only in case of first initialization + * This will set IP blocks LTDC, DSI and DMA2D + * - out of reset + * - clocked + * - NVIC IRQ related to IP blocks enabled + */ + BSP_LCD_MspInit(); + +/*************************DSI Initialization***********************************/ + + /* Base address of DSI Host/Wrapper registers to be set before calling De-Init */ + hdsi_eval.Instance = DSI; + + HAL_DSI_DeInit(&(hdsi_eval)); + +#if !defined(USE_STM32469I_DISCO_REVA) + dsiPllInit.PLLNDIV = 125; + dsiPllInit.PLLIDF = DSI_PLL_IN_DIV2; + dsiPllInit.PLLODF = DSI_PLL_OUT_DIV1; +#else + dsiPllInit.PLLNDIV = 100; + dsiPllInit.PLLIDF = DSI_PLL_IN_DIV5; + dsiPllInit.PLLODF = DSI_PLL_OUT_DIV1; +#endif + laneByteClk_kHz = 62500; /* 500 MHz / 8 = 62.5 MHz = 62500 kHz */ + + /* Set number of Lanes */ + hdsi_eval.Init.NumberOfLanes = DSI_TWO_DATA_LANES; + + /* TXEscapeCkdiv = f(LaneByteClk)/15.62 = 4 */ + hdsi_eval.Init.TXEscapeCkdiv = laneByteClk_kHz/15620; + + HAL_DSI_Init(&(hdsi_eval), &(dsiPllInit)); + + /* Timing parameters for all Video modes + * Set Timing parameters of LTDC depending on its chosen orientation + */ + if(orientation == LCD_ORIENTATION_PORTRAIT) + { + lcd_x_size = OTM8009A_480X800_WIDTH; /* 480 */ + lcd_y_size = OTM8009A_480X800_HEIGHT; /* 800 */ + } + else + { + /* lcd_orientation == LCD_ORIENTATION_LANDSCAPE */ + lcd_x_size = OTM8009A_800X480_WIDTH; /* 800 */ + lcd_y_size = OTM8009A_800X480_HEIGHT; /* 480 */ + } + + HACT = lcd_x_size; + VACT = lcd_y_size; + + /* The following values are same for portrait and landscape orientations */ + VSA = OTM8009A_480X800_VSYNC; + VBP = OTM8009A_480X800_VBP; + VFP = OTM8009A_480X800_VFP; + HSA = OTM8009A_480X800_HSYNC; + HBP = OTM8009A_480X800_HBP; + HFP = OTM8009A_480X800_HFP; + + + hdsivideo_handle.VirtualChannelID = LCD_OTM8009A_ID; + hdsivideo_handle.ColorCoding = LCD_DSI_PIXEL_DATA_FMT_RBG888; + hdsivideo_handle.VSPolarity = DSI_VSYNC_ACTIVE_HIGH; + hdsivideo_handle.HSPolarity = DSI_HSYNC_ACTIVE_HIGH; + hdsivideo_handle.DEPolarity = DSI_DATA_ENABLE_ACTIVE_HIGH; + hdsivideo_handle.Mode = DSI_VID_MODE_BURST; /* Mode Video burst ie : one LgP per line */ + hdsivideo_handle.NullPacketSize = 0xFFF; + hdsivideo_handle.NumberOfChunks = 0; + hdsivideo_handle.PacketSize = HACT; /* Value depending on display orientation choice portrait/landscape */ + hdsivideo_handle.HorizontalSyncActive = (HSA * laneByteClk_kHz) / LcdClock; + hdsivideo_handle.HorizontalBackPorch = (HBP * laneByteClk_kHz) / LcdClock; + hdsivideo_handle.HorizontalLine = ((HACT + HSA + HBP + HFP) * laneByteClk_kHz) / LcdClock; /* Value depending on display orientation choice portrait/landscape */ + hdsivideo_handle.VerticalSyncActive = VSA; + hdsivideo_handle.VerticalBackPorch = VBP; + hdsivideo_handle.VerticalFrontPorch = VFP; + hdsivideo_handle.VerticalActive = VACT; /* Value depending on display orientation choice portrait/landscape */ + + /* Enable or disable sending LP command while streaming is active in video mode */ + hdsivideo_handle.LPCommandEnable = DSI_LP_COMMAND_ENABLE; /* Enable sending commands in mode LP (Low Power) */ + + /* Largest packet size possible to transmit in LP mode in VSA, VBP, VFP regions */ + /* Only useful when sending LP packets is allowed while streaming is active in video mode */ + hdsivideo_handle.LPLargestPacketSize = 16; + + /* Largest packet size possible to transmit in LP mode in HFP region during VACT period */ + /* Only useful when sending LP packets is allowed while streaming is active in video mode */ + hdsivideo_handle.LPVACTLargestPacketSize = 0; + + + /* Specify for each region of the video frame, if the transmission of command in LP mode is allowed in this region */ + /* while streaming is active in video mode */ + hdsivideo_handle.LPHorizontalFrontPorchEnable = DSI_LP_HFP_ENABLE; /* Allow sending LP commands during HFP period */ + hdsivideo_handle.LPHorizontalBackPorchEnable = DSI_LP_HBP_ENABLE; /* Allow sending LP commands during HBP period */ + hdsivideo_handle.LPVerticalActiveEnable = DSI_LP_VACT_ENABLE; /* Allow sending LP commands during VACT period */ + hdsivideo_handle.LPVerticalFrontPorchEnable = DSI_LP_VFP_ENABLE; /* Allow sending LP commands during VFP period */ + hdsivideo_handle.LPVerticalBackPorchEnable = DSI_LP_VBP_ENABLE; /* Allow sending LP commands during VBP period */ + hdsivideo_handle.LPVerticalSyncActiveEnable = DSI_LP_VSYNC_ENABLE; /* Allow sending LP commands during VSync = VSA period */ + + /* Configure DSI Video mode timings with settings set above */ + HAL_DSI_ConfigVideoMode(&(hdsi_eval), &(hdsivideo_handle)); + + /* Configure DSI PHY HS2LP and LP2HS timings */ + PhyTimings.ClockLaneHS2LPTime = 35; + PhyTimings.ClockLaneLP2HSTime = 35; + PhyTimings.DataLaneHS2LPTime = 35; + PhyTimings.DataLaneLP2HSTime = 35; + PhyTimings.DataLaneMaxReadTime = 0; + PhyTimings.StopWaitTime = 10; + HAL_DSI_ConfigPhyTimer(&hdsi_eval, &PhyTimings); + +/*************************End DSI Initialization*******************************/ + + +/************************LTDC Initialization***********************************/ + + /* Timing Configuration */ + hltdc_eval.Init.HorizontalSync = (HSA - 1); + hltdc_eval.Init.AccumulatedHBP = (HSA + HBP - 1); + hltdc_eval.Init.AccumulatedActiveW = (lcd_x_size + HSA + HBP - 1); + hltdc_eval.Init.TotalWidth = (lcd_x_size + HSA + HBP + HFP - 1); + + /* Initialize the LCD pixel width and pixel height */ + hltdc_eval.LayerCfg->ImageWidth = lcd_x_size; + hltdc_eval.LayerCfg->ImageHeight = lcd_y_size; + + + /* LCD clock configuration */ + /* PLLSAI_VCO Input = HSE_VALUE/PLL_M = 1 Mhz */ + /* PLLSAI_VCO Output = PLLSAI_VCO Input * PLLSAIN = 384 Mhz */ + /* PLLLCDCLK = PLLSAI_VCO Output/PLLSAIR = 384 MHz / 7 = 54.857 MHz */ + /* LTDC clock frequency = PLLLCDCLK / LTDC_PLLSAI_DIVR_2 = 54.857 MHz / 2 = 27.429 MHz */ + PeriphClkInitStruct.PeriphClockSelection = RCC_PERIPHCLK_LTDC; + PeriphClkInitStruct.PLLSAI.PLLSAIN = 384; + PeriphClkInitStruct.PLLSAI.PLLSAIR = 7; + PeriphClkInitStruct.PLLSAIDivR = RCC_PLLSAIDIVR_2; + HAL_RCCEx_PeriphCLKConfig(&PeriphClkInitStruct); + + /* Background value */ + hltdc_eval.Init.Backcolor.Blue = 0; + hltdc_eval.Init.Backcolor.Green = 0; + hltdc_eval.Init.Backcolor.Red = 0; + hltdc_eval.Init.PCPolarity = LTDC_PCPOLARITY_IPC; + hltdc_eval.Instance = LTDC; + + /* Get LTDC Configuration from DSI Configuration */ + HAL_LTDCEx_StructInitFromVideoConfig(&(hltdc_eval), &(hdsivideo_handle)); + + /* Initialize the LTDC */ + HAL_LTDC_Init(&hltdc_eval); + + /* Enable the DSI host and wrapper after the LTDC initialization + To avoid any synchronization issue, the DSI shall be started after enabling the LTDC */ + HAL_DSI_Start(&(hdsi_eval)); + +#if !defined(DATA_IN_ExtSDRAM) + /* Initialize the SDRAM */ + BSP_SDRAM_Init(); +#endif /* DATA_IN_ExtSDRAM */ + + /* Initialize the font */ + BSP_LCD_SetFont(&LCD_DEFAULT_FONT); + +/************************End LTDC Initialization*******************************/ + + +/***********************OTM8009A Initialization********************************/ + + /* Initialize the OTM8009A LCD Display IC Driver (KoD LCD IC Driver) + * depending on configuration set in 'hdsivideo_handle'. + */ + OTM8009A_Init(OTM8009A_FORMAT_RGB888, orientation); + +/***********************End OTM8009A Initialization****************************/ + + return LCD_OK; +} + +/** + * @brief BSP LCD Reset + * Hw reset the LCD DSI activating its XRES signal (active low for some time) + * and desactivating it later. + * This signal is only cabled on Discovery Rev B and beyond. + */ +void BSP_LCD_Reset(void) +{ +#if !defined(USE_STM32469I_DISCO_REVA) +/* EVAL Rev B and beyond : reset the LCD by activation of XRES (active low) connected to PH7 */ + GPIO_InitTypeDef gpio_init_structure; + + __HAL_RCC_GPIOH_CLK_ENABLE(); + + /* Configure the GPIO on PH7 */ + gpio_init_structure.Pin = GPIO_PIN_7; + gpio_init_structure.Mode = GPIO_MODE_OUTPUT_OD; + gpio_init_structure.Pull = GPIO_NOPULL; + gpio_init_structure.Speed = GPIO_SPEED_HIGH; + + HAL_GPIO_Init(GPIOH, &gpio_init_structure); + + /* Activate XRES active low */ + HAL_GPIO_WritePin(GPIOH, GPIO_PIN_7, GPIO_PIN_RESET); + + //HAL_Delay(20); /* wait 20 ms */ + wait_ms(20); + + /* Desactivate XRES */ + HAL_GPIO_WritePin(GPIOH, GPIO_PIN_7, GPIO_PIN_SET); + + /* Wait for 10ms after releasing XRES before sending commands */ + //HAL_Delay(10); + wait_ms(10); +#else + +#endif /* USE_STM32469I_DISCO_REVA == 0 */ +} + +/** + * @brief Gets the LCD X size. + * @retval Used LCD X size + */ +uint32_t BSP_LCD_GetXSize(void) +{ + return (lcd_x_size); +} + +/** + * @brief Gets the LCD Y size. + * @retval Used LCD Y size + */ +uint32_t BSP_LCD_GetYSize(void) +{ + return (lcd_y_size); +} + +/** + * @brief Set the LCD X size. + * @param imageWidthPixels : uint32_t image width in pixels unit + */ +void BSP_LCD_SetXSize(uint32_t imageWidthPixels) +{ + hltdc_eval.LayerCfg[ActiveLayer].ImageWidth = imageWidthPixels; +} + +/** + * @brief Set the LCD Y size. + * @param imageHeightPixels : uint32_t image height in lines unit + */ +void BSP_LCD_SetYSize(uint32_t imageHeightPixels) +{ + hltdc_eval.LayerCfg[ActiveLayer].ImageHeight = imageHeightPixels; +} + + +/** + * @brief Initializes the LCD layers. + * @param LayerIndex: Layer foreground or background + * @param FB_Address: Layer frame buffer + */ +void BSP_LCD_LayerDefaultInit(uint16_t LayerIndex, uint32_t FB_Address) +{ + LCD_LayerCfgTypeDef Layercfg; + + /* Layer Init */ + Layercfg.WindowX0 = 0; + Layercfg.WindowX1 = BSP_LCD_GetXSize(); + Layercfg.WindowY0 = 0; + Layercfg.WindowY1 = BSP_LCD_GetYSize(); + Layercfg.PixelFormat = LTDC_PIXEL_FORMAT_ARGB8888; + Layercfg.FBStartAdress = FB_Address; + Layercfg.Alpha = 255; + Layercfg.Alpha0 = 0; + Layercfg.Backcolor.Blue = 0; + Layercfg.Backcolor.Green = 0; + Layercfg.Backcolor.Red = 0; + Layercfg.BlendingFactor1 = LTDC_BLENDING_FACTOR1_PAxCA; + Layercfg.BlendingFactor2 = LTDC_BLENDING_FACTOR2_PAxCA; + Layercfg.ImageWidth = BSP_LCD_GetXSize(); + Layercfg.ImageHeight = BSP_LCD_GetYSize(); + + HAL_LTDC_ConfigLayer(&hltdc_eval, &Layercfg, LayerIndex); + + DrawProp[LayerIndex].BackColor = LCD_COLOR_WHITE; + DrawProp[LayerIndex].pFont = &Font24; + DrawProp[LayerIndex].TextColor = LCD_COLOR_BLACK; +} + + +/** + * @brief Selects the LCD Layer. + * @param LayerIndex: Layer foreground or background + */ +void BSP_LCD_SelectLayer(uint32_t LayerIndex) +{ + ActiveLayer = LayerIndex; +} + +/** + * @brief Sets an LCD Layer visible + * @param LayerIndex: Visible Layer + * @param State: New state of the specified layer + * This parameter can be one of the following values: + * @arg ENABLE + * @arg DISABLE + */ +void BSP_LCD_SetLayerVisible(uint32_t LayerIndex, FunctionalState State) +{ + if(State == ENABLE) + { + __HAL_LTDC_LAYER_ENABLE(&(hltdc_eval), LayerIndex); + } + else + { + __HAL_LTDC_LAYER_DISABLE(&(hltdc_eval), LayerIndex); + } + __HAL_LTDC_RELOAD_IMMEDIATE_CONFIG(&(hltdc_eval)); + +} + +/** + * @brief Configures the transparency. + * @param LayerIndex: Layer foreground or background. + * @param Transparency: Transparency + * This parameter must be a number between Min_Data = 0x00 and Max_Data = 0xFF + */ +void BSP_LCD_SetTransparency(uint32_t LayerIndex, uint8_t Transparency) +{ + + HAL_LTDC_SetAlpha(&(hltdc_eval), Transparency, LayerIndex); + +} + +/** + * @brief Sets an LCD layer frame buffer address. + * @param LayerIndex: Layer foreground or background + * @param Address: New LCD frame buffer value + */ +void BSP_LCD_SetLayerAddress(uint32_t LayerIndex, uint32_t Address) +{ + + HAL_LTDC_SetAddress(&(hltdc_eval), Address, LayerIndex); + +} + +/** + * @brief Sets display window. + * @param LayerIndex: Layer index + * @param Xpos: LCD X position + * @param Ypos: LCD Y position + * @param Width: LCD window width + * @param Height: LCD window height + */ +void BSP_LCD_SetLayerWindow(uint16_t LayerIndex, uint16_t Xpos, uint16_t Ypos, uint16_t Width, uint16_t Height) +{ + /* Reconfigure the layer size */ + HAL_LTDC_SetWindowSize(&(hltdc_eval), Width, Height, LayerIndex); + + /* Reconfigure the layer position */ + HAL_LTDC_SetWindowPosition(&(hltdc_eval), Xpos, Ypos, LayerIndex); + +} + +/** + * @brief Configures and sets the color keying. + * @param LayerIndex: Layer foreground or background + * @param RGBValue: Color reference + */ +void BSP_LCD_SetColorKeying(uint32_t LayerIndex, uint32_t RGBValue) +{ + /* Configure and Enable the color Keying for LCD Layer */ + HAL_LTDC_ConfigColorKeying(&(hltdc_eval), RGBValue, LayerIndex); + HAL_LTDC_EnableColorKeying(&(hltdc_eval), LayerIndex); +} + +/** + * @brief Disables the color keying. + * @param LayerIndex: Layer foreground or background + */ +void BSP_LCD_ResetColorKeying(uint32_t LayerIndex) +{ + /* Disable the color Keying for LCD Layer */ + HAL_LTDC_DisableColorKeying(&(hltdc_eval), LayerIndex); +} + +/** + * @brief Sets the LCD text color. + * @param Color: Text color code ARGB(8-8-8-8) + */ +void BSP_LCD_SetTextColor(uint32_t Color) +{ + DrawProp[ActiveLayer].TextColor = Color; +} + +/** + * @brief Gets the LCD text color. + * @retval Used text color. + */ +uint32_t BSP_LCD_GetTextColor(void) +{ + return DrawProp[ActiveLayer].TextColor; +} + +/** + * @brief Sets the LCD background color. + * @param Color: Layer background color code ARGB(8-8-8-8) + */ +void BSP_LCD_SetBackColor(uint32_t Color) +{ + DrawProp[ActiveLayer].BackColor = Color; +} + +/** + * @brief Gets the LCD background color. + * @retval Used background color + */ +uint32_t BSP_LCD_GetBackColor(void) +{ + return DrawProp[ActiveLayer].BackColor; +} + +/** + * @brief Sets the LCD text font. + * @param fonts: Layer font to be used + */ +void BSP_LCD_SetFont(sFONT *fonts) +{ + DrawProp[ActiveLayer].pFont = fonts; +} + +/** + * @brief Gets the LCD text font. + * @retval Used layer font + */ +sFONT *BSP_LCD_GetFont(void) +{ + return DrawProp[ActiveLayer].pFont; +} + +/** + * @brief Reads an LCD pixel. + * @param Xpos: X position + * @param Ypos: Y position + * @retval RGB pixel color + */ +uint32_t BSP_LCD_ReadPixel(uint16_t Xpos, uint16_t Ypos) +{ + uint32_t ret = 0; + + if(hltdc_eval.LayerCfg[ActiveLayer].PixelFormat == LTDC_PIXEL_FORMAT_ARGB8888) + { + /* Read data value from SDRAM memory */ + ret = *(__IO uint32_t*) (hltdc_eval.LayerCfg[ActiveLayer].FBStartAdress + (4*(Ypos*BSP_LCD_GetXSize() + Xpos))); + } + else if(hltdc_eval.LayerCfg[ActiveLayer].PixelFormat == LTDC_PIXEL_FORMAT_RGB888) + { + /* Read data value from SDRAM memory */ + ret = (*(__IO uint32_t*) (hltdc_eval.LayerCfg[ActiveLayer].FBStartAdress + (4*(Ypos*BSP_LCD_GetXSize() + Xpos))) & 0x00FFFFFF); + } + else if((hltdc_eval.LayerCfg[ActiveLayer].PixelFormat == LTDC_PIXEL_FORMAT_RGB565) || \ + (hltdc_eval.LayerCfg[ActiveLayer].PixelFormat == LTDC_PIXEL_FORMAT_ARGB4444) || \ + (hltdc_eval.LayerCfg[ActiveLayer].PixelFormat == LTDC_PIXEL_FORMAT_AL88)) + { + /* Read data value from SDRAM memory */ + ret = *(__IO uint16_t*) (hltdc_eval.LayerCfg[ActiveLayer].FBStartAdress + (2*(Ypos*BSP_LCD_GetXSize() + Xpos))); + } + else + { + /* Read data value from SDRAM memory */ + ret = *(__IO uint8_t*) (hltdc_eval.LayerCfg[ActiveLayer].FBStartAdress + (2*(Ypos*BSP_LCD_GetXSize() + Xpos))); + } + + return ret; +} + +/** + * @brief Clears the whole currently active layer of LTDC. + * @param Color: Color of the background + */ +void BSP_LCD_Clear(uint32_t Color) +{ + /* Clear the LCD */ + LL_FillBuffer(ActiveLayer, (uint32_t *)(hltdc_eval.LayerCfg[ActiveLayer].FBStartAdress), BSP_LCD_GetXSize(), BSP_LCD_GetYSize(), 0, Color); +} + +/** + * @brief Clears the selected line in currently active layer. + * @param Line: Line to be cleared + */ +void BSP_LCD_ClearStringLine(uint32_t Line) +{ + uint32_t color_backup = DrawProp[ActiveLayer].TextColor; + DrawProp[ActiveLayer].TextColor = DrawProp[ActiveLayer].BackColor; + + /* Draw rectangle with background color */ + BSP_LCD_FillRect(0, (Line * DrawProp[ActiveLayer].pFont->Height), BSP_LCD_GetXSize(), DrawProp[ActiveLayer].pFont->Height); + + DrawProp[ActiveLayer].TextColor = color_backup; + BSP_LCD_SetTextColor(DrawProp[ActiveLayer].TextColor); +} + +/** + * @brief Displays one character in currently active layer. + * @param Xpos: Start column address + * @param Ypos: Line where to display the character shape. + * @param Ascii: Character ascii code + * This parameter must be a number between Min_Data = 0x20 and Max_Data = 0x7E + */ +void BSP_LCD_DisplayChar(uint16_t Xpos, uint16_t Ypos, uint8_t Ascii) +{ + DrawChar(Xpos, Ypos, &DrawProp[ActiveLayer].pFont->table[(Ascii-' ') *\ + DrawProp[ActiveLayer].pFont->Height * ((DrawProp[ActiveLayer].pFont->Width + 7) / 8)]); +} + +/** + * @brief Displays characters in currently active layer. + * @param Xpos: X position (in pixel) + * @param Ypos: Y position (in pixel) + * @param Text: Pointer to string to display on LCD + * @param Mode: Display mode + * This parameter can be one of the following values: + * @arg CENTER_MODE + * @arg RIGHT_MODE + * @arg LEFT_MODE + */ +void BSP_LCD_DisplayStringAt(uint16_t Xpos, uint16_t Ypos, uint8_t *Text, Text_AlignModeTypdef Mode) +{ + uint16_t refcolumn = 1, i = 0; + uint32_t size = 0, xsize = 0; + uint8_t *ptr = Text; + + /* Get the text size */ + while (*ptr++) size ++ ; + + /* Characters number per line */ + xsize = (BSP_LCD_GetXSize()/DrawProp[ActiveLayer].pFont->Width); + + switch (Mode) + { + case CENTER_MODE: + { + refcolumn = Xpos + ((xsize - size)* DrawProp[ActiveLayer].pFont->Width) / 2; + break; + } + case LEFT_MODE: + { + refcolumn = Xpos; + break; + } + case RIGHT_MODE: + { + refcolumn = - Xpos + ((xsize - size)*DrawProp[ActiveLayer].pFont->Width); + break; + } + default: + { + refcolumn = Xpos; + break; + } + } + + /* Check that the Start column is located in the screen */ + if ((refcolumn < 1) || (refcolumn >= 0x8000)) + { + refcolumn = 1; + } + + /* Send the string character by character on LCD */ + while ((*Text != 0) & (((BSP_LCD_GetXSize() - (i*DrawProp[ActiveLayer].pFont->Width)) & 0xFFFF) >= DrawProp[ActiveLayer].pFont->Width)) + { + /* Display one character on LCD */ + BSP_LCD_DisplayChar(refcolumn, Ypos, *Text); + /* Decrement the column position by 16 */ + refcolumn += DrawProp[ActiveLayer].pFont->Width; + + /* Point on the next character */ + Text++; + i++; + } + +} + +/** + * @brief Displays a maximum of 60 characters on the LCD. + * @param Line: Line where to display the character shape + * @param ptr: Pointer to string to display on LCD + */ +void BSP_LCD_DisplayStringAtLine(uint16_t Line, uint8_t *ptr) +{ + BSP_LCD_DisplayStringAt(0, LINE(Line), ptr, LEFT_MODE); +} + +/** + * @brief Draws an horizontal line in currently active layer. + * @param Xpos: X position + * @param Ypos: Y position + * @param Length: Line length + */ +void BSP_LCD_DrawHLine(uint16_t Xpos, uint16_t Ypos, uint16_t Length) +{ + uint32_t Xaddress = 0; + + /* Get the line address */ + Xaddress = (hltdc_eval.LayerCfg[ActiveLayer].FBStartAdress) + 4*(BSP_LCD_GetXSize()*Ypos + Xpos); + + /* Write line */ + LL_FillBuffer(ActiveLayer, (uint32_t *)Xaddress, Length, 1, 0, DrawProp[ActiveLayer].TextColor); +} + +/** + * @brief Draws a vertical line in currently active layer. + * @param Xpos: X position + * @param Ypos: Y position + * @param Length: Line length + */ +void BSP_LCD_DrawVLine(uint16_t Xpos, uint16_t Ypos, uint16_t Length) +{ + uint32_t Xaddress = 0; + + /* Get the line address */ + Xaddress = (hltdc_eval.LayerCfg[ActiveLayer].FBStartAdress) + 4*(BSP_LCD_GetXSize()*Ypos + Xpos); + + /* Write line */ + LL_FillBuffer(ActiveLayer, (uint32_t *)Xaddress, 1, Length, (BSP_LCD_GetXSize() - 1), DrawProp[ActiveLayer].TextColor); +} + +/** + * @brief Draws an uni-line (between two points) in currently active layer. + * @param x1: Point 1 X position + * @param y1: Point 1 Y position + * @param x2: Point 2 X position + * @param y2: Point 2 Y position + */ +void BSP_LCD_DrawLine(uint16_t x1, uint16_t y1, uint16_t x2, uint16_t y2) +{ + int16_t deltax = 0, deltay = 0, x = 0, y = 0, xinc1 = 0, xinc2 = 0, + yinc1 = 0, yinc2 = 0, den = 0, num = 0, numadd = 0, numpixels = 0, + curpixel = 0; + + deltax = ABS(x2 - x1); /* The difference between the x's */ + deltay = ABS(y2 - y1); /* The difference between the y's */ + x = x1; /* Start x off at the first pixel */ + y = y1; /* Start y off at the first pixel */ + + if (x2 >= x1) /* The x-values are increasing */ + { + xinc1 = 1; + xinc2 = 1; + } + else /* The x-values are decreasing */ + { + xinc1 = -1; + xinc2 = -1; + } + + if (y2 >= y1) /* The y-values are increasing */ + { + yinc1 = 1; + yinc2 = 1; + } + else /* The y-values are decreasing */ + { + yinc1 = -1; + yinc2 = -1; + } + + if (deltax >= deltay) /* There is at least one x-value for every y-value */ + { + xinc1 = 0; /* Don't change the x when numerator >= denominator */ + yinc2 = 0; /* Don't change the y for every iteration */ + den = deltax; + num = deltax / 2; + numadd = deltay; + numpixels = deltax; /* There are more x-values than y-values */ + } + else /* There is at least one y-value for every x-value */ + { + xinc2 = 0; /* Don't change the x for every iteration */ + yinc1 = 0; /* Don't change the y when numerator >= denominator */ + den = deltay; + num = deltay / 2; + numadd = deltax; + numpixels = deltay; /* There are more y-values than x-values */ + } + + for (curpixel = 0; curpixel <= numpixels; curpixel++) + { + BSP_LCD_DrawPixel(x, y, DrawProp[ActiveLayer].TextColor); /* Draw the current pixel */ + num += numadd; /* Increase the numerator by the top of the fraction */ + if (num >= den) /* Check if numerator >= denominator */ + { + num -= den; /* Calculate the new numerator value */ + x += xinc1; /* Change the x as appropriate */ + y += yinc1; /* Change the y as appropriate */ + } + x += xinc2; /* Change the x as appropriate */ + y += yinc2; /* Change the y as appropriate */ + } +} + +/** + * @brief Draws a rectangle in currently active layer. + * @param Xpos: X position + * @param Ypos: Y position + * @param Width: Rectangle width + * @param Height: Rectangle height + */ +void BSP_LCD_DrawRect(uint16_t Xpos, uint16_t Ypos, uint16_t Width, uint16_t Height) +{ + /* Draw horizontal lines */ + BSP_LCD_DrawHLine(Xpos, Ypos, Width); + BSP_LCD_DrawHLine(Xpos, (Ypos+ Height), Width); + + /* Draw vertical lines */ + BSP_LCD_DrawVLine(Xpos, Ypos, Height); + BSP_LCD_DrawVLine((Xpos + Width), Ypos, Height); +} + +/** + * @brief Draws a circle in currently active layer. + * @param Xpos: X position + * @param Ypos: Y position + * @param Radius: Circle radius + */ +void BSP_LCD_DrawCircle(uint16_t Xpos, uint16_t Ypos, uint16_t Radius) +{ + int32_t D; /* Decision Variable */ + uint32_t CurX; /* Current X Value */ + uint32_t CurY; /* Current Y Value */ + + D = 3 - (Radius << 1); + CurX = 0; + CurY = Radius; + + while (CurX <= CurY) + { + BSP_LCD_DrawPixel((Xpos + CurX), (Ypos - CurY), DrawProp[ActiveLayer].TextColor); + + BSP_LCD_DrawPixel((Xpos - CurX), (Ypos - CurY), DrawProp[ActiveLayer].TextColor); + + BSP_LCD_DrawPixel((Xpos + CurY), (Ypos - CurX), DrawProp[ActiveLayer].TextColor); + + BSP_LCD_DrawPixel((Xpos - CurY), (Ypos - CurX), DrawProp[ActiveLayer].TextColor); + + BSP_LCD_DrawPixel((Xpos + CurX), (Ypos + CurY), DrawProp[ActiveLayer].TextColor); + + BSP_LCD_DrawPixel((Xpos - CurX), (Ypos + CurY), DrawProp[ActiveLayer].TextColor); + + BSP_LCD_DrawPixel((Xpos + CurY), (Ypos + CurX), DrawProp[ActiveLayer].TextColor); + + BSP_LCD_DrawPixel((Xpos - CurY), (Ypos + CurX), DrawProp[ActiveLayer].TextColor); + + if (D < 0) + { + D += (CurX << 2) + 6; + } + else + { + D += ((CurX - CurY) << 2) + 10; + CurY--; + } + CurX++; + } +} + +/** + * @brief Draws an poly-line (between many points) in currently active layer. + * @param Points: Pointer to the points array + * @param PointCount: Number of points + */ +void BSP_LCD_DrawPolygon(pPoint Points, uint16_t PointCount) +{ + int16_t X = 0, Y = 0; + + if(PointCount < 2) + { + return; + } + + BSP_LCD_DrawLine(Points->X, Points->Y, (Points+PointCount-1)->X, (Points+PointCount-1)->Y); + + while(--PointCount) + { + X = Points->X; + Y = Points->Y; + Points++; + BSP_LCD_DrawLine(X, Y, Points->X, Points->Y); + } +} + +/** + * @brief Draws an ellipse on LCD in currently active layer. + * @param Xpos: X position + * @param Ypos: Y position + * @param XRadius: Ellipse X radius + * @param YRadius: Ellipse Y radius + */ +void BSP_LCD_DrawEllipse(int Xpos, int Ypos, int XRadius, int YRadius) +{ + int x = 0, y = -YRadius, err = 2-2*XRadius, e2; + float K = 0, rad1 = 0, rad2 = 0; + + rad1 = XRadius; + rad2 = YRadius; + + K = (float)(rad2/rad1); + + do { + BSP_LCD_DrawPixel((Xpos-(uint16_t)(x/K)), (Ypos+y), DrawProp[ActiveLayer].TextColor); + BSP_LCD_DrawPixel((Xpos+(uint16_t)(x/K)), (Ypos+y), DrawProp[ActiveLayer].TextColor); + BSP_LCD_DrawPixel((Xpos+(uint16_t)(x/K)), (Ypos-y), DrawProp[ActiveLayer].TextColor); + BSP_LCD_DrawPixel((Xpos-(uint16_t)(x/K)), (Ypos-y), DrawProp[ActiveLayer].TextColor); + + e2 = err; + if (e2 <= x) { + err += ++x*2+1; + if (-y == x && e2 <= y) e2 = 0; + } + if (e2 > y) err += ++y*2+1; + } + while (y <= 0); +} + +/** + * @brief Draws a bitmap picture loaded in the internal Flash (32 bpp) in currently active layer. + * @param Xpos: Bmp X position in the LCD + * @param Ypos: Bmp Y position in the LCD + * @param pbmp: Pointer to Bmp picture address in the internal Flash + */ +void BSP_LCD_DrawBitmap(uint32_t Xpos, uint32_t Ypos, uint8_t *pbmp) +{ + uint32_t index = 0, width = 0, height = 0, bit_pixel = 0; + uint32_t Address; + uint32_t InputColorMode = 0; + + /* Get bitmap data address offset */ + index = *(__IO uint16_t *) (pbmp + 10); + index |= (*(__IO uint16_t *) (pbmp + 12)) << 16; + + /* Read bitmap width */ + width = *(uint16_t *) (pbmp + 18); + width |= (*(uint16_t *) (pbmp + 20)) << 16; + + /* Read bitmap height */ + height = *(uint16_t *) (pbmp + 22); + height |= (*(uint16_t *) (pbmp + 24)) << 16; + + /* Read bit/pixel */ + bit_pixel = *(uint16_t *) (pbmp + 28); + + /* Set the address */ + Address = hltdc_eval.LayerCfg[ActiveLayer].FBStartAdress + (((BSP_LCD_GetXSize()*Ypos) + Xpos)*(4)); + + /* Get the layer pixel format */ + if ((bit_pixel/8) == 4) + { + InputColorMode = CM_ARGB8888; + } + else if ((bit_pixel/8) == 2) + { + InputColorMode = CM_RGB565; + } + else + { + InputColorMode = CM_RGB888; + } + + /* Bypass the bitmap header */ + pbmp += (index + (width * (height - 1) * (bit_pixel/8))); + + /* Convert picture to ARGB8888 pixel format */ + for(index=0; index < height; index++) + { + /* Pixel format conversion */ + LL_ConvertLineToARGB8888((uint32_t *)pbmp, (uint32_t *)Address, width, InputColorMode); + + /* Increment the source and destination buffers */ + Address+= (BSP_LCD_GetXSize()*4); + pbmp -= width*(bit_pixel/8); + } +} + +/** + * @brief Draws a full rectangle in currently active layer. + * @param Xpos: X position + * @param Ypos: Y position + * @param Width: Rectangle width + * @param Height: Rectangle height + */ +void BSP_LCD_FillRect(uint16_t Xpos, uint16_t Ypos, uint16_t Width, uint16_t Height) +{ + uint32_t Xaddress = 0; + + /* Set the text color */ + BSP_LCD_SetTextColor(DrawProp[ActiveLayer].TextColor); + + /* Get the rectangle start address */ + Xaddress = (hltdc_eval.LayerCfg[ActiveLayer].FBStartAdress) + 4*(BSP_LCD_GetXSize()*Ypos + Xpos); + + /* Fill the rectangle */ + LL_FillBuffer(ActiveLayer, (uint32_t *)Xaddress, Width, Height, (BSP_LCD_GetXSize() - Width), DrawProp[ActiveLayer].TextColor); +} + +/** + * @brief Draws a full circle in currently active layer. + * @param Xpos: X position + * @param Ypos: Y position + * @param Radius: Circle radius + */ +void BSP_LCD_FillCircle(uint16_t Xpos, uint16_t Ypos, uint16_t Radius) +{ + int32_t D; /* Decision Variable */ + uint32_t CurX; /* Current X Value */ + uint32_t CurY; /* Current Y Value */ + + D = 3 - (Radius << 1); + + CurX = 0; + CurY = Radius; + + BSP_LCD_SetTextColor(DrawProp[ActiveLayer].TextColor); + + while (CurX <= CurY) + { + if(CurY > 0) + { + BSP_LCD_DrawHLine(Xpos - CurY, Ypos + CurX, 2*CurY); + BSP_LCD_DrawHLine(Xpos - CurY, Ypos - CurX, 2*CurY); + } + + if(CurX > 0) + { + BSP_LCD_DrawHLine(Xpos - CurX, Ypos - CurY, 2*CurX); + BSP_LCD_DrawHLine(Xpos - CurX, Ypos + CurY, 2*CurX); + } + if (D < 0) + { + D += (CurX << 2) + 6; + } + else + { + D += ((CurX - CurY) << 2) + 10; + CurY--; + } + CurX++; + } + + BSP_LCD_SetTextColor(DrawProp[ActiveLayer].TextColor); + BSP_LCD_DrawCircle(Xpos, Ypos, Radius); +} + +/** + * @brief Draws a full poly-line (between many points) in currently active layer. + * @param Points: Pointer to the points array + * @param PointCount: Number of points + */ +void BSP_LCD_FillPolygon(pPoint Points, uint16_t PointCount) +{ + int16_t X = 0, Y = 0, X2 = 0, Y2 = 0, X_center = 0, Y_center = 0, X_first = 0, Y_first = 0, pixelX = 0, pixelY = 0, counter = 0; + uint16_t IMAGE_LEFT = 0, IMAGE_RIGHT = 0, IMAGE_TOP = 0, IMAGE_BOTTOM = 0; + + IMAGE_LEFT = IMAGE_RIGHT = Points->X; + IMAGE_TOP= IMAGE_BOTTOM = Points->Y; + + for(counter = 1; counter < PointCount; counter++) + { + pixelX = POLY_X(counter); + if(pixelX < IMAGE_LEFT) + { + IMAGE_LEFT = pixelX; + } + if(pixelX > IMAGE_RIGHT) + { + IMAGE_RIGHT = pixelX; + } + + pixelY = POLY_Y(counter); + if(pixelY < IMAGE_TOP) + { + IMAGE_TOP = pixelY; + } + if(pixelY > IMAGE_BOTTOM) + { + IMAGE_BOTTOM = pixelY; + } + } + + if(PointCount < 2) + { + return; + } + + X_center = (IMAGE_LEFT + IMAGE_RIGHT)/2; + Y_center = (IMAGE_BOTTOM + IMAGE_TOP)/2; + + X_first = Points->X; + Y_first = Points->Y; + + while(--PointCount) + { + X = Points->X; + Y = Points->Y; + Points++; + X2 = Points->X; + Y2 = Points->Y; + + FillTriangle(X, X2, X_center, Y, Y2, Y_center); + FillTriangle(X, X_center, X2, Y, Y_center, Y2); + FillTriangle(X_center, X2, X, Y_center, Y2, Y); + } + + FillTriangle(X_first, X2, X_center, Y_first, Y2, Y_center); + FillTriangle(X_first, X_center, X2, Y_first, Y_center, Y2); + FillTriangle(X_center, X2, X_first, Y_center, Y2, Y_first); +} + +/** + * @brief Draws a full ellipse in currently active layer. + * @param Xpos: X position + * @param Ypos: Y position + * @param XRadius: Ellipse X radius + * @param YRadius: Ellipse Y radius + */ +void BSP_LCD_FillEllipse(int Xpos, int Ypos, int XRadius, int YRadius) +{ + int x = 0, y = -YRadius, err = 2-2*XRadius, e2; + float K = 0, rad1 = 0, rad2 = 0; + + rad1 = XRadius; + rad2 = YRadius; + + K = (float)(rad2/rad1); + + do + { + BSP_LCD_DrawHLine((Xpos-(uint16_t)(x/K)), (Ypos+y), (2*(uint16_t)(x/K) + 1)); + BSP_LCD_DrawHLine((Xpos-(uint16_t)(x/K)), (Ypos-y), (2*(uint16_t)(x/K) + 1)); + + e2 = err; + if (e2 <= x) + { + err += ++x*2+1; + if (-y == x && e2 <= y) e2 = 0; + } + if (e2 > y) err += ++y*2+1; + } + while (y <= 0); +} + +/** + * @brief Switch back on the display if was switched off by previous call of BSP_LCD_DisplayOff(). + * Exit DSI ULPM mode if was allowed and configured in Dsi Configuration. + */ +void BSP_LCD_DisplayOn(void) +{ + /* Send Display on DCS command to display */ + HAL_DSI_ShortWrite(&(hdsi_eval), + hdsivideo_handle.VirtualChannelID, + DSI_DCS_SHORT_PKT_WRITE_P1, + OTM8009A_CMD_DISPON, + 0x00); + +} + +/** + * @brief Switch Off the display. + * Enter DSI ULPM mode if was allowed and configured in Dsi Configuration. + */ +void BSP_LCD_DisplayOff(void) +{ + /* Send Display off DCS Command to display */ + HAL_DSI_ShortWrite(&(hdsi_eval), + hdsivideo_handle.VirtualChannelID, + DSI_DCS_SHORT_PKT_WRITE_P1, + OTM8009A_CMD_DISPOFF, + 0x00); + +} + +/** + * @brief DCS or Generic short/long write command + * @param NbrParams: Number of parameters. It indicates the write command mode: + * If inferior to 2, a long write command is performed else short. + * @param pParams: Pointer to parameter values table. + * @retval HAL status + */ +void DSI_IO_WriteCmd(uint32_t NbrParams, uint8_t *pParams) +{ + if(NbrParams <= 1) + { + HAL_DSI_ShortWrite(&hdsi_eval, LCD_OTM8009A_ID, DSI_DCS_SHORT_PKT_WRITE_P1, pParams[0], pParams[1]); + } + else + { + HAL_DSI_LongWrite(&hdsi_eval, LCD_OTM8009A_ID, DSI_DCS_LONG_PKT_WRITE, NbrParams, pParams[NbrParams], pParams); + } +} + +/******************************************************************************* + LTDC, DMA2D and DSI BSP Routines +*******************************************************************************/ +/** + * @brief Handles DMA2D interrupt request. + * @note : Can be surcharged by application code implementation of the function. + */ +__weak void BSP_LCD_DMA2D_IRQHandler(void) +{ + HAL_DMA2D_IRQHandler(&hdma2d_eval); +} + +/** + * @brief Handles DSI interrupt request. + * @note : Can be surcharged by application code implementation of the function. + */ +__weak void BSP_LCD_DSI_IRQHandler(void) +{ + HAL_DSI_IRQHandler(&(hdsi_eval)); +} + + +/** + * @brief Handles LTDC interrupt request. + * @note : Can be surcharged by application code implementation of the function. + */ +__weak void BSP_LCD_LTDC_IRQHandler(void) +{ + HAL_LTDC_IRQHandler(&(hltdc_eval)); +} + +/** + * @brief De-Initializes the BSP LCD Msp + * Application can surcharge if needed this function implementation. + */ +__weak void BSP_LCD_MspDeInit(void) +{ + /** @brief Disable IRQ of LTDC IP */ + HAL_NVIC_DisableIRQ(LTDC_IRQn); + + /** @brief Disable IRQ of DMA2D IP */ + HAL_NVIC_DisableIRQ(DMA2D_IRQn); + + /** @brief Disable IRQ of DSI IP */ + HAL_NVIC_DisableIRQ(DSI_IRQn); + + /** @brief Force and let in reset state LTDC, DMA2D and DSI Host + Wrapper IPs */ + __HAL_RCC_LTDC_FORCE_RESET(); + __HAL_RCC_DMA2D_FORCE_RESET(); + __HAL_RCC_DSI_FORCE_RESET(); + + /** @brief Disable the LTDC, DMA2D and DSI Host and Wrapper clocks */ + __HAL_RCC_LTDC_CLK_DISABLE(); + __HAL_RCC_DMA2D_CLK_DISABLE(); + __HAL_RCC_DSI_CLK_DISABLE(); +} + +/** + * @brief Initialize the BSP LCD Msp. + * Application can surcharge if needed this function implementation + */ +__weak void BSP_LCD_MspInit(void) +{ + /** @brief Enable the LTDC clock */ + __HAL_RCC_LTDC_CLK_ENABLE(); + + /** @brief Toggle Sw reset of LTDC IP */ + __HAL_RCC_LTDC_FORCE_RESET(); + __HAL_RCC_LTDC_RELEASE_RESET(); + + /** @brief Enable the DMA2D clock */ + __HAL_RCC_DMA2D_CLK_ENABLE(); + + /** @brief Toggle Sw reset of DMA2D IP */ + __HAL_RCC_DMA2D_FORCE_RESET(); + __HAL_RCC_DMA2D_RELEASE_RESET(); + + /** @brief Enable DSI Host and wrapper clocks */ + __HAL_RCC_DSI_CLK_ENABLE(); + + /** @brief Soft Reset the DSI Host and wrapper */ + __HAL_RCC_DSI_FORCE_RESET(); + __HAL_RCC_DSI_RELEASE_RESET(); + + /** @brief NVIC configuration for LTDC interrupt that is now enabled */ + HAL_NVIC_SetPriority(LTDC_IRQn, 3, 0); + HAL_NVIC_EnableIRQ(LTDC_IRQn); + + /** @brief NVIC configuration for DMA2D interrupt that is now enabled */ + HAL_NVIC_SetPriority(DMA2D_IRQn, 3, 0); + HAL_NVIC_EnableIRQ(DMA2D_IRQn); + + /** @brief NVIC configuration for DSI interrupt that is now enabled */ + HAL_NVIC_SetPriority(DSI_IRQn, 3, 0); + HAL_NVIC_EnableIRQ(DSI_IRQn); +} + +/** + * @brief This function handles LTDC Error interrupt Handler. + * @note : Can be surcharged by application code implementation of the function. + */ + +__weak void BSP_LCD_LTDC_ER_IRQHandler(void) +{ + HAL_LTDC_IRQHandler(&(hltdc_eval)); +} + + +/** + * @brief Draws a pixel on LCD. + * @param Xpos: X position + * @param Ypos: Y position + * @param RGB_Code: Pixel color in ARGB mode (8-8-8-8) + */ +void BSP_LCD_DrawPixel(uint16_t Xpos, uint16_t Ypos, uint32_t RGB_Code) +{ + /* Write data value to all SDRAM memory */ + *(__IO uint32_t*) (hltdc_eval.LayerCfg[ActiveLayer].FBStartAdress + (4*(Ypos*BSP_LCD_GetXSize() + Xpos))) = RGB_Code; +} + + +/** + * @brief Draws a character on LCD. + * @param Xpos: Line where to display the character shape + * @param Ypos: Start column address + * @param c: Pointer to the character data + */ +static void DrawChar(uint16_t Xpos, uint16_t Ypos, const uint8_t *c) +{ + uint32_t i = 0, j = 0; + uint16_t height, width; + uint8_t offset; + uint8_t *pchar; + uint32_t line; + + height = DrawProp[ActiveLayer].pFont->Height; + width = DrawProp[ActiveLayer].pFont->Width; + + offset = 8 *((width + 7)/8) - width ; + + for(i = 0; i < height; i++) + { + pchar = ((uint8_t *)c + (width + 7)/8 * i); + + switch(((width + 7)/8)) + { + + case 1: + line = pchar[0]; + break; + + case 2: + line = (pchar[0]<< 8) | pchar[1]; + break; + + case 3: + default: + line = (pchar[0]<< 16) | (pchar[1]<< 8) | pchar[2]; + break; + } + + for (j = 0; j < width; j++) + { + if(line & (1 << (width- j + offset- 1))) + { + BSP_LCD_DrawPixel((Xpos + j), Ypos, DrawProp[ActiveLayer].TextColor); + } + else + { + BSP_LCD_DrawPixel((Xpos + j), Ypos, DrawProp[ActiveLayer].BackColor); + } + } + Ypos++; + } +} + +/** + * @brief Fills a triangle (between 3 points). + * @param x1: Point 1 X position + * @param y1: Point 1 Y position + * @param x2: Point 2 X position + * @param y2: Point 2 Y position + * @param x3: Point 3 X position + * @param y3: Point 3 Y position + */ +static void FillTriangle(uint16_t x1, uint16_t x2, uint16_t x3, uint16_t y1, uint16_t y2, uint16_t y3) +{ + int16_t deltax = 0, deltay = 0, x = 0, y = 0, xinc1 = 0, xinc2 = 0, + yinc1 = 0, yinc2 = 0, den = 0, num = 0, numadd = 0, numpixels = 0, + curpixel = 0; + + deltax = ABS(x2 - x1); /* The difference between the x's */ + deltay = ABS(y2 - y1); /* The difference between the y's */ + x = x1; /* Start x off at the first pixel */ + y = y1; /* Start y off at the first pixel */ + + if (x2 >= x1) /* The x-values are increasing */ + { + xinc1 = 1; + xinc2 = 1; + } + else /* The x-values are decreasing */ + { + xinc1 = -1; + xinc2 = -1; + } + + if (y2 >= y1) /* The y-values are increasing */ + { + yinc1 = 1; + yinc2 = 1; + } + else /* The y-values are decreasing */ + { + yinc1 = -1; + yinc2 = -1; + } + + if (deltax >= deltay) /* There is at least one x-value for every y-value */ + { + xinc1 = 0; /* Don't change the x when numerator >= denominator */ + yinc2 = 0; /* Don't change the y for every iteration */ + den = deltax; + num = deltax / 2; + numadd = deltay; + numpixels = deltax; /* There are more x-values than y-values */ + } + else /* There is at least one y-value for every x-value */ + { + xinc2 = 0; /* Don't change the x for every iteration */ + yinc1 = 0; /* Don't change the y when numerator >= denominator */ + den = deltay; + num = deltay / 2; + numadd = deltax; + numpixels = deltay; /* There are more y-values than x-values */ + } + + for (curpixel = 0; curpixel <= numpixels; curpixel++) + { + BSP_LCD_DrawLine(x, y, x3, y3); + + num += numadd; /* Increase the numerator by the top of the fraction */ + if (num >= den) /* Check if numerator >= denominator */ + { + num -= den; /* Calculate the new numerator value */ + x += xinc1; /* Change the x as appropriate */ + y += yinc1; /* Change the y as appropriate */ + } + x += xinc2; /* Change the x as appropriate */ + y += yinc2; /* Change the y as appropriate */ + } +} + +/** + * @brief Fills a buffer. + * @param LayerIndex: Layer index + * @param pDst: Pointer to destination buffer + * @param xSize: Buffer width + * @param ySize: Buffer height + * @param OffLine: Offset + * @param ColorIndex: Color index + */ +static void LL_FillBuffer(uint32_t LayerIndex, void *pDst, uint32_t xSize, uint32_t ySize, uint32_t OffLine, uint32_t ColorIndex) +{ + /* Register to memory mode with ARGB8888 as color Mode */ + hdma2d_eval.Init.Mode = DMA2D_R2M; + hdma2d_eval.Init.ColorMode = DMA2D_ARGB8888; + hdma2d_eval.Init.OutputOffset = OffLine; + + hdma2d_eval.Instance = DMA2D; + + /* DMA2D Initialization */ + if(HAL_DMA2D_Init(&hdma2d_eval) == HAL_OK) + { + if(HAL_DMA2D_ConfigLayer(&hdma2d_eval, LayerIndex) == HAL_OK) + { + if (HAL_DMA2D_Start(&hdma2d_eval, ColorIndex, (uint32_t)pDst, xSize, ySize) == HAL_OK) + { + /* Polling For DMA transfer */ + HAL_DMA2D_PollForTransfer(&hdma2d_eval, 10); + } + } + } +} + +/** + * @brief Converts a line to an ARGB8888 pixel format. + * @param pSrc: Pointer to source buffer + * @param pDst: Output color + * @param xSize: Buffer width + * @param ColorMode: Input color mode + */ +static void LL_ConvertLineToARGB8888(void *pSrc, void *pDst, uint32_t xSize, uint32_t ColorMode) +{ + /* Configure the DMA2D Mode, Color Mode and output offset */ + hdma2d_eval.Init.Mode = DMA2D_M2M_PFC; + hdma2d_eval.Init.ColorMode = DMA2D_ARGB8888; + hdma2d_eval.Init.OutputOffset = 0; + + /* Foreground Configuration */ + hdma2d_eval.LayerCfg[1].AlphaMode = DMA2D_NO_MODIF_ALPHA; + hdma2d_eval.LayerCfg[1].InputAlpha = 0xFF; + hdma2d_eval.LayerCfg[1].InputColorMode = ColorMode; + hdma2d_eval.LayerCfg[1].InputOffset = 0; + + hdma2d_eval.Instance = DMA2D; + + /* DMA2D Initialization */ + if(HAL_DMA2D_Init(&hdma2d_eval) == HAL_OK) + { + if(HAL_DMA2D_ConfigLayer(&hdma2d_eval, 1) == HAL_OK) + { + if (HAL_DMA2D_Start(&hdma2d_eval, (uint32_t)pSrc, (uint32_t)pDst, xSize, 1) == HAL_OK) + { + /* Polling For DMA transfer */ + HAL_DMA2D_PollForTransfer(&hdma2d_eval, 10); + } + } + } +} + +/** + * @} + */ + +/** + * @} + */ + +/** + * @} + */ + +/** + * @} + */ + +/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Drivers/BSP/STM32469I-Discovery/stm32469i_discovery_lcd.h Tue May 16 10:50:26 2017 +0200 @@ -0,0 +1,408 @@ +/** + ****************************************************************************** + * @file stm32469i_discovery_lcd.h + * @author MCD Application Team + * @version V2.0.0 + * @date 27-January-2017 + * @brief This file contains the common defines and functions prototypes for + * the stm32469i_discovery_lcd.c driver. + ****************************************************************************** + * @attention + * + * <h2><center>© COPYRIGHT(c) 2017 STMicroelectronics</center></h2> + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * 3. Neither the name of STMicroelectronics nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + ****************************************************************************** + */ + +/* Define to prevent recursive inclusion -------------------------------------*/ +#ifndef __STM32469I_DISCOVERY_LCD_H +#define __STM32469I_DISCOVERY_LCD_H + +#ifdef __cplusplus + extern "C" { +#endif + +/* Includes ------------------------------------------------------------------*/ +/* Include LCD component Driver */ + +/* Include OTM8009A LCD Driver IC driver code */ +#include "../Components/otm8009a/otm8009a.h" + +/* Include SDRAM Driver */ +#include "stm32469i_discovery_sdram.h" +#include "stm32469i_discovery.h" +#include "../Fonts/fonts.h" + +#include <string.h> /* use of memset() */ + +/** @addtogroup BSP + * @{ + */ + +/** @addtogroup STM32469I_Discovery + * @{ + */ + +/** @addtogroup STM32469I-Discovery_LCD + * @{ + */ + +/** @defgroup STM32469I-Discovery_LCD_Exported_Constants STM32469I Discovery LCD Exported Constants + * @{ + */ + +#define LCD_LayerCfgTypeDef LTDC_LayerCfgTypeDef +/** + * @brief LCD FB_StartAddress + */ +#define LCD_FB_START_ADDRESS ((uint32_t)0xC0000000) + +/** @brief Maximum number of LTDC layers + */ +#define LTDC_MAX_LAYER_NUMBER ((uint32_t) 2) + +/** @brief LTDC Background layer index + */ +#define LTDC_ACTIVE_LAYER_BACKGROUND ((uint32_t) 0) + +/** @brief LTDC Foreground layer index + */ +#define LTDC_ACTIVE_LAYER_FOREGROUND ((uint32_t) 1) + +/** @brief Number of LTDC layers + */ +#define LTDC_NB_OF_LAYERS ((uint32_t) 2) + +/** @brief LTDC Default used layer index + */ +#define LTDC_DEFAULT_ACTIVE_LAYER LTDC_ACTIVE_LAYER_FOREGROUND + +/** + * @brief LCD status structure definition + */ +#define LCD_OK 0x00 +#define LCD_ERROR 0x01 +#define LCD_TIMEOUT 0x02 + +/** + * @brief LCD Display OTM8009A ID + */ +#define LCD_OTM8009A_ID ((uint32_t) 0) + +/** + * @brief LCD color definitions values + * in ARGB8888 format. + */ + +/** @brief Blue value in ARGB8888 format + */ +#define LCD_COLOR_BLUE ((uint32_t) 0xFF0000FF) + +/** @brief Green value in ARGB8888 format + */ +#define LCD_COLOR_GREEN ((uint32_t) 0xFF00FF00) + +/** @brief Red value in ARGB8888 format + */ +#define LCD_COLOR_RED ((uint32_t) 0xFFFF0000) + +/** @brief Cyan value in ARGB8888 format + */ +#define LCD_COLOR_CYAN ((uint32_t) 0xFF00FFFF) + +/** @brief Magenta value in ARGB8888 format + */ +#define LCD_COLOR_MAGENTA ((uint32_t) 0xFFFF00FF) + +/** @brief Yellow value in ARGB8888 format + */ +#define LCD_COLOR_YELLOW ((uint32_t) 0xFFFFFF00) + +/** @brief Light Blue value in ARGB8888 format + */ +#define LCD_COLOR_LIGHTBLUE ((uint32_t) 0xFF8080FF) + +/** @brief Light Green value in ARGB8888 format + */ +#define LCD_COLOR_LIGHTGREEN ((uint32_t) 0xFF80FF80) + +/** @brief Light Red value in ARGB8888 format + */ +#define LCD_COLOR_LIGHTRED ((uint32_t) 0xFFFF8080) + +/** @brief Light Cyan value in ARGB8888 format + */ +#define LCD_COLOR_LIGHTCYAN ((uint32_t) 0xFF80FFFF) + +/** @brief Light Magenta value in ARGB8888 format + */ +#define LCD_COLOR_LIGHTMAGENTA ((uint32_t) 0xFFFF80FF) + +/** @brief Light Yellow value in ARGB8888 format + */ +#define LCD_COLOR_LIGHTYELLOW ((uint32_t) 0xFFFFFF80) + +/** @brief Dark Blue value in ARGB8888 format + */ +#define LCD_COLOR_DARKBLUE ((uint32_t) 0xFF000080) + +/** @brief Light Dark Green value in ARGB8888 format + */ +#define LCD_COLOR_DARKGREEN ((uint32_t) 0xFF008000) + +/** @brief Light Dark Red value in ARGB8888 format + */ +#define LCD_COLOR_DARKRED ((uint32_t) 0xFF800000) + +/** @brief Dark Cyan value in ARGB8888 format + */ +#define LCD_COLOR_DARKCYAN ((uint32_t) 0xFF008080) + +/** @brief Dark Magenta value in ARGB8888 format + */ +#define LCD_COLOR_DARKMAGENTA ((uint32_t) 0xFF800080) + +/** @brief Dark Yellow value in ARGB8888 format + */ +#define LCD_COLOR_DARKYELLOW ((uint32_t) 0xFF808000) + +/** @brief White value in ARGB8888 format + */ +#define LCD_COLOR_WHITE ((uint32_t) 0xFFFFFFFF) + +/** @brief Light Gray value in ARGB8888 format + */ +#define LCD_COLOR_LIGHTGRAY ((uint32_t) 0xFFD3D3D3) + +/** @brief Gray value in ARGB8888 format + */ +#define LCD_COLOR_GRAY ((uint32_t) 0xFF808080) + +/** @brief Dark Gray value in ARGB8888 format + */ +#define LCD_COLOR_DARKGRAY ((uint32_t) 0xFF404040) + +/** @brief Black value in ARGB8888 format + */ +#define LCD_COLOR_BLACK ((uint32_t) 0xFF000000) + +/** @brief Brown value in ARGB8888 format + */ +#define LCD_COLOR_BROWN ((uint32_t) 0xFFA52A2A) + +/** @brief Orange value in ARGB8888 format + */ +#define LCD_COLOR_ORANGE ((uint32_t) 0xFFFFA500) + +/** @brief Transparent value in ARGB8888 format + */ +#define LCD_COLOR_TRANSPARENT ((uint32_t) 0xFF000000) + +/** + * @brief LCD default font + */ +#define LCD_DEFAULT_FONT Font24 + +/** + * @brief Possible values of + * pixel data format (ie color coding) transmitted on DSI Data lane in DSI packets + */ + +#define LCD_DSI_PIXEL_DATA_FMT_RBG888 DSI_RGB888 /*!< DSI packet pixel format chosen is RGB888 : 24 bpp */ +#define LCD_DSI_PIXEL_DATA_FMT_RBG565 DSI_RGB565 /*!< DSI packet pixel format chosen is RGB565 : 16 bpp */ + +/** + * @} + */ + +/** @defgroup STM32469I-Discovery_LCD_Exported_Types STM32469I Discovery LCD Exported Types + * @{ + */ + +/** +* @brief LCD Drawing main properties +*/ +typedef struct +{ + uint32_t TextColor; /*!< Specifies the color of text */ + uint32_t BackColor; /*!< Specifies the background color below the text */ + sFONT *pFont; /*!< Specifies the font used for the text */ + +} LCD_DrawPropTypeDef; + +/** + * @brief LCD Drawing point (pixel) geometric definition + */ +typedef struct +{ + int16_t X; /*!< geometric X position of drawing */ + int16_t Y; /*!< geometric Y position of drawing */ + +} Point; + +/** + * @brief Pointer on LCD Drawing point (pixel) geometric definition + */ +typedef Point * pPoint; + +/** + * @brief LCD drawing Line alignment mode definitions + */ +typedef enum +{ + CENTER_MODE = 0x01, /*!< Center mode */ + RIGHT_MODE = 0x02, /*!< Right mode */ + LEFT_MODE = 0x03 /*!< Left mode */ + +} Text_AlignModeTypdef; + + +/** + * @brief LCD_OrientationTypeDef + * Possible values of Display Orientation + */ +typedef enum +{ + LCD_ORIENTATION_PORTRAIT = 0x00, /*!< Portrait orientation choice of LCD screen */ + LCD_ORIENTATION_LANDSCAPE = 0x01, /*!< Landscape orientation choice of LCD screen */ + LCD_ORIENTATION_INVALID = 0x02 /*!< Invalid orientation choice of LCD screen */ +} LCD_OrientationTypeDef; + +/** + * @} + */ + +/** @defgroup STM32469I-Discovery_LCD_Exported_Macro STM32469I Discovery LCD Exported Macro + * @{ + */ + +/** + * @} + */ + +/** @defgroup STM32469I-Discovery_LCD_Exported_Functions STM32469I Discovery LCD Exported Functions + * @{ + */ +void BSP_LCD_DMA2D_IRQHandler(void); +void BSP_LCD_DSI_IRQHandler(void); +void BSP_LCD_LTDC_IRQHandler(void); +void BSP_LCD_LTDC_ER_IRQHandler(void); + +uint8_t BSP_LCD_Init(void); +uint8_t BSP_LCD_InitEx(LCD_OrientationTypeDef orientation); + +void BSP_LCD_MspDeInit(void); +void BSP_LCD_MspInit(void); +void BSP_LCD_Reset(void); + +uint32_t BSP_LCD_GetXSize(void); +uint32_t BSP_LCD_GetYSize(void); +void BSP_LCD_SetXSize(uint32_t imageWidthPixels); +void BSP_LCD_SetYSize(uint32_t imageHeightPixels); + +void BSP_LCD_LayerDefaultInit(uint16_t LayerIndex, uint32_t FB_Address); +void BSP_LCD_SetTransparency(uint32_t LayerIndex, uint8_t Transparency); +void BSP_LCD_SetLayerAddress(uint32_t LayerIndex, uint32_t Address); +void BSP_LCD_SetColorKeying(uint32_t LayerIndex, uint32_t RGBValue); +void BSP_LCD_ResetColorKeying(uint32_t LayerIndex); +void BSP_LCD_SetLayerWindow(uint16_t LayerIndex, uint16_t Xpos, uint16_t Ypos, uint16_t Width, uint16_t Height); + +void BSP_LCD_SelectLayer(uint32_t LayerIndex); +void BSP_LCD_SetLayerVisible(uint32_t LayerIndex, FunctionalState State); + +void BSP_LCD_SetTextColor(uint32_t Color); +uint32_t BSP_LCD_GetTextColor(void); +void BSP_LCD_SetBackColor(uint32_t Color); +uint32_t BSP_LCD_GetBackColor(void); +void BSP_LCD_SetFont(sFONT *fonts); +sFONT *BSP_LCD_GetFont(void); + +uint32_t BSP_LCD_ReadPixel(uint16_t Xpos, uint16_t Ypos); +void BSP_LCD_DrawPixel(uint16_t Xpos, uint16_t Ypos, uint32_t pixel); +void BSP_LCD_Clear(uint32_t Color); +void BSP_LCD_ClearStringLine(uint32_t Line); +void BSP_LCD_DisplayStringAtLine(uint16_t Line, uint8_t *ptr); +void BSP_LCD_DisplayStringAt(uint16_t Xpos, uint16_t Ypos, uint8_t *Text, Text_AlignModeTypdef Mode); +void BSP_LCD_DisplayChar(uint16_t Xpos, uint16_t Ypos, uint8_t Ascii); + +void BSP_LCD_DrawHLine(uint16_t Xpos, uint16_t Ypos, uint16_t Length); +void BSP_LCD_DrawVLine(uint16_t Xpos, uint16_t Ypos, uint16_t Length); +void BSP_LCD_DrawLine(uint16_t x1, uint16_t y1, uint16_t x2, uint16_t y2); +void BSP_LCD_DrawRect(uint16_t Xpos, uint16_t Ypos, uint16_t Width, uint16_t Height); +void BSP_LCD_DrawCircle(uint16_t Xpos, uint16_t Ypos, uint16_t Radius); +void BSP_LCD_DrawPolygon(pPoint Points, uint16_t PointCount); +void BSP_LCD_DrawEllipse(int Xpos, int Ypos, int XRadius, int YRadius); +void BSP_LCD_DrawBitmap(uint32_t Xpos, uint32_t Ypos, uint8_t *pbmp); + +void BSP_LCD_FillRect(uint16_t Xpos, uint16_t Ypos, uint16_t Width, uint16_t Height); +void BSP_LCD_FillCircle(uint16_t Xpos, uint16_t Ypos, uint16_t Radius); +void BSP_LCD_FillPolygon(pPoint Points, uint16_t PointCount); +void BSP_LCD_FillEllipse(int Xpos, int Ypos, int XRadius, int YRadius); + +void BSP_LCD_DisplayOff(void); +void BSP_LCD_DisplayOn(void); + +/** + * @} + */ + +/** @defgroup STM32469I-EVAL_LCD_Exported_Variables STM32469I EVAL LCD Exported Variables + * @{ + */ + +/* @brief DMA2D handle variable */ +extern DMA2D_HandleTypeDef hdma2d_eval; + +/** + * @} + */ + +/** @defgroup STM32469I-Discovery_LCD_Exported_Variables STM32469I Discovery LCD Exported Variables + * @{ + */ + +/** + * @} + */ + +/** + * @} + */ + +/** + * @} + */ + +/** + * @} + */ + +#ifdef __cplusplus +} +#endif + +#endif /* __STM32469I_DISCOVERY_LCD_H */ + +/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Drivers/BSP/STM32469I-Discovery/stm32469i_discovery_qspi.c Tue May 16 10:50:26 2017 +0200 @@ -0,0 +1,775 @@ +/** + ****************************************************************************** + * @file stm32469i_discovery_qspi.c + * @author MCD Application Team + * @version V2.0.0 + * @date 27-January-2017 + * @brief This file includes a standard driver for the N25Q128A QSPI + * memory mounted on STM32469I-Discovery board. + @verbatim + ============================================================================== + ##### How to use this driver ##### + ============================================================================== + [..] + (#) This driver is used to drive the N25Q128A QSPI external + memory mounted on STM32469I-Discovery board. + + (#) This driver need a specific component driver N25Q128A to be included with. + + (#) Initialization steps: + (++) Initialize the QPSI external memory using the BSP_QSPI_Init() function. This + function includes the MSP layer hardware resources initialization and the + QSPI interface with the external memory. + + (#) QSPI memory operations + (++) QSPI memory can be accessed with read/write operations once it is + initialized. + Read/write operation can be performed with AHB access using the functions + BSP_QSPI_Read()/BSP_QSPI_Write(). + (++) The function BSP_QSPI_GetInfo() returns the configuration of the QSPI memory. + (see the QSPI memory data sheet) + (++) Perform erase block operation using the function BSP_QSPI_Erase_Block() and by + specifying the block address. You can perform an erase operation of the whole + chip by calling the function BSP_QSPI_Erase_Chip(). + (++) The function BSP_QSPI_GetStatus() returns the current status of the QSPI memory. + (see the QSPI memory data sheet) + @endverbatim + ****************************************************************************** + * @attention + * + * <h2><center>© COPYRIGHT(c) 2017 STMicroelectronics</center></h2> + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * 3. Neither the name of STMicroelectronics nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + ****************************************************************************** + */ + +/* Includes ------------------------------------------------------------------*/ +#include "stm32469i_discovery_qspi.h" + +/** @addtogroup BSP + * @{ + */ + +/** @addtogroup STM32469I_Discovery + * @{ + */ + +/** @defgroup STM32469I_Discovery_QSPI STM32469I Discovery QSPI + * @{ + */ + + +/* Private variables ---------------------------------------------------------*/ + + +/** @defgroup STM32469I_Discovery_QSPI_Private_Variables STM32469I Discovery QSPI Private Variables + * @{ + */ +QSPI_HandleTypeDef QSPIHandle; + +/** + * @} + */ + + + +/* Private functions ---------------------------------------------------------*/ + +/** @defgroup STM32469I_Discovery_QSPI_Private_Functions STM32469I Discovery QSPI Private Functions + * @{ + */ +static uint8_t QSPI_ResetMemory (QSPI_HandleTypeDef *hqspi); +static uint8_t QSPI_DummyCyclesCfg (QSPI_HandleTypeDef *hqspi); +static uint8_t QSPI_WriteEnable (QSPI_HandleTypeDef *hqspi); +static uint8_t QSPI_AutoPollingMemReady (QSPI_HandleTypeDef *hqspi, uint32_t Timeout); + + +/** + * @} + */ + +/** @defgroup STM32469I_Discovery_QSPI_Exported_Functions STM32469I Discovery QSPI Exported Functions + * @{ + */ + +/** + * @brief Initializes the QSPI interface. + * @retval QSPI memory status + */ +uint8_t BSP_QSPI_Init(void) +{ + QSPIHandle.Instance = QUADSPI; + + /* Call the DeInit function to reset the driver */ + if (HAL_QSPI_DeInit(&QSPIHandle) != HAL_OK) + { + return QSPI_ERROR; + } + + /* System level initialization */ + BSP_QSPI_MspInit(&QSPIHandle, NULL); + + /* QSPI initialization */ + QSPIHandle.Init.ClockPrescaler = 1; /* QSPI Freq= 180 MHz / (1+1) = 90 MHz */ + QSPIHandle.Init.FifoThreshold = 1; + QSPIHandle.Init.SampleShifting = QSPI_SAMPLE_SHIFTING_HALFCYCLE; + QSPIHandle.Init.FlashSize = POSITION_VAL(N25Q128A_FLASH_SIZE) - 1; + QSPIHandle.Init.ChipSelectHighTime = QSPI_CS_HIGH_TIME_5_CYCLE; + QSPIHandle.Init.ClockMode = QSPI_CLOCK_MODE_0; + QSPIHandle.Init.FlashID = QSPI_FLASH_ID_1; + QSPIHandle.Init.DualFlash = QSPI_DUALFLASH_DISABLE; + + if (HAL_QSPI_Init(&QSPIHandle) != HAL_OK) + { + return QSPI_ERROR; + } + + /* QSPI memory reset */ + if (QSPI_ResetMemory(&QSPIHandle) != QSPI_OK) + { + return QSPI_NOT_SUPPORTED; + } + + + /* Configuration of the dummy cucles on QSPI memory side */ + if (QSPI_DummyCyclesCfg(&QSPIHandle) != QSPI_OK) + { + return QSPI_NOT_SUPPORTED; + } + + return QSPI_OK; +} + +/** + * @brief De-Initializes the QSPI interface. + * @retval QSPI memory status + */ +uint8_t BSP_QSPI_DeInit(void) +{ + QSPIHandle.Instance = QUADSPI; + + /* Call the DeInit function to reset the driver */ + if (HAL_QSPI_DeInit(&QSPIHandle) != HAL_OK) + { + return QSPI_ERROR; + } + + /* System level De-initialization */ + BSP_QSPI_MspDeInit(&QSPIHandle, NULL); + + return QSPI_OK; +} + +/** + * @brief Reads an amount of data from the QSPI memory. + * @param pData: Pointer to data to be read + * @param ReadAddr: Read start address + * @param Size: Size of data to read + * @retval QSPI memory status + */ +uint8_t BSP_QSPI_Read(uint8_t* pData, uint32_t ReadAddr, uint32_t Size) +{ + QSPI_CommandTypeDef s_command; + + /* Initialize the read command */ + s_command.InstructionMode = QSPI_INSTRUCTION_1_LINE; + s_command.Instruction = QUAD_INOUT_FAST_READ_CMD; + s_command.AddressMode = QSPI_ADDRESS_4_LINES; + s_command.AddressSize = QSPI_ADDRESS_24_BITS; + s_command.Address = ReadAddr; + s_command.AlternateByteMode = QSPI_ALTERNATE_BYTES_NONE; + s_command.DataMode = QSPI_DATA_4_LINES; + s_command.DummyCycles = N25Q128A_DUMMY_CYCLES_READ_QUAD; + s_command.NbData = Size; + s_command.DdrMode = QSPI_DDR_MODE_DISABLE; + s_command.DdrHoldHalfCycle = QSPI_DDR_HHC_ANALOG_DELAY; + s_command.SIOOMode = QSPI_SIOO_INST_EVERY_CMD; + + /* Configure the command */ + if (HAL_QSPI_Command(&QSPIHandle, &s_command, HAL_QPSI_TIMEOUT_DEFAULT_VALUE) != HAL_OK) + { + return QSPI_ERROR; + } + + /* Set S# timing for Read command: Min 20ns for N25Q128A memory */ + MODIFY_REG(QSPIHandle.Instance->DCR, QUADSPI_DCR_CSHT, QSPI_CS_HIGH_TIME_2_CYCLE); + + /* Reception of the data */ + if (HAL_QSPI_Receive(&QSPIHandle, pData, HAL_QPSI_TIMEOUT_DEFAULT_VALUE) != HAL_OK) + { + return QSPI_ERROR; + } + + /* Restore S# timing for nonRead commands */ + MODIFY_REG(QSPIHandle.Instance->DCR, QUADSPI_DCR_CSHT, QSPI_CS_HIGH_TIME_5_CYCLE); + + return QSPI_OK; +} + +/** + * @brief Writes an amount of data to the QSPI memory. + * @param pData: Pointer to data to be written + * @param WriteAddr: Write start address + * @param Size: Size of data to write + * @retval QSPI memory status + */ +uint8_t BSP_QSPI_Write(uint8_t* pData, uint32_t WriteAddr, uint32_t Size) +{ + QSPI_CommandTypeDef s_command; + uint32_t end_addr, current_size, current_addr; + + /* Calculation of the size between the write address and the end of the page */ + current_size = N25Q128A_PAGE_SIZE - (WriteAddr % N25Q128A_PAGE_SIZE); + + /* Check if the size of the data is less than the remaining place in the page */ + if (current_size > Size) + { + current_size = Size; + } + + /* Initialize the address variables */ + current_addr = WriteAddr; + end_addr = WriteAddr + Size; + + /* Initialize the program command */ + s_command.InstructionMode = QSPI_INSTRUCTION_1_LINE; + s_command.Instruction = EXT_QUAD_IN_FAST_PROG_CMD; + s_command.AddressMode = QSPI_ADDRESS_4_LINES; + s_command.AddressSize = QSPI_ADDRESS_24_BITS; + s_command.AlternateByteMode = QSPI_ALTERNATE_BYTES_NONE; + s_command.DataMode = QSPI_DATA_4_LINES; + s_command.DummyCycles = 0; + s_command.DdrMode = QSPI_DDR_MODE_DISABLE; + s_command.DdrHoldHalfCycle = QSPI_DDR_HHC_ANALOG_DELAY; + s_command.SIOOMode = QSPI_SIOO_INST_EVERY_CMD; + + /* Perform the write page by page */ + do + { + s_command.Address = current_addr; + s_command.NbData = current_size; + + /* Enable write operations */ + if (QSPI_WriteEnable(&QSPIHandle) != QSPI_OK) + { + return QSPI_ERROR; + } + + /* Configure the command */ + if (HAL_QSPI_Command(&QSPIHandle, &s_command, HAL_QPSI_TIMEOUT_DEFAULT_VALUE) != HAL_OK) + { + return QSPI_ERROR; + } + + /* Transmission of the data */ + if (HAL_QSPI_Transmit(&QSPIHandle, pData, HAL_QPSI_TIMEOUT_DEFAULT_VALUE) != HAL_OK) + { + return QSPI_ERROR; + } + + /* Configure automatic polling mode to wait for end of program */ + if (QSPI_AutoPollingMemReady(&QSPIHandle, HAL_QPSI_TIMEOUT_DEFAULT_VALUE) != QSPI_OK) + { + return QSPI_ERROR; + } + + /* Update the address and size variables for next page programming */ + current_addr += current_size; + pData += current_size; + current_size = ((current_addr + N25Q128A_PAGE_SIZE) > end_addr) ? (end_addr - current_addr) : N25Q128A_PAGE_SIZE; + } while (current_addr < end_addr); + + return QSPI_OK; +} + +/** + * @brief Erases the specified block of the QSPI memory. + * @param BlockAddress: Block address to erase + * @retval QSPI memory status + */ +uint8_t BSP_QSPI_Erase_Block(uint32_t BlockAddress) +{ + QSPI_CommandTypeDef s_command; + + /* Initialize the erase command */ + s_command.InstructionMode = QSPI_INSTRUCTION_1_LINE; + s_command.Instruction = SUBSECTOR_ERASE_CMD; + s_command.AddressMode = QSPI_ADDRESS_1_LINE; + s_command.AddressSize = QSPI_ADDRESS_24_BITS; + s_command.Address = BlockAddress; + s_command.AlternateByteMode = QSPI_ALTERNATE_BYTES_NONE; + s_command.DataMode = QSPI_DATA_NONE; + s_command.DummyCycles = 0; + s_command.DdrMode = QSPI_DDR_MODE_DISABLE; + s_command.DdrHoldHalfCycle = QSPI_DDR_HHC_ANALOG_DELAY; + s_command.SIOOMode = QSPI_SIOO_INST_EVERY_CMD; + + /* Enable write operations */ + if (QSPI_WriteEnable(&QSPIHandle) != QSPI_OK) + { + return QSPI_ERROR; + } + + /* Send the command */ + if (HAL_QSPI_Command(&QSPIHandle, &s_command, HAL_QPSI_TIMEOUT_DEFAULT_VALUE) != HAL_OK) + { + return QSPI_ERROR; + } + + /* Configure automatic polling mode to wait for end of erase */ + if (QSPI_AutoPollingMemReady(&QSPIHandle, N25Q128A_SUBSECTOR_ERASE_MAX_TIME) != QSPI_OK) + { + return QSPI_ERROR; + } + + return QSPI_OK; +} + +/** + * @brief Erases the entire QSPI memory. + * @retval QSPI memory status + */ +uint8_t BSP_QSPI_Erase_Chip(void) +{ + QSPI_CommandTypeDef s_command; + + /* Initialize the erase command */ + s_command.InstructionMode = QSPI_INSTRUCTION_1_LINE; + s_command.Instruction = BULK_ERASE_CMD; + s_command.AddressMode = QSPI_ADDRESS_NONE; + s_command.AlternateByteMode = QSPI_ALTERNATE_BYTES_NONE; + s_command.DataMode = QSPI_DATA_NONE; + s_command.DummyCycles = 0; + s_command.DdrMode = QSPI_DDR_MODE_DISABLE; + s_command.DdrHoldHalfCycle = QSPI_DDR_HHC_ANALOG_DELAY; + s_command.SIOOMode = QSPI_SIOO_INST_EVERY_CMD; + + /* Enable write operations */ + if (QSPI_WriteEnable(&QSPIHandle) != QSPI_OK) + { + return QSPI_ERROR; + } + + /* Send the command */ + if (HAL_QSPI_Command(&QSPIHandle, &s_command, HAL_QPSI_TIMEOUT_DEFAULT_VALUE) != HAL_OK) + { + return QSPI_ERROR; + } + + /* Configure automatic polling mode to wait for end of erase */ + if (QSPI_AutoPollingMemReady(&QSPIHandle, N25Q128A_BULK_ERASE_MAX_TIME) != QSPI_OK) + { + return QSPI_ERROR; + } + + return QSPI_OK; +} + +/** + * @brief Reads current status of the QSPI memory. + * @retval QSPI memory status + */ +uint8_t BSP_QSPI_GetStatus(void) +{ + QSPI_CommandTypeDef s_command; + uint8_t reg; + + /* Initialize the read flag status register command */ + s_command.InstructionMode = QSPI_INSTRUCTION_1_LINE; + s_command.Instruction = READ_FLAG_STATUS_REG_CMD; + s_command.AddressMode = QSPI_ADDRESS_NONE; + s_command.AlternateByteMode = QSPI_ALTERNATE_BYTES_NONE; + s_command.DataMode = QSPI_DATA_1_LINE; + s_command.DummyCycles = 0; + s_command.NbData = 1; + s_command.DdrMode = QSPI_DDR_MODE_DISABLE; + s_command.DdrHoldHalfCycle = QSPI_DDR_HHC_ANALOG_DELAY; + s_command.SIOOMode = QSPI_SIOO_INST_EVERY_CMD; + + /* Configure the command */ + if (HAL_QSPI_Command(&QSPIHandle, &s_command, HAL_QPSI_TIMEOUT_DEFAULT_VALUE) != HAL_OK) + { + return QSPI_ERROR; + } + + /* Reception of the data */ + if (HAL_QSPI_Receive(&QSPIHandle, ®, HAL_QPSI_TIMEOUT_DEFAULT_VALUE) != HAL_OK) + { + return QSPI_ERROR; + } + + /* Check the value of the register */ + if ((reg & (N25Q128A_FSR_PRERR | N25Q128A_FSR_VPPERR | N25Q128A_FSR_PGERR | N25Q128A_FSR_ERERR)) != 0) + { + return QSPI_ERROR; + } + else if ((reg & (N25Q128A_FSR_PGSUS | N25Q128A_FSR_ERSUS)) != 0) + { + return QSPI_SUSPENDED; + } + else if ((reg & N25Q128A_FSR_READY) != 0) + { + return QSPI_OK; + } + else + { + return QSPI_BUSY; + } +} + +/** + * @brief Reads the configuration of the memory and fills QspiInfo struct + * @param pInfo pointer to Info structure + * @retval QSPI memory status + */ +uint8_t BSP_QSPI_GetInfo(QSPI_InfoTypeDef* pInfo) +{ + /* Configure the structure with the memory configuration */ + pInfo->FlashSize = N25Q128A_FLASH_SIZE; + pInfo->EraseSectorSize = N25Q128A_SUBSECTOR_SIZE; + pInfo->EraseSectorsNumber = (N25Q128A_FLASH_SIZE/N25Q128A_SUBSECTOR_SIZE); + pInfo->ProgPageSize = N25Q128A_PAGE_SIZE; + pInfo->ProgPagesNumber = (N25Q128A_FLASH_SIZE/N25Q128A_PAGE_SIZE); + + return QSPI_OK; +} + +/** + * @brief Configure the QSPI in memory-mapped mode + * @retval QSPI memory status + */ +uint8_t BSP_QSPI_EnableMemoryMappedMode(void) +{ + QSPI_CommandTypeDef s_command; + QSPI_MemoryMappedTypeDef s_mem_mapped_cfg; + + /* Configure the command for the read instruction */ + s_command.InstructionMode = QSPI_INSTRUCTION_1_LINE; + s_command.Instruction = QUAD_INOUT_FAST_READ_CMD; + s_command.AddressMode = QSPI_ADDRESS_4_LINES; + s_command.AddressSize = QSPI_ADDRESS_24_BITS; + s_command.AlternateByteMode = QSPI_ALTERNATE_BYTES_NONE; + s_command.DataMode = QSPI_DATA_4_LINES; + s_command.DummyCycles = N25Q128A_DUMMY_CYCLES_READ_QUAD; + s_command.DdrMode = QSPI_DDR_MODE_DISABLE; + s_command.DdrHoldHalfCycle = QSPI_DDR_HHC_ANALOG_DELAY; + s_command.SIOOMode = QSPI_SIOO_INST_EVERY_CMD; + + /* Configure the memory mapped mode */ + s_mem_mapped_cfg.TimeOutActivation = QSPI_TIMEOUT_COUNTER_DISABLE; + + if (HAL_QSPI_MemoryMapped(&QSPIHandle, &s_command, &s_mem_mapped_cfg) != HAL_OK) + { + return QSPI_ERROR; + } + + return QSPI_OK; +} + +/** + * @} + */ + +/** @defgroup STM32469I_Discovery_QSPI_Private_Functions STM32469I Discovery QSPI Private Functions + * @{ + */ + +/** + * @brief QSPI MSP Initialization + * This function configures the hardware resources used in this example: + * - Peripheral's clock enable + * - Peripheral's GPIO Configuration + * - NVIC configuration for QSPI interrupt + */ +__weak void BSP_QSPI_MspInit(QSPI_HandleTypeDef *hqspi, void *Params) +{ + GPIO_InitTypeDef gpio_init_structure; + + /*##-1- Enable peripherals and GPIO Clocks #################################*/ + /* Enable the QuadSPI memory interface clock */ + QSPI_CLK_ENABLE(); + /* Reset the QuadSPI memory interface */ + QSPI_FORCE_RESET(); + QSPI_RELEASE_RESET(); + /* Enable GPIO clocks */ + QSPI_CS_GPIO_CLK_ENABLE(); + QSPI_DX_CLK_GPIO_CLK_ENABLE(); + + /*##-2- Configure peripheral GPIO ##########################################*/ + /* QSPI CS GPIO pin configuration */ + gpio_init_structure.Pin = QSPI_CS_PIN; + gpio_init_structure.Mode = GPIO_MODE_AF_PP; + gpio_init_structure.Pull = GPIO_PULLUP; + gpio_init_structure.Speed = GPIO_SPEED_HIGH; + gpio_init_structure.Alternate = GPIO_AF10_QSPI; + HAL_GPIO_Init(QSPI_CS_GPIO_PORT, &gpio_init_structure); + + /* QSPI CLK GPIO pin configuration */ + gpio_init_structure.Pin = QSPI_CLK_PIN; + gpio_init_structure.Pull = GPIO_NOPULL; + gpio_init_structure.Alternate = GPIO_AF9_QSPI; + HAL_GPIO_Init(QSPI_CLK_GPIO_PORT, &gpio_init_structure); + + /* QSPI D0 and D1 GPIO pin configuration */ + gpio_init_structure.Pin = (QSPI_D0_PIN | QSPI_D1_PIN); + gpio_init_structure.Alternate = GPIO_AF10_QSPI; + HAL_GPIO_Init(QSPI_DX_GPIO_PORT, &gpio_init_structure); + + /* QSPI D2 and D3 GPIO pin configuration */ + gpio_init_structure.Pin = (QSPI_D2_PIN | QSPI_D3_PIN) ; + gpio_init_structure.Alternate = GPIO_AF9_QSPI; + HAL_GPIO_Init(QSPI_DX_GPIO_PORT, &gpio_init_structure); + + /*##-3- Configure the NVIC for QSPI #########################################*/ + /* NVIC configuration for QSPI interrupt */ + HAL_NVIC_SetPriority(QUADSPI_IRQn, 0x0F, 0); + HAL_NVIC_EnableIRQ(QUADSPI_IRQn); + +} + +/** + * @brief QSPI MSP De-Initialization + * This function frees the hardware resources used in this example: + * - Disable the Peripheral's clock + * - Revert GPIO and NVIC configuration to their default state + */ +__weak void BSP_QSPI_MspDeInit(QSPI_HandleTypeDef *hqspi, void *Params) +{ + /*##-1- Disable the NVIC for QSPI ###########################################*/ + HAL_NVIC_DisableIRQ(QUADSPI_IRQn); + + /*##-2- Disable peripherals and GPIO Clocks ################################*/ + /* De-Configure QSPI pins */ + HAL_GPIO_DeInit(QSPI_CS_GPIO_PORT, QSPI_CS_PIN); + HAL_GPIO_DeInit(QSPI_CLK_GPIO_PORT, QSPI_CLK_PIN); + HAL_GPIO_DeInit(QSPI_DX_GPIO_PORT, QSPI_D0_PIN); + HAL_GPIO_DeInit(QSPI_DX_GPIO_PORT, QSPI_D1_PIN); + HAL_GPIO_DeInit(QSPI_DX_GPIO_PORT, QSPI_D2_PIN); + HAL_GPIO_DeInit(QSPI_DX_GPIO_PORT, QSPI_D3_PIN); + + /*##-3- Reset peripherals ##################################################*/ + /* Reset the QuadSPI memory interface */ + QSPI_FORCE_RESET(); + QSPI_RELEASE_RESET(); + + /* Disable the QuadSPI memory interface clock */ + QSPI_CLK_DISABLE(); +} + +/** + * @brief This function reset the QSPI memory. + * @param hqspi: QSPI handle + */ +static uint8_t QSPI_ResetMemory(QSPI_HandleTypeDef *hqspi) +{ + QSPI_CommandTypeDef s_command; + + /* Initialize the reset enable command */ + s_command.InstructionMode = QSPI_INSTRUCTION_1_LINE; + s_command.Instruction = RESET_ENABLE_CMD; + s_command.AddressMode = QSPI_ADDRESS_NONE; + s_command.AlternateByteMode = QSPI_ALTERNATE_BYTES_NONE; + s_command.DataMode = QSPI_DATA_NONE; + s_command.DummyCycles = 0; + s_command.DdrMode = QSPI_DDR_MODE_DISABLE; + s_command.DdrHoldHalfCycle = QSPI_DDR_HHC_ANALOG_DELAY; + s_command.SIOOMode = QSPI_SIOO_INST_EVERY_CMD; + + /* Send the command */ + if (HAL_QSPI_Command(hqspi, &s_command, HAL_QPSI_TIMEOUT_DEFAULT_VALUE) != HAL_OK) + { + return QSPI_ERROR; + } + + /* Send the reset memory command */ + s_command.Instruction = RESET_MEMORY_CMD; + if (HAL_QSPI_Command(hqspi, &s_command, HAL_QPSI_TIMEOUT_DEFAULT_VALUE) != HAL_OK) + { + return QSPI_ERROR; + } + + /* Configure automatic polling mode to wait the memory is ready */ + if (QSPI_AutoPollingMemReady(hqspi, HAL_QPSI_TIMEOUT_DEFAULT_VALUE) != QSPI_OK) + { + return QSPI_ERROR; + } + + return QSPI_OK; +} + +/** + * @brief This function configure the dummy cycles on memory side. + * @param hqspi: QSPI handle + */ +static uint8_t QSPI_DummyCyclesCfg(QSPI_HandleTypeDef *hqspi) +{ + QSPI_CommandTypeDef s_command; + uint8_t reg; + + /* Initialize the read volatile configuration register command */ + s_command.InstructionMode = QSPI_INSTRUCTION_1_LINE; + s_command.Instruction = READ_VOL_CFG_REG_CMD; + s_command.AddressMode = QSPI_ADDRESS_NONE; + s_command.AlternateByteMode = QSPI_ALTERNATE_BYTES_NONE; + s_command.DataMode = QSPI_DATA_1_LINE; + s_command.DummyCycles = 0; + s_command.NbData = 1; + s_command.DdrMode = QSPI_DDR_MODE_DISABLE; + s_command.DdrHoldHalfCycle = QSPI_DDR_HHC_ANALOG_DELAY; + s_command.SIOOMode = QSPI_SIOO_INST_EVERY_CMD; + + /* Configure the command */ + if (HAL_QSPI_Command(hqspi, &s_command, HAL_QPSI_TIMEOUT_DEFAULT_VALUE) != HAL_OK) + { + return QSPI_ERROR; + } + + /* Reception of the data */ + if (HAL_QSPI_Receive(hqspi, ®, HAL_QPSI_TIMEOUT_DEFAULT_VALUE) != HAL_OK) + { + return QSPI_ERROR; + } + + /* Enable write operations */ + if (QSPI_WriteEnable(hqspi) != QSPI_OK) + { + return QSPI_ERROR; + } + + /* Update volatile configuration register (with new dummy cycles) */ + s_command.Instruction = WRITE_VOL_CFG_REG_CMD; + MODIFY_REG(reg, N25Q128A_VCR_NB_DUMMY, (N25Q128A_DUMMY_CYCLES_READ_QUAD << POSITION_VAL(N25Q128A_VCR_NB_DUMMY))); + + /* Configure the write volatile configuration register command */ + if (HAL_QSPI_Command(hqspi, &s_command, HAL_QPSI_TIMEOUT_DEFAULT_VALUE) != HAL_OK) + { + return QSPI_ERROR; + } + + /* Transmission of the data */ + if (HAL_QSPI_Transmit(hqspi, ®, HAL_QPSI_TIMEOUT_DEFAULT_VALUE) != HAL_OK) + { + return QSPI_ERROR; + } + + return QSPI_OK; +} + +/** + * @brief This function send a Write Enable and wait it is effective. + * @param hqspi: QSPI handle + */ +static uint8_t QSPI_WriteEnable(QSPI_HandleTypeDef *hqspi) +{ + QSPI_CommandTypeDef s_command; + QSPI_AutoPollingTypeDef s_config; + + /* Enable write operations */ + s_command.InstructionMode = QSPI_INSTRUCTION_1_LINE; + s_command.Instruction = WRITE_ENABLE_CMD; + s_command.AddressMode = QSPI_ADDRESS_NONE; + s_command.AlternateByteMode = QSPI_ALTERNATE_BYTES_NONE; + s_command.DataMode = QSPI_DATA_NONE; + s_command.DummyCycles = 0; + s_command.DdrMode = QSPI_DDR_MODE_DISABLE; + s_command.DdrHoldHalfCycle = QSPI_DDR_HHC_ANALOG_DELAY; + s_command.SIOOMode = QSPI_SIOO_INST_EVERY_CMD; + + if (HAL_QSPI_Command(hqspi, &s_command, HAL_QPSI_TIMEOUT_DEFAULT_VALUE) != HAL_OK) + { + return QSPI_ERROR; + } + + /* Configure automatic polling mode to wait for write enabling */ + s_config.Match = N25Q128A_SR_WREN; + s_config.Mask = N25Q128A_SR_WREN; + s_config.MatchMode = QSPI_MATCH_MODE_AND; + s_config.StatusBytesSize = 1; + s_config.Interval = 0x10; + s_config.AutomaticStop = QSPI_AUTOMATIC_STOP_ENABLE; + + s_command.Instruction = READ_STATUS_REG_CMD; + s_command.DataMode = QSPI_DATA_1_LINE; + + if (HAL_QSPI_AutoPolling(hqspi, &s_command, &s_config, HAL_QPSI_TIMEOUT_DEFAULT_VALUE) != HAL_OK) + { + return QSPI_ERROR; + } + + return QSPI_OK; +} + +/** + * @brief This function read the SR of the memory and wait the EOP. + * @param hqspi: QSPI handle + * @param Timeout: timeout value before returning an error + */ +static uint8_t QSPI_AutoPollingMemReady(QSPI_HandleTypeDef *hqspi, uint32_t Timeout) +{ + QSPI_CommandTypeDef s_command; + QSPI_AutoPollingTypeDef s_config; + + /* Configure automatic polling mode to wait for memory ready */ + s_command.InstructionMode = QSPI_INSTRUCTION_1_LINE; + s_command.Instruction = READ_STATUS_REG_CMD; + s_command.AddressMode = QSPI_ADDRESS_NONE; + s_command.AlternateByteMode = QSPI_ALTERNATE_BYTES_NONE; + s_command.DataMode = QSPI_DATA_1_LINE; + s_command.DummyCycles = 0; + s_command.DdrMode = QSPI_DDR_MODE_DISABLE; + s_command.DdrHoldHalfCycle = QSPI_DDR_HHC_ANALOG_DELAY; + s_command.SIOOMode = QSPI_SIOO_INST_EVERY_CMD; + + s_config.Match = 0; + s_config.Mask = N25Q128A_SR_WIP; + s_config.MatchMode = QSPI_MATCH_MODE_AND; + s_config.StatusBytesSize = 1; + s_config.Interval = 0x10; + s_config.AutomaticStop = QSPI_AUTOMATIC_STOP_ENABLE; + + if (HAL_QSPI_AutoPolling(hqspi, &s_command, &s_config, Timeout) != HAL_OK) + { + return QSPI_ERROR; + } + + return QSPI_OK; +} +/** + * @} + */ + +/** + * @} + */ + +/** + * @} + */ + +/** + * @} + */ + +/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Drivers/BSP/STM32469I-Discovery/stm32469i_discovery_qspi.h Tue May 16 10:50:26 2017 +0200 @@ -0,0 +1,166 @@ +/** + ****************************************************************************** + * @file stm32469i_discovery_qspi.h + * @author MCD Application Team + * @version V2.0.0 + * @date 27-January-2017 + * @brief This file contains the common defines and functions prototypes for + * the stm32469i_discovery_qspi.c driver. + ****************************************************************************** + * @attention + * + * <h2><center>© COPYRIGHT(c) 2017 STMicroelectronics</center></h2> + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * 3. Neither the name of STMicroelectronics nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + ****************************************************************************** + */ + +/** @addtogroup BSP + * @{ + */ + +/** @addtogroup STM32469I_Discovery + * @{ + */ + +/* Define to prevent recursive inclusion -------------------------------------*/ +#ifndef __STM32469I_DISCOVERY_QSPI_H +#define __STM32469I_DISCOVERY_QSPI_H + +#ifdef __cplusplus + extern "C" { +#endif + +/* Includes ------------------------------------------------------------------*/ +#include "stm32f4xx_hal.h" +#include "../Components/n25q128a/n25q128a.h" + + +/** @addtogroup STM32469I_Discovery_QSPI + * @{ + */ + + +/* Exported constants --------------------------------------------------------*/ +/** @defgroup STM32469I_Discovery_QSPI_Exported_Constants STM32469I Discovery QSPI Exported Constants + * @{ + */ +/* QSPI Error codes */ +#define QSPI_OK ((uint8_t)0x00) +#define QSPI_ERROR ((uint8_t)0x01) +#define QSPI_BUSY ((uint8_t)0x02) +#define QSPI_NOT_SUPPORTED ((uint8_t)0x04) +#define QSPI_SUSPENDED ((uint8_t)0x08) + + +/* Definition for QSPI clock resources */ +#define QSPI_CLK_ENABLE() __HAL_RCC_QSPI_CLK_ENABLE() +#define QSPI_CLK_DISABLE() __HAL_RCC_QSPI_CLK_DISABLE() +#define QSPI_CS_GPIO_CLK_ENABLE() __HAL_RCC_GPIOB_CLK_ENABLE() +#define QSPI_CS_GPIO_CLK_DISABLE() __HAL_RCC_GPIOB_CLK_DISABLE() +#define QSPI_DX_CLK_GPIO_CLK_ENABLE() __HAL_RCC_GPIOF_CLK_ENABLE() +#define QSPI_DX_CLK_GPIO_CLK_DISABLE() __HAL_RCC_GPIOF_CLK_DISABLE() + +#define QSPI_FORCE_RESET() __HAL_RCC_QSPI_FORCE_RESET() +#define QSPI_RELEASE_RESET() __HAL_RCC_QSPI_RELEASE_RESET() + +/* Definition for QSPI Pins */ +#define QSPI_CS_PIN GPIO_PIN_6 +#define QSPI_CS_GPIO_PORT GPIOB +#define QSPI_CLK_PIN GPIO_PIN_10 +#define QSPI_CLK_GPIO_PORT GPIOF +#define QSPI_D0_PIN GPIO_PIN_8 +#define QSPI_D1_PIN GPIO_PIN_9 +#define QSPI_D2_PIN GPIO_PIN_7 +#define QSPI_D3_PIN GPIO_PIN_6 +#define QSPI_DX_GPIO_PORT GPIOF + + +/** + * @} + */ + +/* Exported types ------------------------------------------------------------*/ +/** @defgroup STM32469I_Discovery_QSPI_Exported_Types STM32469I Discovery QSPI Exported Types + * @{ + */ +/** + * @brief QSPI Info + * */ +typedef struct { + uint32_t FlashSize; /*!< Size of the flash */ + uint32_t EraseSectorSize; /*!< Size of sectors for the erase operation */ + uint32_t EraseSectorsNumber; /*!< Number of sectors for the erase operation */ + uint32_t ProgPageSize; /*!< Size of pages for the program operation */ + uint32_t ProgPagesNumber; /*!< Number of pages for the program operation */ +} QSPI_InfoTypeDef; + +/** + * @} + */ + + +/* Exported functions --------------------------------------------------------*/ +/** @addtogroup STM32469I_Discovery_QSPI_Exported_Functions STM32469I Discovery QSPI Exported Functions + * @{ + */ +uint8_t BSP_QSPI_Init (void); +uint8_t BSP_QSPI_DeInit (void); +uint8_t BSP_QSPI_Read (uint8_t* pData, uint32_t ReadAddr, uint32_t Size); +uint8_t BSP_QSPI_Write (uint8_t* pData, uint32_t WriteAddr, uint32_t Size); +uint8_t BSP_QSPI_Erase_Block(uint32_t BlockAddress); +uint8_t BSP_QSPI_Erase_Chip (void); +uint8_t BSP_QSPI_GetStatus (void); +uint8_t BSP_QSPI_GetInfo (QSPI_InfoTypeDef* pInfo); +uint8_t BSP_QSPI_EnableMemoryMappedMode(void); +/* BSP Aliased function maintained for legacy purpose */ +#define BSP_QSPI_MemoryMappedMode BSP_QSPI_EnableMemoryMappedMode + +/* These function can be modified in case the current settings (e.g. DMA stream) + need to be changed for specific application needs */ +void BSP_QSPI_MspInit(QSPI_HandleTypeDef *hqspi, void *Params); +void BSP_QSPI_MspDeInit(QSPI_HandleTypeDef *hqspi, void *Params); + +/** + * @} + */ + +/** + * @} + */ + +#ifdef __cplusplus +} +#endif + +#endif /* __STM32469I_DISCOVERY_QSPI_H */ +/** + * @} + */ + +/** + * @} + */ + +/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Drivers/BSP/STM32469I-Discovery/stm32469i_discovery_sd.c Tue May 16 10:50:26 2017 +0200 @@ -0,0 +1,599 @@ +/** + ****************************************************************************** + * @file stm32469i_discovery_sd.c + * @author MCD Application Team + * @version V2.0.0 + * @date 27-January-2017 + * @brief This file includes the uSD card driver mounted on STM32469I-Discovery + * board. + ****************************************************************************** + * @attention + * + * <h2><center>© COPYRIGHT(c) 2017 STMicroelectronics</center></h2> + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * 3. Neither the name of STMicroelectronics nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + ****************************************************************************** + */ + +/* File Info : ----------------------------------------------------------------- + User NOTES +1. How To use this driver: +-------------------------- + - This driver is used to drive the micro SD external card mounted on STM32469I-Discovery + board. + - This driver does not need a specific component driver for the micro SD device + to be included with. + +2. Driver description: +--------------------- + + Initialization steps: + o Initialize the micro SD card using the BSP_SD_Init() function. This + function includes the MSP layer hardware resources initialization and the + SDIO interface configuration to interface with the external micro SD. It + also includes the micro SD initialization sequence. + o To check the SD card presence you can use the function BSP_SD_IsDetected() which + returns the detection status + o If SD presence detection interrupt mode is desired, you must configure the + SD detection interrupt mode by calling the function BSP_SD_ITConfig(). The interrupt + is generated as an external interrupt whenever the micro SD card is + plugged/unplugged in/from the board. + o The function BSP_SD_GetCardInfo() is used to get the micro SD card information + which is stored in the structure "HAL_SD_CardInfoTypeDef". + + + Micro SD card operations + o The micro SD card can be accessed with read/write block(s) operations once + it is ready for access. The access can be performed whether using the polling + mode by calling the functions BSP_SD_ReadBlocks()/BSP_SD_WriteBlocks(), or by DMA + transfer using the functions BSP_SD_ReadBlocks_DMA()/BSP_SD_WriteBlocks_DMA() + o The DMA transfer complete is used with interrupt mode. Once the SD transfer + is complete, the SD interrupt is handled using the function BSP_SD_IRQHandler(), + the DMA Tx/Rx transfer complete are handled using the functions + BSP_SD_DMA_Tx_IRQHandler()/BSP_SD_DMA_Rx_IRQHandler(). The corresponding user callbacks + are implemented by the user at application level. + o The SD erase block(s) is performed using the function BSP_SD_Erase() with specifying + the number of blocks to erase. + o The SD runtime status is returned when calling the function BSP_SD_GetCardState(). + +------------------------------------------------------------------------------*/ + +/* Includes ------------------------------------------------------------------*/ +#include "stm32469i_discovery_sd.h" + +/** @addtogroup BSP + * @{ + */ + +/** @addtogroup STM32469I_Discovery + * @{ + */ + +/** @defgroup STM32469I-Discovery_SD STM32469I Discovery SD + * @{ + */ + + +/** @defgroup STM32469I-Discovery_SD_Private_TypesDefinitions STM32469I Discovery SD Private TypesDef + * @{ + */ +/** + * @} + */ + +/** @defgroup STM32469I-Discovery_SD_Private_Defines STM32469I Discovery SD Private Defines + * @{ + */ +/** + * @} + */ + +/** @defgroup STM32469I-Discovery_SD_Private_Macros STM32469I Discovery SD Private Macro + * @{ + */ +/** + * @} + */ + +/** @defgroup STM32469I-Discovery_SD_Private_Variables STM32469I Discovery SD Private Variables + * @{ + */ +SD_HandleTypeDef uSdHandle; + +/** + * @} + */ + +/** @defgroup STM32469I-Discovery_SD_Private_FunctionPrototypes STM32469I Discovery SD Private Prototypes + * @{ + */ +/** + * @} + */ + +/** @defgroup STM32469I-Discovery_SD_Private_Functions STM32469I Discovery SD Private Functions + * @{ + */ + +/** + * @brief Initializes the SD card device. + * @retval SD status + */ +uint8_t BSP_SD_Init(void) +{ + uint8_t sd_state = MSD_OK; + + /* PLLSAI is dedicated to LCD periph. Do not use it to get 48MHz*/ + + /* uSD device interface configuration */ + uSdHandle.Instance = SDIO; + + uSdHandle.Init.ClockEdge = SDIO_CLOCK_EDGE_RISING; + uSdHandle.Init.ClockBypass = SDIO_CLOCK_BYPASS_DISABLE; + uSdHandle.Init.ClockPowerSave = SDIO_CLOCK_POWER_SAVE_DISABLE; + uSdHandle.Init.BusWide = SDIO_BUS_WIDE_1B; + uSdHandle.Init.HardwareFlowControl = SDIO_HARDWARE_FLOW_CONTROL_ENABLE; + uSdHandle.Init.ClockDiv = SDIO_TRANSFER_CLK_DIV; + + /* Msp SD Detect pin initialization */ + BSP_SD_Detect_MspInit(&uSdHandle, NULL); + if(BSP_SD_IsDetected() != SD_PRESENT) /* Check if SD card is present */ + { + return MSD_ERROR_SD_NOT_PRESENT; + } + + /* Msp SD initialization */ + BSP_SD_MspInit(&uSdHandle, NULL); + + /* HAL SD initialization */ + if(HAL_SD_Init(&uSdHandle) != HAL_OK) + { + sd_state = MSD_ERROR; + } + + /* Configure SD Bus width */ + if(sd_state == MSD_OK) + { + /* Enable wide operation */ + if(HAL_SD_ConfigWideBusOperation(&uSdHandle, SDIO_BUS_WIDE_4B) != HAL_OK) + { + sd_state = MSD_ERROR; + } + else + { + sd_state = MSD_OK; + } + } + return sd_state; +} + +/** + * @brief DeInitializes the SD card device. + * @retval SD status + */ +uint8_t BSP_SD_DeInit(void) +{ + uint8_t sd_state = MSD_OK; + + uSdHandle.Instance = SDIO; + + /* HAL SD deinitialization */ + if(HAL_SD_DeInit(&uSdHandle) != HAL_OK) + { + sd_state = MSD_ERROR; + } + + /* Msp SD deinitialization */ + uSdHandle.Instance = SDIO; + BSP_SD_MspDeInit(&uSdHandle, NULL); + + return sd_state; +} + +/** + * @brief Configures Interrupt mode for SD detection pin. + * @retval Returns 0 + */ +uint8_t BSP_SD_ITConfig(void) +{ + GPIO_InitTypeDef gpio_init_structure; + + /* Configure Interrupt mode for SD detection pin */ + gpio_init_structure.Pin = SD_DETECT_PIN; + gpio_init_structure.Pull = GPIO_PULLUP; + gpio_init_structure.Speed = GPIO_SPEED_FAST; + gpio_init_structure.Mode = GPIO_MODE_IT_RISING_FALLING; + HAL_GPIO_Init(SD_DETECT_GPIO_PORT, &gpio_init_structure); + + /* Enable and set SD detect EXTI Interrupt to the lowest priority */ + HAL_NVIC_SetPriority((IRQn_Type)(SD_DETECT_EXTI_IRQn), 0x0F, 0x00); + HAL_NVIC_EnableIRQ((IRQn_Type)(SD_DETECT_EXTI_IRQn)); + + return MSD_OK; +} + +/** + * @brief Detects if SD card is correctly plugged in the memory slot or not. + * @retval Returns if SD is detected or not + */ +uint8_t BSP_SD_IsDetected(void) +{ + __IO uint8_t status = SD_PRESENT; + + /* Check SD card detect pin */ + if (HAL_GPIO_ReadPin(SD_DETECT_GPIO_PORT, SD_DETECT_PIN) == GPIO_PIN_SET) + { + status = SD_NOT_PRESENT; + } + + return status; +} + +/** + * @brief Reads block(s) from a specified address in an SD card, in polling mode. + * @param pData: Pointer to the buffer that will contain the data to transmit + * @param ReadAddr: Address from where data is to be read + * @param NumOfBlocks: Number of SD blocks to read + * @param Timeout: Timeout for read operation + * @retval SD status + */ +uint8_t BSP_SD_ReadBlocks(uint32_t *pData, uint32_t ReadAddr, uint32_t NumOfBlocks, uint32_t Timeout) +{ + if(HAL_SD_ReadBlocks(&uSdHandle, (uint8_t *)pData, ReadAddr, NumOfBlocks, Timeout) != HAL_OK) + { + return MSD_ERROR; + } + else + { + return MSD_OK; + } +} + +/** + * @brief Writes block(s) to a specified address in an SD card, in polling mode. + * @param pData: Pointer to the buffer that will contain the data to transmit + * @param WriteAddr: Address from where data is to be written + * @param NumOfBlocks: Number of SD blocks to write + * @param Timeout: Timeout for write operation + * @retval SD status + */ +uint8_t BSP_SD_WriteBlocks(uint32_t *pData, uint32_t WriteAddr, uint32_t NumOfBlocks, uint32_t Timeout) +{ + if(HAL_SD_WriteBlocks(&uSdHandle, (uint8_t *)pData, WriteAddr, NumOfBlocks, Timeout) != HAL_OK) + { + return MSD_ERROR; + } + else + { + return MSD_OK; + } +} + +/** + * @brief Reads block(s) from a specified address in an SD card, in DMA mode. + * @param pData: Pointer to the buffer that will contain the data to transmit + * @param ReadAddr: Address from where data is to be read + * @param NumOfBlocks: Number of SD blocks to read + * @retval SD status + */ +uint8_t BSP_SD_ReadBlocks_DMA(uint32_t *pData, uint32_t ReadAddr, uint32_t NumOfBlocks) +{ + /* Read block(s) in DMA transfer mode */ + if(HAL_SD_ReadBlocks_DMA(&uSdHandle, (uint8_t *)pData, ReadAddr, NumOfBlocks) != HAL_OK) + { + return MSD_ERROR; + } + else + { + return MSD_OK; + } +} + +/** + * @brief Writes block(s) to a specified address in an SD card, in DMA mode. + * @param pData: Pointer to the buffer that will contain the data to transmit + * @param WriteAddr: Address from where data is to be written + * @param NumOfBlocks: Number of SD blocks to write + * @retval SD status + */ +uint8_t BSP_SD_WriteBlocks_DMA(uint32_t *pData, uint32_t WriteAddr, uint32_t NumOfBlocks) +{ + /* Write block(s) in DMA transfer mode */ + if(HAL_SD_WriteBlocks_DMA(&uSdHandle, (uint8_t *)pData, WriteAddr, NumOfBlocks) != HAL_OK) + { + return MSD_ERROR; + } + else + { + return MSD_OK; + } +} + +/** + * @brief Erases the specified memory area of the given SD card. + * @param StartAddr: Start byte address + * @param EndAddr: End byte address + * @retval SD status + */ +uint8_t BSP_SD_Erase(uint32_t StartAddr, uint32_t EndAddr) +{ + if(HAL_SD_Erase(&uSdHandle, StartAddr, EndAddr) != HAL_OK) + { + return MSD_ERROR; + } + else + { + return MSD_OK; + } +} + +/** + * @brief Initializes the SD MSP. + * @param hsd: SD handle + * @param Params : pointer on additional configuration parameters, can be NULL. + */ +__weak void BSP_SD_MspInit(SD_HandleTypeDef *hsd, void *Params) +{ + static DMA_HandleTypeDef dma_rx_handle; + static DMA_HandleTypeDef dma_tx_handle; + GPIO_InitTypeDef gpio_init_structure; + + /* Enable SDIO clock */ + __HAL_RCC_SDIO_CLK_ENABLE(); + + /* Enable DMA2 clocks */ + __DMAx_TxRx_CLK_ENABLE(); + + /* Enable GPIOs clock */ + __HAL_RCC_GPIOC_CLK_ENABLE(); + __HAL_RCC_GPIOD_CLK_ENABLE(); + + /* Common GPIO configuration */ + gpio_init_structure.Mode = GPIO_MODE_AF_PP; + gpio_init_structure.Pull = GPIO_PULLUP; + gpio_init_structure.Speed = GPIO_SPEED_HIGH; + gpio_init_structure.Alternate = GPIO_AF12_SDIO; + + /* GPIOC configuration */ + gpio_init_structure.Pin = GPIO_PIN_8 | GPIO_PIN_9 | GPIO_PIN_10 | GPIO_PIN_11 | GPIO_PIN_12; + + HAL_GPIO_Init(GPIOC, &gpio_init_structure); + + /* GPIOD configuration */ + gpio_init_structure.Pin = GPIO_PIN_2; + HAL_GPIO_Init(GPIOD, &gpio_init_structure); + + /* NVIC configuration for SDIO interrupts */ + HAL_NVIC_SetPriority(SDIO_IRQn, 0x0E, 0); + HAL_NVIC_EnableIRQ(SDIO_IRQn); + + /* Configure DMA Rx parameters */ + dma_rx_handle.Init.Channel = SD_DMAx_Rx_CHANNEL; + dma_rx_handle.Init.Direction = DMA_PERIPH_TO_MEMORY; + dma_rx_handle.Init.PeriphInc = DMA_PINC_DISABLE; + dma_rx_handle.Init.MemInc = DMA_MINC_ENABLE; + dma_rx_handle.Init.PeriphDataAlignment = DMA_PDATAALIGN_WORD; + dma_rx_handle.Init.MemDataAlignment = DMA_MDATAALIGN_WORD; + dma_rx_handle.Init.Mode = DMA_PFCTRL; + dma_rx_handle.Init.Priority = DMA_PRIORITY_VERY_HIGH; + dma_rx_handle.Init.FIFOMode = DMA_FIFOMODE_ENABLE; + dma_rx_handle.Init.FIFOThreshold = DMA_FIFO_THRESHOLD_FULL; + dma_rx_handle.Init.MemBurst = DMA_MBURST_INC4; + dma_rx_handle.Init.PeriphBurst = DMA_PBURST_INC4; + + dma_rx_handle.Instance = SD_DMAx_Rx_STREAM; + + /* Associate the DMA handle */ + __HAL_LINKDMA(hsd, hdmarx, dma_rx_handle); + + /* Deinitialize the stream for new transfer */ + HAL_DMA_DeInit(&dma_rx_handle); + + /* Configure the DMA stream */ + HAL_DMA_Init(&dma_rx_handle); + + /* Configure DMA Tx parameters */ + dma_tx_handle.Init.Channel = SD_DMAx_Tx_CHANNEL; + dma_tx_handle.Init.Direction = DMA_MEMORY_TO_PERIPH; + dma_tx_handle.Init.PeriphInc = DMA_PINC_DISABLE; + dma_tx_handle.Init.MemInc = DMA_MINC_ENABLE; + dma_tx_handle.Init.PeriphDataAlignment = DMA_PDATAALIGN_WORD; + dma_tx_handle.Init.MemDataAlignment = DMA_MDATAALIGN_WORD; + dma_tx_handle.Init.Mode = DMA_PFCTRL; + dma_tx_handle.Init.Priority = DMA_PRIORITY_VERY_HIGH; + dma_tx_handle.Init.FIFOMode = DMA_FIFOMODE_ENABLE; + dma_tx_handle.Init.FIFOThreshold = DMA_FIFO_THRESHOLD_FULL; + dma_tx_handle.Init.MemBurst = DMA_MBURST_INC4; + dma_tx_handle.Init.PeriphBurst = DMA_PBURST_INC4; + + dma_tx_handle.Instance = SD_DMAx_Tx_STREAM; + + /* Associate the DMA handle */ + __HAL_LINKDMA(hsd, hdmatx, dma_tx_handle); + + /* Deinitialize the stream for new transfer */ + HAL_DMA_DeInit(&dma_tx_handle); + + /* Configure the DMA stream */ + HAL_DMA_Init(&dma_tx_handle); + + /* NVIC configuration for DMA transfer complete interrupt */ + HAL_NVIC_SetPriority(SD_DMAx_Rx_IRQn, 0x0F, 0); + HAL_NVIC_EnableIRQ(SD_DMAx_Rx_IRQn); + + /* NVIC configuration for DMA transfer complete interrupt */ + HAL_NVIC_SetPriority(SD_DMAx_Tx_IRQn, 0x0F, 0); + HAL_NVIC_EnableIRQ(SD_DMAx_Tx_IRQn); +} + +/** + * @brief Initializes the SD Detect pin MSP. + * @param hsd: SD handle + * @param Params : pointer on additional configuration parameters, can be NULL. + */ +__weak void BSP_SD_Detect_MspInit(SD_HandleTypeDef *hsd, void *Params) +{ + GPIO_InitTypeDef gpio_init_structure; + + SD_DETECT_GPIO_CLK_ENABLE(); + + /* GPIO configuration in input for uSD_Detect signal */ + gpio_init_structure.Pin = SD_DETECT_PIN; + gpio_init_structure.Mode = GPIO_MODE_INPUT; + gpio_init_structure.Pull = GPIO_PULLUP; + gpio_init_structure.Speed = GPIO_SPEED_HIGH; + HAL_GPIO_Init(SD_DETECT_GPIO_PORT, &gpio_init_structure); +} + +/** + * @brief DeInitializes the SD MSP. + * @param hsd: SD handle + * @param Params : pointer on additional configuration parameters, can be NULL. + */ +__weak void BSP_SD_MspDeInit(SD_HandleTypeDef *hsd, void *Params) +{ + static DMA_HandleTypeDef dma_rx_handle; + static DMA_HandleTypeDef dma_tx_handle; + + /* Disable NVIC for DMA transfer complete interrupts */ + HAL_NVIC_DisableIRQ(SD_DMAx_Rx_IRQn); + HAL_NVIC_DisableIRQ(SD_DMAx_Tx_IRQn); + + /* Deinitialize the stream for new transfer */ + dma_rx_handle.Instance = SD_DMAx_Rx_STREAM; + HAL_DMA_DeInit(&dma_rx_handle); + + /* Deinitialize the stream for new transfer */ + dma_tx_handle.Instance = SD_DMAx_Tx_STREAM; + HAL_DMA_DeInit(&dma_tx_handle); + + /* Disable NVIC for SDIO interrupts */ + HAL_NVIC_DisableIRQ(SDIO_IRQn); + + /* DeInit GPIO pins can be done in the application + (by surcharging this __weak function) */ + + /* Disable SDIO clock */ + __HAL_RCC_SDIO_CLK_DISABLE(); + + /* GPOI pins clock and DMA cloks can be shut down in the applic + by surcgarging this __weak function */ +} + +/** + * @brief Gets the current SD card data status. + * @retval Data transfer state. + * This value can be one of the following values: + * @arg SD_TRANSFER_OK: No data transfer is acting + * @arg SD_TRANSFER_BUSY: Data transfer is acting + */ +uint8_t BSP_SD_GetCardState(void) +{ + return((HAL_SD_GetCardState(&uSdHandle) == HAL_SD_CARD_TRANSFER ) ? SD_TRANSFER_OK : SD_TRANSFER_BUSY); +} + + +/** + * @brief Get SD information about specific SD card. + * @param CardInfo: Pointer to HAL_SD_CardInfoTypedef structure + * @retval None + */ +void BSP_SD_GetCardInfo(HAL_SD_CardInfoTypeDef *CardInfo) +{ + /* Get SD card Information */ + HAL_SD_GetCardInfo(&uSdHandle, CardInfo); +} + +/** + * @brief SD Abort callbacks + * @param hsd: SD handle + * @retval None + */ +void HAL_SD_AbortCallback(SD_HandleTypeDef *hsd) +{ + BSP_SD_AbortCallback(); +} + +/** + * @brief Tx Transfer completed callbacks + * @param hsd: SD handle + * @retval None + */ +void HAL_SD_TxCpltCallback(SD_HandleTypeDef *hsd) +{ + BSP_SD_WriteCpltCallback(); +} + +/** + * @brief Rx Transfer completed callbacks + * @param hsd: SD handle + * @retval None + */ +void HAL_SD_RxCpltCallback(SD_HandleTypeDef *hsd) +{ + BSP_SD_ReadCpltCallback(); +} + +/** + * @brief BSP SD Abort callbacks + * @retval None + */ +__weak void BSP_SD_AbortCallback(void) +{ + +} + +/** + * @brief BSP Tx Transfer completed callbacks + * @retval None + */ +__weak void BSP_SD_WriteCpltCallback(void) +{ + +} + +/** + * @brief BSP Rx Transfer completed callbacks + * @retval None + */ +__weak void BSP_SD_ReadCpltCallback(void) +{ + +} + +/** + * @} + */ + +/** + * @} + */ + +/** + * @} + */ + +/** + * @} + */ + +/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Drivers/BSP/STM32469I-Discovery/stm32469i_discovery_sd.h Tue May 16 10:50:26 2017 +0200 @@ -0,0 +1,164 @@ +/** + ****************************************************************************** + * @file stm32469i_discovery_sd.h + * @author MCD Application Team + * @version V2.0.0 + * @date 27-January-2017 + * @brief This file contains the common defines and functions prototypes for + * the stm32469i_discovery_sd.c driver. + ****************************************************************************** + * @attention + * + * <h2><center>© COPYRIGHT(c) 2017 STMicroelectronics</center></h2> + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * 3. Neither the name of STMicroelectronics nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + ****************************************************************************** + */ + +/* Define to prevent recursive inclusion -------------------------------------*/ +#ifndef __STM32469I_DISCOVERY_SD_H +#define __STM32469I_DISCOVERY_SD_H + +#ifdef __cplusplus + extern "C" { +#endif + +/* Includes ------------------------------------------------------------------*/ +#include "stm32469i_discovery.h" + +/** @addtogroup BSP + * @{ + */ + +/** @addtogroup STM32469I_Discovery + * @{ + */ + +/** @addtogroup STM32469I-Discovery_SD + * @{ + */ + +/** @defgroup STM32469I-Discovery_SD_Exported_Types STM32469I Discovery SD Exported Types + * @{ + */ + +/** + * @brief SD Card information structure + */ +#define BSP_SD_CardInfo HAL_SD_CardInfoTypeDef +/** + * @} + */ + +/** + * @brief SD status structure definition + */ +#define MSD_OK ((uint8_t)0x00) +#define MSD_ERROR ((uint8_t)0x01) +#define MSD_ERROR_SD_NOT_PRESENT ((uint8_t)0x02) + +/** + * @brief SD transfer state definition + */ +#define SD_TRANSFER_OK ((uint8_t)0x00) +#define SD_TRANSFER_BUSY ((uint8_t)0x01) + +/** @defgroup STM32469I-Discovery_SD_Exported_Constants STM32469I Discovery SD Exported Constants + * @{ + */ +#define SD_PRESENT ((uint8_t)0x01) +#define SD_NOT_PRESENT ((uint8_t)0x00) + +#define SD_DATATIMEOUT ((uint32_t)100000000) + +/* DMA definitions for SD DMA transfer */ +#define __DMAx_TxRx_CLK_ENABLE __HAL_RCC_DMA2_CLK_ENABLE +#define SD_DMAx_Tx_CHANNEL DMA_CHANNEL_4 +#define SD_DMAx_Rx_CHANNEL DMA_CHANNEL_4 +#define SD_DMAx_Tx_STREAM DMA2_Stream6 +#define SD_DMAx_Rx_STREAM DMA2_Stream3 +#define SD_DMAx_Tx_IRQn DMA2_Stream6_IRQn +#define SD_DMAx_Rx_IRQn DMA2_Stream3_IRQn +#define BSP_SD_IRQHandler SDIO_IRQHandler +#define BSP_SD_DMA_Tx_IRQHandler DMA2_Stream6_IRQHandler +#define BSP_SD_DMA_Rx_IRQHandler DMA2_Stream3_IRQHandler +#define SD_DetectIRQHandler() HAL_GPIO_EXTI_IRQHandler(GPIO_PIN_8) +/** + * @} + */ + +/** @defgroup STM32469I-Discovery_SD_Exported_Macro STM32469I Discovery SD Exported Macro + * @{ + */ +/** + * @} + */ + +/** @defgroup STM32469I-Discovery_SD_Exported_Functions STM32469I Discovery SD Exported Functions + * @{ + */ +uint8_t BSP_SD_Init(void); +uint8_t BSP_SD_DeInit(void); +uint8_t BSP_SD_ITConfig(void); +uint8_t BSP_SD_ReadBlocks(uint32_t *pData, uint32_t ReadAddr, uint32_t NumOfBlocks, uint32_t Timeout); +uint8_t BSP_SD_WriteBlocks(uint32_t *pData, uint32_t WriteAddr, uint32_t NumOfBlocks, uint32_t Timeout); +uint8_t BSP_SD_ReadBlocks_DMA(uint32_t *pData, uint32_t ReadAddr, uint32_t NumOfBlocks); +uint8_t BSP_SD_WriteBlocks_DMA(uint32_t *pData, uint32_t WriteAddr, uint32_t NumOfBlocks); +uint8_t BSP_SD_Erase(uint32_t StartAddr, uint32_t EndAddr); +uint8_t BSP_SD_GetCardState(void); +void BSP_SD_GetCardInfo(HAL_SD_CardInfoTypeDef *CardInfo); +uint8_t BSP_SD_IsDetected(void); + +/* These functions can be modified in case the current settings (e.g. DMA stream) + need to be changed for specific application needs */ +void BSP_SD_MspInit(SD_HandleTypeDef *hsd, void *Params); +void BSP_SD_Detect_MspInit(SD_HandleTypeDef *hsd, void *Params); +void BSP_SD_MspDeInit(SD_HandleTypeDef *hsd, void *Params); +void BSP_SD_AbortCallback(void); +void BSP_SD_WriteCpltCallback(void); +void BSP_SD_ReadCpltCallback(void); + +/** + * @} + */ + +/** + * @} + */ + +/** + * @} + */ + +/** + * @} + */ + +#ifdef __cplusplus +} +#endif + +#endif /* __STM32469I_DISCOVERY_SD_H */ + +/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Drivers/BSP/STM32469I-Discovery/stm32469i_discovery_sdram.c Tue May 16 10:50:26 2017 +0200 @@ -0,0 +1,533 @@ +/** + ****************************************************************************** + * @file stm32469i_discovery_sdram.c + * @author MCD Application Team + * @version V2.0.0 + * @date 27-January-2017 + * @brief This file includes the SDRAM driver for the MT48LC4M32B2B5-7 memory + * device mounted on STM32469I-Discovery board. + ****************************************************************************** + * @attention + * + * <h2><center>© COPYRIGHT(c) 2017 STMicroelectronics</center></h2> + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * 3. Neither the name of STMicroelectronics nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + ****************************************************************************** + */ + +/* File Info : ----------------------------------------------------------------- + User NOTES +1. How To use this driver: +-------------------------- + - This driver is used to drive the MT48LC4M32B2B5-7 SDRAM external memory mounted + on STM32469I-Discovery board. + - This driver does not need a specific component driver for the SDRAM device + to be included with. + +2. Driver description: +--------------------- + + Initialization steps: + o Initialize the SDRAM external memory using the BSP_SDRAM_Init() function. This + function includes the MSP layer hardware resources initialization and the + FMC controller configuration to interface with the external SDRAM memory. + o It contains the SDRAM initialization sequence to program the SDRAM external + device using the function BSP_SDRAM_Initialization_sequence(). Note that this + sequence is standard for all SDRAM devices, but can include some differences + from a device to another. If it is the case, the right sequence should be + implemented separately. + + + SDRAM read/write operations + o SDRAM external memory can be accessed with read/write operations once it is + initialized. + Read/write operation can be performed with AHB access using the functions + BSP_SDRAM_ReadData()/BSP_SDRAM_WriteData(), or by DMA transfer using the functions + BSP_SDRAM_ReadData_DMA()/BSP_SDRAM_WriteData_DMA(). + o The AHB access is performed with 32-bit width transaction, the DMA transfer + configuration is fixed at single (no burst) word transfer (see the + BSP_SDRAM_MspInit() weak function). + o User can implement his own functions for read/write access with his desired + configurations. + o If interrupt mode is used for DMA transfer, the function BSP_SDRAM_DMA_IRQHandler() + is called in IRQ handler file, to serve the generated interrupt once the DMA + transfer is complete. + o You can send a command to the SDRAM device in runtime using the function + BSP_SDRAM_Sendcmd(), and giving the desired command as parameter chosen between + the predefined commands of the "FMC_SDRAM_CommandTypeDef" structure. + +------------------------------------------------------------------------------*/ + +/* Includes ------------------------------------------------------------------*/ +#include "stm32469i_discovery_sdram.h" + +// mbed +void wait_ms(int ms); + +/** @addtogroup BSP + * @{ + */ + +/** @addtogroup STM32469I_Discovery + * @{ + */ + +/** @defgroup STM32469I-Discovery_SDRAM STM32469I Discovery SDRAM + * @{ + */ + +/** @defgroup STM32469I-Discovery_SDRAM_Private_Types_Definitions STM32469I Discovery SDRAM Private TypesDef + * @{ + */ +/** + * @} + */ + +/** @defgroup STM32469I-Discovery_SDRAM_Private_Defines STM32469I Discovery SDRAM Private Defines + * @{ + */ +/** + * @} + */ + +/** @defgroup STM32469I-Discovery_SDRAM_Private_Macros STM32469I Discovery SDRAM Private Macros + * @{ + */ +/** + * @} + */ + +/** @defgroup STM32469I-Discovery_SDRAM_Private_Variables STM32469I Discovery SDRAM Private Variables + * @{ + */ +static SDRAM_HandleTypeDef sdramHandle; +static FMC_SDRAM_TimingTypeDef Timing; +static FMC_SDRAM_CommandTypeDef Command; +/** + * @} + */ + +/** @defgroup STM32469I-Discovery_SDRAM_Private_Function_Prototypes STM32469I Discovery SDRAM Private Prototypes + * @{ + */ + +/** + * @} + */ + +/** @defgroup STM32469I-Discovery_SDRAM_Private_Functions STM32469I Discovery SDRAM Private Functions + * @{ + */ + +/** + * @} + */ + +/** @defgroup STM32469I_Discovery_SDRAM_Exported_Functions STM32469I Discovery SDRAM Exported Functions + * @{ + */ + +/** + * @brief Initializes the SDRAM device. + * @retval SDRAM status + */ +uint8_t BSP_SDRAM_Init(void) +{ + static uint8_t sdramstatus = SDRAM_ERROR; + + /* SDRAM device configuration */ + sdramHandle.Instance = FMC_SDRAM_DEVICE; + + /* Timing configuration for 90 MHz as SD clock frequency (System clock is up to 180 MHz) */ + Timing.LoadToActiveDelay = 2; + Timing.ExitSelfRefreshDelay = 7; + Timing.SelfRefreshTime = 4; + Timing.RowCycleDelay = 7; + Timing.WriteRecoveryTime = 2; + Timing.RPDelay = 2; + Timing.RCDDelay = 2; + + sdramHandle.Init.SDBank = FMC_SDRAM_BANK1; + sdramHandle.Init.ColumnBitsNumber = FMC_SDRAM_COLUMN_BITS_NUM_8; + sdramHandle.Init.RowBitsNumber = FMC_SDRAM_ROW_BITS_NUM_12; + sdramHandle.Init.MemoryDataWidth = SDRAM_MEMORY_WIDTH; + sdramHandle.Init.InternalBankNumber = FMC_SDRAM_INTERN_BANKS_NUM_4; + sdramHandle.Init.CASLatency = FMC_SDRAM_CAS_LATENCY_3; + sdramHandle.Init.WriteProtection = FMC_SDRAM_WRITE_PROTECTION_DISABLE; + sdramHandle.Init.SDClockPeriod = SDCLOCK_PERIOD; + sdramHandle.Init.ReadBurst = FMC_SDRAM_RBURST_ENABLE; + sdramHandle.Init.ReadPipeDelay = FMC_SDRAM_RPIPE_DELAY_0; + + /* SDRAM controller initialization */ + /* __weak function can be surcharged by the application code */ + BSP_SDRAM_MspInit(&sdramHandle, (void *)NULL); + if(HAL_SDRAM_Init(&sdramHandle, &Timing) != HAL_OK) + { + sdramstatus = SDRAM_ERROR; + } + else + { + sdramstatus = SDRAM_OK; + } + + /* SDRAM initialization sequence */ + BSP_SDRAM_Initialization_sequence(REFRESH_COUNT); + + return sdramstatus; +} + +/** + * @brief DeInitializes the SDRAM device. + * @retval SDRAM status : SDRAM_OK or SDRAM_ERROR. + */ +uint8_t BSP_SDRAM_DeInit(void) +{ + static uint8_t sdramstatus = SDRAM_ERROR; + + /* SDRAM device configuration */ + sdramHandle.Instance = FMC_SDRAM_DEVICE; + + if(HAL_SDRAM_DeInit(&sdramHandle) == HAL_OK) + { + sdramstatus = SDRAM_OK; + + /* SDRAM controller De-initialization */ + BSP_SDRAM_MspDeInit(&sdramHandle, (void *)NULL); + } + + return sdramstatus; +} + + +/** + * @brief Programs the SDRAM device. + * @param RefreshCount: SDRAM refresh counter value + */ +void BSP_SDRAM_Initialization_sequence(uint32_t RefreshCount) +{ + __IO uint32_t tmpmrd = 0; + + /* Step 1: Configure a clock configuration enable command */ + Command.CommandMode = FMC_SDRAM_CMD_CLK_ENABLE; + Command.CommandTarget = FMC_SDRAM_CMD_TARGET_BANK1; + Command.AutoRefreshNumber = 1; + Command.ModeRegisterDefinition = 0; + + /* Send the command */ + HAL_SDRAM_SendCommand(&sdramHandle, &Command, SDRAM_TIMEOUT); + + /* Step 2: Insert 100 us minimum delay */ + /* Inserted delay is equal to 1 ms due to systick time base unit (ms) */ + //HAL_Delay(1); + wait_ms(1); + + /* Step 3: Configure a PALL (precharge all) command */ + Command.CommandMode = FMC_SDRAM_CMD_PALL; + Command.CommandTarget = FMC_SDRAM_CMD_TARGET_BANK1; + Command.AutoRefreshNumber = 1; + Command.ModeRegisterDefinition = 0; + + /* Send the command */ + HAL_SDRAM_SendCommand(&sdramHandle, &Command, SDRAM_TIMEOUT); + + /* Step 4: Configure an Auto Refresh command */ + Command.CommandMode = FMC_SDRAM_CMD_AUTOREFRESH_MODE; + Command.CommandTarget = FMC_SDRAM_CMD_TARGET_BANK1; + Command.AutoRefreshNumber = 8; + Command.ModeRegisterDefinition = 0; + + /* Send the command */ + HAL_SDRAM_SendCommand(&sdramHandle, &Command, SDRAM_TIMEOUT); + + /* Step 5: Program the external memory mode register */ + tmpmrd = (uint32_t)SDRAM_MODEREG_BURST_LENGTH_1 |\ + SDRAM_MODEREG_BURST_TYPE_SEQUENTIAL |\ + SDRAM_MODEREG_CAS_LATENCY_3 |\ + SDRAM_MODEREG_OPERATING_MODE_STANDARD |\ + SDRAM_MODEREG_WRITEBURST_MODE_SINGLE; + + Command.CommandMode = FMC_SDRAM_CMD_LOAD_MODE; + Command.CommandTarget = FMC_SDRAM_CMD_TARGET_BANK1; + Command.AutoRefreshNumber = 1; + Command.ModeRegisterDefinition = tmpmrd; + + /* Send the command */ + HAL_SDRAM_SendCommand(&sdramHandle, &Command, SDRAM_TIMEOUT); + + /* Step 6: Set the refresh rate counter */ + /* Set the device refresh rate */ + HAL_SDRAM_ProgramRefreshRate(&sdramHandle, RefreshCount); +} + +/** + * @brief Reads an mount of data from the SDRAM memory in polling mode. + * @param uwStartAddress: Read start address + * @param pData: Pointer to data to be read + * @param uwDataSize: Size of read data from the memory + * @retval SDRAM status : SDRAM_OK or SDRAM_ERROR. + */ +uint8_t BSP_SDRAM_ReadData(uint32_t uwStartAddress, uint32_t *pData, uint32_t uwDataSize) +{ + if(HAL_SDRAM_Read_32b(&sdramHandle, (uint32_t *)uwStartAddress, pData, uwDataSize) != HAL_OK) + { + return SDRAM_ERROR; + } + else + { + return SDRAM_OK; + } +} + +/** + * @brief Reads an mount of data from the SDRAM memory in DMA mode. + * @param uwStartAddress: Read start address + * @param pData: Pointer to data to be read + * @param uwDataSize: Size of read data from the memory + * @retval SDRAM status : SDRAM_OK or SDRAM_ERROR. + */ +uint8_t BSP_SDRAM_ReadData_DMA(uint32_t uwStartAddress, uint32_t *pData, uint32_t uwDataSize) +{ + if(HAL_SDRAM_Read_DMA(&sdramHandle, (uint32_t *)uwStartAddress, pData, uwDataSize) != HAL_OK) + { + return SDRAM_ERROR; + } + else + { + return SDRAM_OK; + } +} + +/** + * @brief Writes an mount of data to the SDRAM memory in polling mode. + * @param uwStartAddress: Write start address + * @param pData: Pointer to data to be written + * @param uwDataSize: Size of written data from the memory + * @retval SDRAM status : SDRAM_OK or SDRAM_ERROR. + */ +uint8_t BSP_SDRAM_WriteData(uint32_t uwStartAddress, uint32_t *pData, uint32_t uwDataSize) +{ + if(HAL_SDRAM_Write_32b(&sdramHandle, (uint32_t *)uwStartAddress, pData, uwDataSize) != HAL_OK) + { + return SDRAM_ERROR; + } + else + { + return SDRAM_OK; + } +} + +/** + * @brief Writes an mount of data to the SDRAM memory in DMA mode. + * @param uwStartAddress: Write start address + * @param pData: Pointer to data to be written + * @param uwDataSize: Size of written data from the memory + * @retval SDRAM status : SDRAM_OK or SDRAM_ERROR. + */ +uint8_t BSP_SDRAM_WriteData_DMA(uint32_t uwStartAddress, uint32_t *pData, uint32_t uwDataSize) +{ + if(HAL_SDRAM_Write_DMA(&sdramHandle, (uint32_t *)uwStartAddress, pData, uwDataSize) != HAL_OK) + { + return SDRAM_ERROR; + } + else + { + return SDRAM_OK; + } +} + +/** + * @brief Sends command to the SDRAM bank. + * @param SdramCmd: Pointer to SDRAM command structure + * @retval HAL status : SDRAM_OK or SDRAM_ERROR. + */ +uint8_t BSP_SDRAM_Sendcmd(FMC_SDRAM_CommandTypeDef *SdramCmd) +{ + if(HAL_SDRAM_SendCommand(&sdramHandle, SdramCmd, SDRAM_TIMEOUT) != HAL_OK) + { + return SDRAM_ERROR; + } + else + { + return SDRAM_OK; + } +} + +/** + * @brief Handles SDRAM DMA transfer interrupt request. + */ +void BSP_SDRAM_DMA_IRQHandler(void) +{ + HAL_DMA_IRQHandler(sdramHandle.hdma); +} + +/** + * @brief Initializes SDRAM MSP. + * @note This function can be surcharged by application code. + * @param hsdram: pointer on SDRAM handle + * @param Params: pointer on additional configuration parameters, can be NULL. + */ +__weak void BSP_SDRAM_MspInit(SDRAM_HandleTypeDef *hsdram, void *Params) +{ + static DMA_HandleTypeDef dma_handle; + GPIO_InitTypeDef gpio_init_structure; + + if(hsdram != (SDRAM_HandleTypeDef *)NULL) + { + /* Enable FMC clock */ + __HAL_RCC_FMC_CLK_ENABLE(); + + /* Enable chosen DMAx clock */ + __DMAx_CLK_ENABLE(); + + /* Enable GPIOs clock */ + __HAL_RCC_GPIOC_CLK_ENABLE(); + __HAL_RCC_GPIOD_CLK_ENABLE(); + __HAL_RCC_GPIOE_CLK_ENABLE(); + __HAL_RCC_GPIOF_CLK_ENABLE(); + __HAL_RCC_GPIOG_CLK_ENABLE(); + __HAL_RCC_GPIOH_CLK_ENABLE(); + __HAL_RCC_GPIOI_CLK_ENABLE(); + + /* Common GPIO configuration */ + gpio_init_structure.Mode = GPIO_MODE_AF_PP; + gpio_init_structure.Pull = GPIO_PULLUP; + gpio_init_structure.Speed = GPIO_SPEED_FAST; + gpio_init_structure.Alternate = GPIO_AF12_FMC; + + /* GPIOC configuration : PC0 is SDNWE */ + gpio_init_structure.Pin = GPIO_PIN_0; + HAL_GPIO_Init(GPIOC, &gpio_init_structure); + + /* GPIOD configuration */ + gpio_init_structure.Pin = GPIO_PIN_0 | GPIO_PIN_1 | GPIO_PIN_8| GPIO_PIN_9 | GPIO_PIN_10 |\ + GPIO_PIN_14 | GPIO_PIN_15; + + + HAL_GPIO_Init(GPIOD, &gpio_init_structure); + + /* GPIOE configuration */ + gpio_init_structure.Pin = GPIO_PIN_0 | GPIO_PIN_1 | GPIO_PIN_7| GPIO_PIN_8 | GPIO_PIN_9 |\ + GPIO_PIN_10 | GPIO_PIN_11 | GPIO_PIN_12 | GPIO_PIN_13 | GPIO_PIN_14 |\ + GPIO_PIN_15; + + HAL_GPIO_Init(GPIOE, &gpio_init_structure); + + /* GPIOF configuration */ + gpio_init_structure.Pin = GPIO_PIN_0 | GPIO_PIN_1 | GPIO_PIN_2| GPIO_PIN_3 | GPIO_PIN_4 |\ + GPIO_PIN_5 | GPIO_PIN_11 | GPIO_PIN_12 | GPIO_PIN_13 | GPIO_PIN_14 |\ + GPIO_PIN_15; + + HAL_GPIO_Init(GPIOF, &gpio_init_structure); + + /* GPIOG configuration */ + gpio_init_structure.Pin = GPIO_PIN_0 | GPIO_PIN_1 | GPIO_PIN_4| GPIO_PIN_5 | GPIO_PIN_8 |\ + GPIO_PIN_15; + HAL_GPIO_Init(GPIOG, &gpio_init_structure); + + /* GPIOH configuration */ + gpio_init_structure.Pin = GPIO_PIN_2 | GPIO_PIN_3 | GPIO_PIN_8 | GPIO_PIN_9 |\ + GPIO_PIN_10 | GPIO_PIN_11 | GPIO_PIN_12 | GPIO_PIN_13 | GPIO_PIN_14 |\ + GPIO_PIN_15; + HAL_GPIO_Init(GPIOH, &gpio_init_structure); + + /* GPIOI configuration */ + gpio_init_structure.Pin = GPIO_PIN_0 | GPIO_PIN_1 | GPIO_PIN_2 | GPIO_PIN_3 | GPIO_PIN_4 |\ + GPIO_PIN_5 | GPIO_PIN_6 | GPIO_PIN_7 | GPIO_PIN_9 | GPIO_PIN_10; + HAL_GPIO_Init(GPIOI, &gpio_init_structure); + + /* Configure common DMA parameters */ + dma_handle.Init.Channel = SDRAM_DMAx_CHANNEL; + dma_handle.Init.Direction = DMA_MEMORY_TO_MEMORY; + dma_handle.Init.PeriphInc = DMA_PINC_ENABLE; + dma_handle.Init.MemInc = DMA_MINC_ENABLE; + dma_handle.Init.PeriphDataAlignment = DMA_PDATAALIGN_WORD; + dma_handle.Init.MemDataAlignment = DMA_MDATAALIGN_WORD; + dma_handle.Init.Mode = DMA_NORMAL; + dma_handle.Init.Priority = DMA_PRIORITY_HIGH; + dma_handle.Init.FIFOMode = DMA_FIFOMODE_DISABLE; + dma_handle.Init.FIFOThreshold = DMA_FIFO_THRESHOLD_FULL; + dma_handle.Init.MemBurst = DMA_MBURST_SINGLE; + dma_handle.Init.PeriphBurst = DMA_PBURST_SINGLE; + + dma_handle.Instance = SDRAM_DMAx_STREAM; + + /* Associate the DMA handle */ + __HAL_LINKDMA(hsdram, hdma, dma_handle); + + /* Deinitialize the stream for new transfer */ + HAL_DMA_DeInit(&dma_handle); + + /* Configure the DMA stream */ + HAL_DMA_Init(&dma_handle); + + /* NVIC configuration for DMA transfer complete interrupt */ + HAL_NVIC_SetPriority(SDRAM_DMAx_IRQn, 5, 0); + HAL_NVIC_EnableIRQ(SDRAM_DMAx_IRQn); + + } /* of if(hsdram != (SDRAM_HandleTypeDef *)NULL) */ +} + +/** + * @brief DeInitializes SDRAM MSP. + * @note This function can be surcharged by application code. + * @param hsdram: pointer on SDRAM handle + * @param Params: pointer on additional configuration parameters, can be NULL. + */ +__weak void BSP_SDRAM_MspDeInit(SDRAM_HandleTypeDef *hsdram, void *Params) +{ + static DMA_HandleTypeDef dma_handle; + + if(hsdram != (SDRAM_HandleTypeDef *)NULL) + { + /* Disable NVIC configuration for DMA interrupt */ + HAL_NVIC_DisableIRQ(SDRAM_DMAx_IRQn); + + /* Deinitialize the stream for new transfer */ + dma_handle.Instance = SDRAM_DMAx_STREAM; + HAL_DMA_DeInit(&dma_handle); + + /* DeInit GPIO pins can be done in the application + (by surcharging this __weak function) */ + + /* GPIO pins clock, FMC clock and DMA clock can be shut down in the application + by surcharging this __weak function */ + + } /* of if(hsdram != (SDRAM_HandleTypeDef *)NULL) */ +} + +/** + * @} + */ + +/** + * @} + */ + +/** + * @} + */ + +/** + * @} + */ + +/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Drivers/BSP/STM32469I-Discovery/stm32469i_discovery_sdram.h Tue May 16 10:50:26 2017 +0200 @@ -0,0 +1,169 @@ +/** + ****************************************************************************** + * @file stm32469i_discovery_sdram.h + * @author MCD Application Team + * @version V2.0.0 + * @date 27-January-2017 + * @brief This file contains the common defines and functions prototypes for + * the stm32469i_discovery_sdram.c driver. + ****************************************************************************** + * @attention + * + * <h2><center>© COPYRIGHT(c) 2017 STMicroelectronics</center></h2> + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * 3. Neither the name of STMicroelectronics nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + ****************************************************************************** + */ + +/* Define to prevent recursive inclusion -------------------------------------*/ +#ifndef __STM32469I_DISCOVERY_SDRAM_H +#define __STM32469I_DISCOVERY_SDRAM_H + +#ifdef __cplusplus + extern "C" { +#endif + +/* Includes ------------------------------------------------------------------*/ +#include "stm32f4xx_hal.h" + +/** @addtogroup BSP + * @{ + */ + +/** @addtogroup STM32469I_Discovery + * @{ + */ + +/** @addtogroup STM32469I-Discovery_SDRAM + * @{ + */ + +/** @defgroup STM32469I-Discovery_SDRAM_Exported_Types STM32469I Discovery SDRAM Exported Types + * @{ + */ + +/** + * @brief SDRAM status structure definition + */ +#define SDRAM_OK ((uint8_t)0x00) +#define SDRAM_ERROR ((uint8_t)0x01) + +/** + * @} + */ + +/** @defgroup STM32469I-Discovery_SDRAM_Exported_Constants STM32469I Discovery SDRAM Exported Constants + * @{ + */ +#define SDRAM_DEVICE_ADDR ((uint32_t)0xC0000000) + + /* SDRAM device size in Bytes */ + #define SDRAM_DEVICE_SIZE ((uint32_t)0x1000000) + +#define SDRAM_MEMORY_WIDTH FMC_SDRAM_MEM_BUS_WIDTH_32 +#define SDCLOCK_PERIOD FMC_SDRAM_CLOCK_PERIOD_2 + +/* SDRAM refresh counter (90 MHz SD clock) */ +#define REFRESH_COUNT ((uint32_t)0x0569) +#define SDRAM_TIMEOUT ((uint32_t)0xFFFF) + +/* DMA definitions for SDRAM DMA transfer */ +#define __DMAx_CLK_ENABLE __HAL_RCC_DMA2_CLK_ENABLE +#define __DMAx_CLK_DISABLE __HAL_RCC_DMA2_CLK_DISABLE +#define SDRAM_DMAx_CHANNEL DMA_CHANNEL_0 +#define SDRAM_DMAx_STREAM DMA2_Stream0 +#define SDRAM_DMAx_IRQn DMA2_Stream0_IRQn +#define SDRAM_DMAx_IRQHandler DMA2_Stream0_IRQHandler + + +/** + * @brief FMC SDRAM Mode definition register defines + */ +#define SDRAM_MODEREG_BURST_LENGTH_1 ((uint16_t)0x0000) +#define SDRAM_MODEREG_BURST_LENGTH_2 ((uint16_t)0x0001) +#define SDRAM_MODEREG_BURST_LENGTH_4 ((uint16_t)0x0002) +#define SDRAM_MODEREG_BURST_LENGTH_8 ((uint16_t)0x0004) +#define SDRAM_MODEREG_BURST_TYPE_SEQUENTIAL ((uint16_t)0x0000) +#define SDRAM_MODEREG_BURST_TYPE_INTERLEAVED ((uint16_t)0x0008) +#define SDRAM_MODEREG_CAS_LATENCY_2 ((uint16_t)0x0020) +#define SDRAM_MODEREG_CAS_LATENCY_3 ((uint16_t)0x0030) +#define SDRAM_MODEREG_OPERATING_MODE_STANDARD ((uint16_t)0x0000) +#define SDRAM_MODEREG_WRITEBURST_MODE_PROGRAMMED ((uint16_t)0x0000) +#define SDRAM_MODEREG_WRITEBURST_MODE_SINGLE ((uint16_t)0x0200) +/** + * @} + */ + +/** @defgroup STM32469I-Discovery_SDRAM_Exported_Macro STM32469I Discovery SDRAM Exported Macro + * @{ + */ +/** + * @} + */ + +/** @addtogroup STM32469I_Discovery_SDRAM_Exported_Functions + * @{ + */ +uint8_t BSP_SDRAM_Init(void); +uint8_t BSP_SDRAM_DeInit(void); +void BSP_SDRAM_Initialization_sequence(uint32_t RefreshCount); +uint8_t BSP_SDRAM_ReadData(uint32_t uwStartAddress, uint32_t *pData, uint32_t uwDataSize); +uint8_t BSP_SDRAM_ReadData_DMA(uint32_t uwStartAddress, uint32_t *pData, uint32_t uwDataSize); +uint8_t BSP_SDRAM_WriteData(uint32_t uwStartAddress, uint32_t *pData, uint32_t uwDataSize); +uint8_t BSP_SDRAM_WriteData_DMA(uint32_t uwStartAddress, uint32_t *pData, uint32_t uwDataSize); +uint8_t BSP_SDRAM_Sendcmd(FMC_SDRAM_CommandTypeDef *SdramCmd); +void BSP_SDRAM_DMA_IRQHandler(void); + +/* These function can be modified in case the current settings (e.g. DMA stream) + need to be changed for specific application needs */ +void BSP_SDRAM_MspInit(SDRAM_HandleTypeDef *hsdram, void *Params); +void BSP_SDRAM_MspDeInit(SDRAM_HandleTypeDef *hsdram, void *Params); + +/** + * @} + */ + +/** + * @} + */ + +/** + * @} + */ + +/** + * @} + */ + +/** + * @} + */ + +#ifdef __cplusplus +} +#endif + +#endif /* __STM32469I_DISCOVERY_SDRAM_H */ + +/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Drivers/BSP/STM32469I-Discovery/stm32469i_discovery_ts.c Tue May 16 10:50:26 2017 +0200 @@ -0,0 +1,482 @@ +/** + ****************************************************************************** + * @file stm32469i_discovery_ts.c + * @author MCD Application Team + * @version V2.0.0 + * @date 27-January-2017 + * @brief This file provides a set of functions needed to manage the Touch + * Screen on STM32469I-Discovery board. + ****************************************************************************** + * @attention + * + * <h2><center>© COPYRIGHT(c) 2017 STMicroelectronics</center></h2> + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * 3. Neither the name of STMicroelectronics nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + ****************************************************************************** + */ + +/* File Info : ----------------------------------------------------------------- + User NOTES +1. How To use this driver: +-------------------------- + - This driver is used to drive the touch screen module of the STM32469I-Discovery + board on the K.O.D Optica Technology 480x800 TFT-LCD mounted on + MB1189 board. The touch screen driver IC inside the K.O.D module KM-040TMP-02 + is a FT6206 by Focal Tech. + +2. Driver description: +--------------------- + + Initialization steps: + o Initialize the TS module using the BSP_TS_Init() function. This + function includes the MSP layer hardware resources initialization and the + communication layer configuration to start the TS use. The LCD size properties + (x and y) are passed as parameters. + o If TS interrupt mode is desired, you must configure the TS interrupt mode + by calling the function BSP_TS_ITConfig(). The TS interrupt mode is generated + as an external interrupt whenever a touch is detected. + The interrupt mode internally uses the IO functionalities driver driven by + the IO expander, to configure the IT line. + + + Touch screen use + o The touch screen state is captured whenever the function BSP_TS_GetState() is + used. This function returns information about the last LCD touch occurred + in the TS_StateTypeDef structure. + o If TS interrupt mode is used, the function BSP_TS_ITGetStatus() is needed to get + the interrupt status. To clear the IT pending bits, you should call the + function BSP_TS_ITClear(). + o The IT is handled using the corresponding external interrupt IRQ handler, + the user IT callback treatment is implemented on the same external interrupt + callback. + +------------------------------------------------------------------------------*/ + +/* Includes ------------------------------------------------------------------*/ +#include "stm32469i_discovery_ts.h" + +/** @addtogroup BSP + * @{ + */ + +/** @addtogroup STM32469I_Discovery + * @{ + */ + +/** @defgroup STM32469I-Discovery_TS STM32469I Discovery TS + * @{ + */ + +/** @defgroup STM32469I-Discovery_TS_Private_Types_Definitions STM32469I Discovery TS Private Types Definitions + * @{ + */ +/** + * @} + */ + +/** @defgroup STM32469I-Discovery_TS_Private_Defines STM32469I Discovery TS Private Types Defines + * @{ + */ +/** + * @} + */ + +/** @defgroup STM32469I-Discovery_TS_Private_Macros STM32469I Discovery TS Private Macros + * @{ + */ +/** + * @} + */ + +/** @defgroup STM32469I-Discovery_TS_Imported_Variables STM32469I Discovery TS Imported Variables + * @{ + */ + /** + * @} + */ + +/** @defgroup STM32469I-Discovery_TS_Private_Variables STM32469I Discovery TS Private Variables + * @{ + */ +static TS_DrvTypeDef *ts_driver; +static uint8_t ts_orientation; +uint8_t I2C_Address = 0; + +/* Table for touchscreen event information display on LCD : table indexed on enum @ref TS_TouchEventTypeDef information */ +char * ts_event_string_tab[TOUCH_EVENT_NB_MAX] = { "None", + "Press down", + "Lift up", + "Contact" + }; + +/* Table for touchscreen gesture Id information display on LCD : table indexed on enum @ref TS_GestureIdTypeDef information */ +char * ts_gesture_id_string_tab[GEST_ID_NB_MAX] = { "None", + "Move Up", + "Move Right", + "Move Down", + "Move Left", + "Zoom In", + "Zoom Out" + }; + +/** + * @} + */ + +/** @defgroup STM32469I-Discovery_TS_Private_Function_Prototypes STM32469I Discovery TS Private Function Prototypes + * @{ + */ + +/** + * @} + */ + +/** @defgroup STM32469I-Discovery_TS_Public_Functions STM32469I Discovery TS Public Functions + * @{ + */ + +/** + * @brief Initializes and configures the touch screen functionalities and + * configures all necessary hardware resources (GPIOs, I2C, clocks..). + * @param ts_SizeX : Maximum X size of the TS area on LCD + * @param ts_SizeY : Maximum Y size of the TS area on LCD + * @retval TS_OK if all initializations are OK. Other value if error. + */ +uint8_t BSP_TS_Init(uint16_t ts_SizeX, uint16_t ts_SizeY) +{ + uint8_t ts_status = TS_OK; + uint8_t ts_id1, ts_id2 = 0; + /* Note : I2C_Address is un-initialized here, but is not used at all in init function */ + /* but the prototype of Init() is like that in template and should be respected */ + + /* Initialize the communication channel to sensor (I2C) if necessary */ + /* that is initialization is done only once after a power up */ + ft6x06_ts_drv.Init(I2C_Address); + + ts_id1 = ft6x06_ts_drv.ReadID(TS_I2C_ADDRESS); + if(ts_id1 != FT6206_ID_VALUE) + { + ts_id2 = ft6x06_ts_drv.ReadID(TS_I2C_ADDRESS_A02); + I2C_Address = TS_I2C_ADDRESS_A02; + } + else + { + I2C_Address = TS_I2C_ADDRESS; + } + + /* Scan FT6xx6 TouchScreen IC controller ID register by I2C Read */ + /* Verify this is a FT6206 or FT6336G, otherwise this is an error case */ + if((ts_id1 == FT6206_ID_VALUE) || (ts_id2 == FT6206_ID_VALUE)) + { + /* Found FT6206 : Initialize the TS driver structure */ + ts_driver = &ft6x06_ts_drv; + + /* Get LCD chosen orientation */ + if(ts_SizeX < ts_SizeY) + { + ts_orientation = TS_SWAP_NONE; + } + else + { + ts_orientation = TS_SWAP_XY | TS_SWAP_Y; + } + + if(ts_status == TS_OK) + { + /* Software reset the TouchScreen */ + ts_driver->Reset(I2C_Address); + + /* Calibrate, Configure and Start the TouchScreen driver */ + ts_driver->Start(I2C_Address); + + } /* of if(ts_status == TS_OK) */ + } + else + { + ts_status = TS_DEVICE_NOT_FOUND; + } + + return (ts_status); +} + +/** + * @brief Configures and enables the touch screen interrupts both at GPIO level and + * in TouchScreen IC driver configuration. + * @retval TS_OK if all initializations are OK. + */ +uint8_t BSP_TS_ITConfig(void) +{ + uint8_t ts_status = TS_OK; + GPIO_InitTypeDef gpio_init_structure; + + /* Msp Init of GPIO used for TS_INT pin coming from TouchScreen driver IC FT6x06 */ + /* When touchscreen is operated in interrupt mode */ + BSP_TS_INT_MspInit(); + + /* Configure Interrupt mode for TS_INT pin falling edge : when a new touch is available */ + /* TS_INT pin is active on low level on new touch available */ + gpio_init_structure.Pin = TS_INT_PIN; + gpio_init_structure.Pull = GPIO_PULLUP; + gpio_init_structure.Speed = GPIO_SPEED_FAST; + gpio_init_structure.Mode = GPIO_MODE_IT_FALLING; + HAL_GPIO_Init(TS_INT_GPIO_PORT, &gpio_init_structure); + + /* Enable and set the TS_INT EXTI Interrupt to an intermediate priority */ + HAL_NVIC_SetPriority((IRQn_Type)(TS_INT_EXTI_IRQn), 0x05, 0x00); + HAL_NVIC_EnableIRQ((IRQn_Type)(TS_INT_EXTI_IRQn)); + + /* Enable the TS in interrupt mode */ + /* In that case the INT output of FT6206 when new touch is available */ + /* is active on low level and directed on EXTI */ + ts_driver->EnableIT(I2C_Address); + + return (ts_status); +} + +/** + * @brief Returns status and positions of the touch screen. + * @param TS_State: Pointer to touch screen current state structure + * @retval TS_OK if all initializations are OK. Other value if error. + */ +uint8_t BSP_TS_GetState(TS_StateTypeDef *TS_State) +{ + static uint32_t _x[TS_MAX_NB_TOUCH] = {0, 0}; + static uint32_t _y[TS_MAX_NB_TOUCH] = {0, 0}; + uint8_t ts_status = TS_OK; + uint16_t tmp; + uint16_t Raw_x[TS_MAX_NB_TOUCH]; + uint16_t Raw_y[TS_MAX_NB_TOUCH]; + uint16_t xDiff; + uint16_t yDiff; + uint32_t index; +#if (TS_MULTI_TOUCH_SUPPORTED == 1) + uint32_t weight = 0; + uint32_t area = 0; + uint32_t event = 0; +#endif /* TS_MULTI_TOUCH_SUPPORTED == 1 */ + + /* Check and update the number of touches active detected */ + TS_State->touchDetected = ts_driver->DetectTouch(I2C_Address); + if(TS_State->touchDetected) + { + for(index=0; index < TS_State->touchDetected; index++) + { + /* Get each touch coordinates */ + ts_driver->GetXY(I2C_Address, &(Raw_x[index]), &(Raw_y[index])); + + if(ts_orientation & TS_SWAP_XY) + { + tmp = Raw_x[index]; + Raw_x[index] = Raw_y[index]; + Raw_y[index] = tmp; + } + + if(ts_orientation & TS_SWAP_X) + { + Raw_x[index] = FT_6206_MAX_WIDTH - 1 - Raw_x[index]; + } + + if(ts_orientation & TS_SWAP_Y) + { + Raw_y[index] = FT_6206_MAX_HEIGHT - 1 - Raw_y[index]; + } + + xDiff = Raw_x[index] > _x[index]? (Raw_x[index] - _x[index]): (_x[index] - Raw_x[index]); + yDiff = Raw_y[index] > _y[index]? (Raw_y[index] - _y[index]): (_y[index] - Raw_y[index]); + + if ((xDiff + yDiff) > 5) + { + _x[index] = Raw_x[index]; + _y[index] = Raw_y[index]; + } + + + TS_State->touchX[index] = _x[index]; + TS_State->touchY[index] = _y[index]; + +#if (TS_MULTI_TOUCH_SUPPORTED == 1) + + /* Get touch info related to the current touch */ + ft6x06_TS_GetTouchInfo(I2C_Address, index, &weight, &area, &event); + + /* Update TS_State structure */ + TS_State->touchWeight[index] = weight; + TS_State->touchArea[index] = area; + + /* Remap touch event */ + switch(event) + { + case FT6206_TOUCH_EVT_FLAG_PRESS_DOWN : + TS_State->touchEventId[index] = TOUCH_EVENT_PRESS_DOWN; + break; + case FT6206_TOUCH_EVT_FLAG_LIFT_UP : + TS_State->touchEventId[index] = TOUCH_EVENT_LIFT_UP; + break; + case FT6206_TOUCH_EVT_FLAG_CONTACT : + TS_State->touchEventId[index] = TOUCH_EVENT_CONTACT; + break; + case FT6206_TOUCH_EVT_FLAG_NO_EVENT : + TS_State->touchEventId[index] = TOUCH_EVENT_NO_EVT; + break; + default : + ts_status = TS_ERROR; + break; + } /* of switch(event) */ + +#endif /* TS_MULTI_TOUCH_SUPPORTED == 1 */ + + } /* of for(index=0; index < TS_State->touchDetected; index++) */ + +#if (TS_MULTI_TOUCH_SUPPORTED == 1) + /* Get gesture Id */ + ts_status = BSP_TS_Get_GestureId(TS_State); +#endif /* TS_MULTI_TOUCH_SUPPORTED == 1 */ + + } /* end of if(TS_State->touchDetected != 0) */ + + return (ts_status); +} + +#if (TS_MULTI_TOUCH_SUPPORTED == 1) +/** + * @brief Update gesture Id following a touch detected. + * @param TS_State: Pointer to touch screen current state structure + * @retval TS_OK if all initializations are OK. Other value if error. + */ +uint8_t BSP_TS_Get_GestureId(TS_StateTypeDef *TS_State) +{ + uint32_t gestureId = 0; + uint8_t ts_status = TS_OK; + + /* Get gesture Id */ + ft6x06_TS_GetGestureID(I2C_Address, &gestureId); + + /* Remap gesture Id to a TS_GestureIdTypeDef value */ + switch(gestureId) + { + case FT6206_GEST_ID_NO_GESTURE : + TS_State->gestureId = GEST_ID_NO_GESTURE; + break; + case FT6206_GEST_ID_MOVE_UP : + TS_State->gestureId = GEST_ID_MOVE_UP; + break; + case FT6206_GEST_ID_MOVE_RIGHT : + TS_State->gestureId = GEST_ID_MOVE_RIGHT; + break; + case FT6206_GEST_ID_MOVE_DOWN : + TS_State->gestureId = GEST_ID_MOVE_DOWN; + break; + case FT6206_GEST_ID_MOVE_LEFT : + TS_State->gestureId = GEST_ID_MOVE_LEFT; + break; + case FT6206_GEST_ID_ZOOM_IN : + TS_State->gestureId = GEST_ID_ZOOM_IN; + break; + case FT6206_GEST_ID_ZOOM_OUT : + TS_State->gestureId = GEST_ID_ZOOM_OUT; + break; + default : + ts_status = TS_ERROR; + break; + } /* of switch(gestureId) */ + + return(ts_status); +} + + +/** @defgroup STM32469I-Discovery_TS_Private_Functions STM32469I Discovery TS Private Functions + * @{ + */ + + +/** + * @brief Function used to reset all touch data before a new acquisition + * of touch information. + * @param TS_State: Pointer to touch screen current state structure + * @retval TS_OK if OK, TE_ERROR if problem found. + */ +uint8_t BSP_TS_ResetTouchData(TS_StateTypeDef *TS_State) +{ + uint8_t ts_status = TS_ERROR; + uint32_t index; + + if (TS_State != (TS_StateTypeDef *)NULL) + { + TS_State->gestureId = GEST_ID_NO_GESTURE; + TS_State->touchDetected = 0; + + for(index = 0; index < TS_MAX_NB_TOUCH; index++) + { + TS_State->touchX[index] = 0; + TS_State->touchY[index] = 0; + TS_State->touchArea[index] = 0; + TS_State->touchEventId[index] = TOUCH_EVENT_NO_EVT; + TS_State->touchWeight[index] = 0; + } + + ts_status = TS_OK; + + } /* of if (TS_State != (TS_StateTypeDef *)NULL) */ + + return (ts_status); +} +#endif /* TS_MULTI_TOUCH_SUPPORTED == 1 */ +/** + * @brief Initializes the TS_INT pin MSP. + */ +__weak void BSP_TS_INT_MspInit(void) +{ + GPIO_InitTypeDef gpio_init_structure; + + TS_INT_GPIO_CLK_ENABLE(); + + /* GPIO configuration in input for TouchScreen interrupt signal on TS_INT pin */ + gpio_init_structure.Pin = TS_INT_PIN; + + gpio_init_structure.Mode = GPIO_MODE_INPUT; + gpio_init_structure.Pull = GPIO_PULLUP; + gpio_init_structure.Speed = GPIO_SPEED_HIGH; + HAL_GPIO_Init(TS_INT_GPIO_PORT, &gpio_init_structure); +} + + +/** + * @} + */ + +/** + * @} + */ + +/** + * @} + */ + +/** + * @} + */ + +/** + * @} + */ + +/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Drivers/BSP/STM32469I-Discovery/stm32469i_discovery_ts.h Tue May 16 10:50:26 2017 +0200 @@ -0,0 +1,213 @@ +/** + ****************************************************************************** + * @file stm32469i_discovery_ts.h + * @author MCD Application Team + * @version V2.0.0 + * @date 27-January-2017 + * @brief This file contains the common defines and functions prototypes for + * the stm32469i_discovery_ts.c driver. + ****************************************************************************** + * @attention + * + * <h2><center>© COPYRIGHT(c) 2017 STMicroelectronics</center></h2> + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * 3. Neither the name of STMicroelectronics nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + ****************************************************************************** + */ + +/* Define to prevent recursive inclusion -------------------------------------*/ +#ifndef __STM32469I_DISCOVERY_TS_H +#define __STM32469I_DISCOVERY_TS_H + +#ifdef __cplusplus + extern "C" { +#endif + +/* Includes ------------------------------------------------------------------*/ +#include "stm32469i_discovery.h" +#include "stm32469i_discovery_lcd.h" + +/* Include TouchScreen component driver */ +#include "../Components/ft6x06/ft6x06.h" + +/** @addtogroup BSP + * @{ + */ + +/** @addtogroup STM32469I_Discovery + * @{ + */ + +/** @addtogroup STM32469I-Discovery_TS + * @{ + */ + + /** @defgroup STM32469I-Discovery_TS_Exported_Constants STM32469I Discovery TS Exported Constants + * @{ + */ +/** @brief With FT6206 : maximum 2 touches detected simultaneously + */ +#define TS_MAX_NB_TOUCH ((uint32_t) FT6206_MAX_DETECTABLE_TOUCH) +#define TS_NO_IRQ_PENDING ((uint8_t) 0) +#define TS_IRQ_PENDING ((uint8_t) 1) + +#define TS_SWAP_NONE ((uint8_t) 0x01) +#define TS_SWAP_X ((uint8_t) 0x02) +#define TS_SWAP_Y ((uint8_t) 0x04) +#define TS_SWAP_XY ((uint8_t) 0x08) + + /** + * @} + */ + +/** @defgroup STM32469I-Discovery_TS_Exported_Types STM32469I Discovery TS Exported Types + * @{ + */ +/** +* @brief TS_StateTypeDef +* Define TS State structure +*/ +typedef struct +{ + uint8_t touchDetected; /*!< Total number of active touches detected at last scan */ + uint16_t touchX[TS_MAX_NB_TOUCH]; /*!< Touch X[0], X[1] coordinates on 12 bits */ + uint16_t touchY[TS_MAX_NB_TOUCH]; /*!< Touch Y[0], Y[1] coordinates on 12 bits */ + +#if (TS_MULTI_TOUCH_SUPPORTED == 1) + uint8_t touchWeight[TS_MAX_NB_TOUCH]; /*!< Touch_Weight[0], Touch_Weight[1] : weight property of touches */ + uint8_t touchEventId[TS_MAX_NB_TOUCH]; /*!< Touch_EventId[0], Touch_EventId[1] : take value of type @ref TS_TouchEventTypeDef */ + uint8_t touchArea[TS_MAX_NB_TOUCH]; /*!< Touch_Area[0], Touch_Area[1] : touch area of each touch */ + uint32_t gestureId; /*!< type of gesture detected : take value of type @ref TS_GestureIdTypeDef */ +#endif /* TS_MULTI_TOUCH_SUPPORTED == 1 */ + +} TS_StateTypeDef; + +/** + * @brief TS_StatusTypeDef + * Define BSP_TS_xxx() functions possible return value, + * when status is returned by those functions. + */ +typedef enum +{ + TS_OK = 0x00, /*!< Touch Ok */ + TS_ERROR = 0x01, /*!< Touch Error */ + TS_TIMEOUT = 0x02, /*!< Touch Timeout */ + TS_DEVICE_NOT_FOUND = 0x03 /*!< Touchscreen device not found */ +} TS_StatusTypeDef; + +/** + * @brief TS_GestureIdTypeDef + * Define Possible managed gesture identification values returned by touch screen + * driver. + */ +typedef enum +{ + GEST_ID_NO_GESTURE = 0x00, /*!< Gesture not defined / recognized */ + GEST_ID_MOVE_UP = 0x01, /*!< Gesture Move Up */ + GEST_ID_MOVE_RIGHT = 0x02, /*!< Gesture Move Right */ + GEST_ID_MOVE_DOWN = 0x03, /*!< Gesture Move Down */ + GEST_ID_MOVE_LEFT = 0x04, /*!< Gesture Move Left */ + GEST_ID_ZOOM_IN = 0x05, /*!< Gesture Zoom In */ + GEST_ID_ZOOM_OUT = 0x06, /*!< Gesture Zoom Out */ + GEST_ID_NB_MAX = 0x07 /*!< max number of gesture id */ +} TS_GestureIdTypeDef; + +/** + * @brief TS_TouchEventTypeDef + * Define Possible touch events kind as returned values + * by touch screen IC Driver. + */ +typedef enum +{ + TOUCH_EVENT_NO_EVT = 0x00, /*!< Touch Event : undetermined */ + TOUCH_EVENT_PRESS_DOWN = 0x01, /*!< Touch Event Press Down */ + TOUCH_EVENT_LIFT_UP = 0x02, /*!< Touch Event Lift Up */ + TOUCH_EVENT_CONTACT = 0x03, /*!< Touch Event Contact */ + TOUCH_EVENT_NB_MAX = 0x04 /*!< max number of touch events kind */ +} TS_TouchEventTypeDef; + +/** + * @} + */ + +/** @defgroup STM32469I-Discovery_TS_Imported_Variables STM32469I Discovery TS Imported Variables + * @{ + */ +/** + * @brief Table for touchscreen event information display on LCD : + * table indexed on enum @ref TS_TouchEventTypeDef information + */ +extern char * ts_event_string_tab[TOUCH_EVENT_NB_MAX]; + +/** + * @brief Table for touchscreen gesture Id information display on LCD : table indexed + * on enum @ref TS_GestureIdTypeDef information + */ +extern char * ts_gesture_id_string_tab[GEST_ID_NB_MAX]; +/** + * @} + */ + +/** @defgroup STM32469I-Discovery_TS_Exported_Functions STM32469I Discovery TS Exported Functions + * @{ + */ +uint8_t BSP_TS_Init(uint16_t ts_SizeX, uint16_t ts_SizeY); +uint8_t BSP_TS_GetState(TS_StateTypeDef *TS_State); + +#if (TS_MULTI_TOUCH_SUPPORTED == 1) +uint8_t BSP_TS_Get_GestureId(TS_StateTypeDef *TS_State); +uint8_t BSP_TS_ResetTouchData(TS_StateTypeDef *TS_State); +#endif /* TS_MULTI_TOUCH_SUPPORTED == 1 */ + +uint8_t BSP_TS_ITConfig(void); + + +/* These __weak function can be surcharged by application code in case the current settings + need to be changed for specific (example GPIO allocation) */ +void BSP_TS_INT_MspInit(void); + +/** + * @} + */ + +/** + * @} + */ + +/** + * @} + */ + +/** + * @} + */ + + +#ifdef __cplusplus +} +#endif + +#endif /* __STM32469I_DISCOVERY_TS_H */ + +/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
--- a/Fonts/font12.c Mon May 30 11:09:05 2016 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1464 +0,0 @@ -/** - ****************************************************************************** - * @file Font12.c - * @author MCD Application Team - * @version V1.0.0 - * @date 18-February-2014 - * @brief This file provides text Font12 for STM32xx-EVAL's LCD driver. - ****************************************************************************** - * @attention - * - * <h2><center>© COPYRIGHT(c) 2014 STMicroelectronics</center></h2> - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. Neither the name of STMicroelectronics nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - ****************************************************************************** - */ - -/* Includes ------------------------------------------------------------------*/ -#include "fonts.h" - -/** @addtogroup Utilities - * @{ - */ - -/** @addtogroup STM32_EVAL - * @{ - */ - -/** @addtogroup Common - * @{ - */ - -/** @addtogroup FONTS - * @brief This file provides text Font12 for STM32xx-EVAL's LCD driver. - * @{ - */ - -/** @defgroup FONTS_Private_Types - * @{ - */ -/** - * @} - */ - - -/** @defgroup FONTS_Private_Defines - * @{ - */ -/** - * @} - */ - - -/** @defgroup FONTS_Private_Macros - * @{ - */ -/** - * @} - */ - - -/** @defgroup FONTS_Private_Variables - * @{ - */ -// -// Font data for Courier New 12pt -// - -const uint8_t Font12_Table[] = -{ - // @0 ' ' (7 pixels wide) - 0x00, // - 0x00, // - 0x00, // - 0x00, // - 0x00, // - 0x00, // - 0x00, // - 0x00, // - 0x00, // - 0x00, // - 0x00, // - 0x00, // - - // @12 '!' (7 pixels wide) - 0x00, // - 0x10, // # - 0x10, // # - 0x10, // # - 0x10, // # - 0x10, // # - 0x00, // - 0x00, // - 0x10, // # - 0x00, // - 0x00, // - 0x00, // - - // @24 '"' (7 pixels wide) - 0x00, // - 0x6C, // ## ## - 0x48, // # # - 0x48, // # # - 0x00, // - 0x00, // - 0x00, // - 0x00, // - 0x00, // - 0x00, // - 0x00, // - 0x00, // - - // @36 '#' (7 pixels wide) - 0x00, // - 0x14, // # # - 0x14, // # # - 0x28, // # # - 0x7C, // ##### - 0x28, // # # - 0x7C, // ##### - 0x28, // # # - 0x50, // # # - 0x50, // # # - 0x00, // - 0x00, // - - // @48 '$' (7 pixels wide) - 0x00, // - 0x10, // # - 0x38, // ### - 0x40, // # - 0x40, // # - 0x38, // ### - 0x48, // # # - 0x70, // ### - 0x10, // # - 0x10, // # - 0x00, // - 0x00, // - - // @60 '%' (7 pixels wide) - 0x00, // - 0x20, // # - 0x50, // # # - 0x20, // # - 0x0C, // ## - 0x70, // ### - 0x08, // # - 0x14, // # # - 0x08, // # - 0x00, // - 0x00, // - 0x00, // - - // @72 '&' (7 pixels wide) - 0x00, // - 0x00, // - 0x00, // - 0x18, // ## - 0x20, // # - 0x20, // # - 0x54, // # # # - 0x48, // # # - 0x34, // ## # - 0x00, // - 0x00, // - 0x00, // - - // @84 ''' (7 pixels wide) - 0x00, // - 0x10, // # - 0x10, // # - 0x10, // # - 0x10, // # - 0x00, // - 0x00, // - 0x00, // - 0x00, // - 0x00, // - 0x00, // - 0x00, // - - // @96 '(' (7 pixels wide) - 0x00, // - 0x08, // # - 0x08, // # - 0x10, // # - 0x10, // # - 0x10, // # - 0x10, // # - 0x10, // # - 0x10, // # - 0x08, // # - 0x08, // # - 0x00, // - - // @108 ')' (7 pixels wide) - 0x00, // - 0x20, // # - 0x20, // # - 0x10, // # - 0x10, // # - 0x10, // # - 0x10, // # - 0x10, // # - 0x10, // # - 0x20, // # - 0x20, // # - 0x00, // - - // @120 '*' (7 pixels wide) - 0x00, // - 0x10, // # - 0x7C, // ##### - 0x10, // # - 0x28, // # # - 0x28, // # # - 0x00, // - 0x00, // - 0x00, // - 0x00, // - 0x00, // - 0x00, // - - // @132 '+' (7 pixels wide) - 0x00, // - 0x00, // - 0x10, // # - 0x10, // # - 0x10, // # - 0xFE, // ####### - 0x10, // # - 0x10, // # - 0x10, // # - 0x00, // - 0x00, // - 0x00, // - - // @144 ',' (7 pixels wide) - 0x00, // - 0x00, // - 0x00, // - 0x00, // - 0x00, // - 0x00, // - 0x00, // - 0x18, // ## - 0x10, // # - 0x30, // ## - 0x20, // # - 0x00, // - - // @156 '-' (7 pixels wide) - 0x00, // - 0x00, // - 0x00, // - 0x00, // - 0x00, // - 0x7C, // ##### - 0x00, // - 0x00, // - 0x00, // - 0x00, // - 0x00, // - 0x00, // - - // @168 '.' (7 pixels wide) - 0x00, // - 0x00, // - 0x00, // - 0x00, // - 0x00, // - 0x00, // - 0x00, // - 0x30, // ## - 0x30, // ## - 0x00, // - 0x00, // - 0x00, // - - // @180 '/' (7 pixels wide) - 0x00, // - 0x04, // # - 0x04, // # - 0x08, // # - 0x08, // # - 0x10, // # - 0x10, // # - 0x20, // # - 0x20, // # - 0x40, // # - 0x00, // - 0x00, // - - // @192 '0' (7 pixels wide) - 0x00, // - 0x38, // ### - 0x44, // # # - 0x44, // # # - 0x44, // # # - 0x44, // # # - 0x44, // # # - 0x44, // # # - 0x38, // ### - 0x00, // - 0x00, // - 0x00, // - - // @204 '1' (7 pixels wide) - 0x00, // - 0x30, // ## - 0x10, // # - 0x10, // # - 0x10, // # - 0x10, // # - 0x10, // # - 0x10, // # - 0x7C, // ##### - 0x00, // - 0x00, // - 0x00, // - - // @216 '2' (7 pixels wide) - 0x00, // - 0x38, // ### - 0x44, // # # - 0x04, // # - 0x08, // # - 0x10, // # - 0x20, // # - 0x44, // # # - 0x7C, // ##### - 0x00, // - 0x00, // - 0x00, // - - // @228 '3' (7 pixels wide) - 0x00, // - 0x38, // ### - 0x44, // # # - 0x04, // # - 0x18, // ## - 0x04, // # - 0x04, // # - 0x44, // # # - 0x38, // ### - 0x00, // - 0x00, // - 0x00, // - - // @240 '4' (7 pixels wide) - 0x00, // - 0x0C, // ## - 0x14, // # # - 0x14, // # # - 0x24, // # # - 0x44, // # # - 0x7E, // ###### - 0x04, // # - 0x0E, // ### - 0x00, // - 0x00, // - 0x00, // - - // @252 '5' (7 pixels wide) - 0x00, // - 0x3C, // #### - 0x20, // # - 0x20, // # - 0x38, // ### - 0x04, // # - 0x04, // # - 0x44, // # # - 0x38, // ### - 0x00, // - 0x00, // - 0x00, // - - // @264 '6' (7 pixels wide) - 0x00, // - 0x1C, // ### - 0x20, // # - 0x40, // # - 0x78, // #### - 0x44, // # # - 0x44, // # # - 0x44, // # # - 0x38, // ### - 0x00, // - 0x00, // - 0x00, // - - // @276 '7' (7 pixels wide) - 0x00, // - 0x7C, // ##### - 0x44, // # # - 0x04, // # - 0x08, // # - 0x08, // # - 0x08, // # - 0x10, // # - 0x10, // # - 0x00, // - 0x00, // - 0x00, // - - // @288 '8' (7 pixels wide) - 0x00, // - 0x38, // ### - 0x44, // # # - 0x44, // # # - 0x38, // ### - 0x44, // # # - 0x44, // # # - 0x44, // # # - 0x38, // ### - 0x00, // - 0x00, // - 0x00, // - - // @300 '9' (7 pixels wide) - 0x00, // - 0x38, // ### - 0x44, // # # - 0x44, // # # - 0x44, // # # - 0x3C, // #### - 0x04, // # - 0x08, // # - 0x70, // ### - 0x00, // - 0x00, // - 0x00, // - - // @312 ':' (7 pixels wide) - 0x00, // - 0x00, // - 0x00, // - 0x30, // ## - 0x30, // ## - 0x00, // - 0x00, // - 0x30, // ## - 0x30, // ## - 0x00, // - 0x00, // - 0x00, // - - // @324 ';' (7 pixels wide) - 0x00, // - 0x00, // - 0x00, // - 0x18, // ## - 0x18, // ## - 0x00, // - 0x00, // - 0x18, // ## - 0x30, // ## - 0x20, // # - 0x00, // - 0x00, // - - // @336 '<' (7 pixels wide) - 0x00, // - 0x00, // - 0x0C, // ## - 0x10, // # - 0x60, // ## - 0x80, // # - 0x60, // ## - 0x10, // # - 0x0C, // ## - 0x00, // - 0x00, // - 0x00, // - - // @348 '=' (7 pixels wide) - 0x00, // - 0x00, // - 0x00, // - 0x00, // - 0x7C, // ##### - 0x00, // - 0x7C, // ##### - 0x00, // - 0x00, // - 0x00, // - 0x00, // - 0x00, // - - // @360 '>' (7 pixels wide) - 0x00, // - 0x00, // - 0xC0, // ## - 0x20, // # - 0x18, // ## - 0x04, // # - 0x18, // ## - 0x20, // # - 0xC0, // ## - 0x00, // - 0x00, // - 0x00, // - - // @372 '?' (7 pixels wide) - 0x00, // - 0x00, // - 0x18, // ## - 0x24, // # # - 0x04, // # - 0x08, // # - 0x10, // # - 0x00, // - 0x30, // ## - 0x00, // - 0x00, // - 0x00, // - - // @384 '@' (7 pixels wide) - 0x38, // ### - 0x44, // # # - 0x44, // # # - 0x4C, // # ## - 0x54, // # # # - 0x54, // # # # - 0x4C, // # ## - 0x40, // # - 0x44, // # # - 0x38, // ### - 0x00, // - 0x00, // - - // @396 'A' (7 pixels wide) - 0x00, // - 0x30, // ## - 0x10, // # - 0x28, // # # - 0x28, // # # - 0x28, // # # - 0x7C, // ##### - 0x44, // # # - 0xEE, // ### ### - 0x00, // - 0x00, // - 0x00, // - - // @408 'B' (7 pixels wide) - 0x00, // - 0xF8, // ##### - 0x44, // # # - 0x44, // # # - 0x78, // #### - 0x44, // # # - 0x44, // # # - 0x44, // # # - 0xF8, // ##### - 0x00, // - 0x00, // - 0x00, // - - // @420 'C' (7 pixels wide) - 0x00, // - 0x3C, // #### - 0x44, // # # - 0x40, // # - 0x40, // # - 0x40, // # - 0x40, // # - 0x44, // # # - 0x38, // ### - 0x00, // - 0x00, // - 0x00, // - - // @432 'D' (7 pixels wide) - 0x00, // - 0xF0, // #### - 0x48, // # # - 0x44, // # # - 0x44, // # # - 0x44, // # # - 0x44, // # # - 0x48, // # # - 0xF0, // #### - 0x00, // - 0x00, // - 0x00, // - - // @444 'E' (7 pixels wide) - 0x00, // - 0xFC, // ###### - 0x44, // # # - 0x50, // # # - 0x70, // ### - 0x50, // # # - 0x40, // # - 0x44, // # # - 0xFC, // ###### - 0x00, // - 0x00, // - 0x00, // - - // @456 'F' (7 pixels wide) - 0x00, // - 0x7E, // ###### - 0x22, // # # - 0x28, // # # - 0x38, // ### - 0x28, // # # - 0x20, // # - 0x20, // # - 0x70, // ### - 0x00, // - 0x00, // - 0x00, // - - // @468 'G' (7 pixels wide) - 0x00, // - 0x3C, // #### - 0x44, // # # - 0x40, // # - 0x40, // # - 0x4E, // # ### - 0x44, // # # - 0x44, // # # - 0x38, // ### - 0x00, // - 0x00, // - 0x00, // - - // @480 'H' (7 pixels wide) - 0x00, // - 0xEE, // ### ### - 0x44, // # # - 0x44, // # # - 0x7C, // ##### - 0x44, // # # - 0x44, // # # - 0x44, // # # - 0xEE, // ### ### - 0x00, // - 0x00, // - 0x00, // - - // @492 'I' (7 pixels wide) - 0x00, // - 0x7C, // ##### - 0x10, // # - 0x10, // # - 0x10, // # - 0x10, // # - 0x10, // # - 0x10, // # - 0x7C, // ##### - 0x00, // - 0x00, // - 0x00, // - - // @504 'J' (7 pixels wide) - 0x00, // - 0x3C, // #### - 0x08, // # - 0x08, // # - 0x08, // # - 0x48, // # # - 0x48, // # # - 0x48, // # # - 0x30, // ## - 0x00, // - 0x00, // - 0x00, // - - // @516 'K' (7 pixels wide) - 0x00, // - 0xEE, // ### ### - 0x44, // # # - 0x48, // # # - 0x50, // # # - 0x70, // ### - 0x48, // # # - 0x44, // # # - 0xE6, // ### ## - 0x00, // - 0x00, // - 0x00, // - - // @528 'L' (7 pixels wide) - 0x00, // - 0x70, // ### - 0x20, // # - 0x20, // # - 0x20, // # - 0x20, // # - 0x24, // # # - 0x24, // # # - 0x7C, // ##### - 0x00, // - 0x00, // - 0x00, // - - // @540 'M' (7 pixels wide) - 0x00, // - 0xEE, // ### ### - 0x6C, // ## ## - 0x6C, // ## ## - 0x54, // # # # - 0x54, // # # # - 0x44, // # # - 0x44, // # # - 0xEE, // ### ### - 0x00, // - 0x00, // - 0x00, // - - // @552 'N' (7 pixels wide) - 0x00, // - 0xEE, // ### ### - 0x64, // ## # - 0x64, // ## # - 0x54, // # # # - 0x54, // # # # - 0x54, // # # # - 0x4C, // # ## - 0xEC, // ### ## - 0x00, // - 0x00, // - 0x00, // - - // @564 'O' (7 pixels wide) - 0x00, // - 0x38, // ### - 0x44, // # # - 0x44, // # # - 0x44, // # # - 0x44, // # # - 0x44, // # # - 0x44, // # # - 0x38, // ### - 0x00, // - 0x00, // - 0x00, // - - // @576 'P' (7 pixels wide) - 0x00, // - 0x78, // #### - 0x24, // # # - 0x24, // # # - 0x24, // # # - 0x38, // ### - 0x20, // # - 0x20, // # - 0x70, // ### - 0x00, // - 0x00, // - 0x00, // - - // @588 'Q' (7 pixels wide) - 0x00, // - 0x38, // ### - 0x44, // # # - 0x44, // # # - 0x44, // # # - 0x44, // # # - 0x44, // # # - 0x44, // # # - 0x38, // ### - 0x1C, // ### - 0x00, // - 0x00, // - - // @600 'R' (7 pixels wide) - 0x00, // - 0xF8, // ##### - 0x44, // # # - 0x44, // # # - 0x44, // # # - 0x78, // #### - 0x48, // # # - 0x44, // # # - 0xE2, // ### # - 0x00, // - 0x00, // - 0x00, // - - // @612 'S' (7 pixels wide) - 0x00, // - 0x34, // ## # - 0x4C, // # ## - 0x40, // # - 0x38, // ### - 0x04, // # - 0x04, // # - 0x64, // ## # - 0x58, // # ## - 0x00, // - 0x00, // - 0x00, // - - // @624 'T' (7 pixels wide) - 0x00, // - 0xFE, // ####### - 0x92, // # # # - 0x10, // # - 0x10, // # - 0x10, // # - 0x10, // # - 0x10, // # - 0x38, // ### - 0x00, // - 0x00, // - 0x00, // - - // @636 'U' (7 pixels wide) - 0x00, // - 0xEE, // ### ### - 0x44, // # # - 0x44, // # # - 0x44, // # # - 0x44, // # # - 0x44, // # # - 0x44, // # # - 0x38, // ### - 0x00, // - 0x00, // - 0x00, // - - // @648 'V' (7 pixels wide) - 0x00, // - 0xEE, // ### ### - 0x44, // # # - 0x44, // # # - 0x28, // # # - 0x28, // # # - 0x28, // # # - 0x10, // # - 0x10, // # - 0x00, // - 0x00, // - 0x00, // - - // @660 'W' (7 pixels wide) - 0x00, // - 0xEE, // ### ### - 0x44, // # # - 0x44, // # # - 0x54, // # # # - 0x54, // # # # - 0x54, // # # # - 0x54, // # # # - 0x28, // # # - 0x00, // - 0x00, // - 0x00, // - - // @672 'X' (7 pixels wide) - 0x00, // - 0xC6, // ## ## - 0x44, // # # - 0x28, // # # - 0x10, // # - 0x10, // # - 0x28, // # # - 0x44, // # # - 0xC6, // ## ## - 0x00, // - 0x00, // - 0x00, // - - // @684 'Y' (7 pixels wide) - 0x00, // - 0xEE, // ### ### - 0x44, // # # - 0x28, // # # - 0x28, // # # - 0x10, // # - 0x10, // # - 0x10, // # - 0x38, // ### - 0x00, // - 0x00, // - 0x00, // - - // @696 'Z' (7 pixels wide) - 0x00, // - 0x7C, // ##### - 0x44, // # # - 0x08, // # - 0x10, // # - 0x10, // # - 0x20, // # - 0x44, // # # - 0x7C, // ##### - 0x00, // - 0x00, // - 0x00, // - - // @708 '[' (7 pixels wide) - 0x00, // - 0x38, // ### - 0x20, // # - 0x20, // # - 0x20, // # - 0x20, // # - 0x20, // # - 0x20, // # - 0x20, // # - 0x20, // # - 0x38, // ### - 0x00, // - - // @720 '\' (7 pixels wide) - 0x00, // - 0x40, // # - 0x20, // # - 0x20, // # - 0x20, // # - 0x10, // # - 0x10, // # - 0x08, // # - 0x08, // # - 0x08, // # - 0x00, // - 0x00, // - - // @732 ']' (7 pixels wide) - 0x00, // - 0x38, // ### - 0x08, // # - 0x08, // # - 0x08, // # - 0x08, // # - 0x08, // # - 0x08, // # - 0x08, // # - 0x08, // # - 0x38, // ### - 0x00, // - - // @744 '^' (7 pixels wide) - 0x00, // - 0x10, // # - 0x10, // # - 0x28, // # # - 0x44, // # # - 0x00, // - 0x00, // - 0x00, // - 0x00, // - 0x00, // - 0x00, // - 0x00, // - - // @756 '_' (7 pixels wide) - 0x00, // - 0x00, // - 0x00, // - 0x00, // - 0x00, // - 0x00, // - 0x00, // - 0x00, // - 0x00, // - 0x00, // - 0x00, // - 0xFE, // ####### - - // @768 '`' (7 pixels wide) - 0x00, // - 0x10, // # - 0x08, // # - 0x00, // - 0x00, // - 0x00, // - 0x00, // - 0x00, // - 0x00, // - 0x00, // - 0x00, // - 0x00, // - - // @780 'a' (7 pixels wide) - 0x00, // - 0x00, // - 0x00, // - 0x38, // ### - 0x44, // # # - 0x3C, // #### - 0x44, // # # - 0x44, // # # - 0x3E, // ##### - 0x00, // - 0x00, // - 0x00, // - - // @792 'b' (7 pixels wide) - 0x00, // - 0xC0, // ## - 0x40, // # - 0x58, // # ## - 0x64, // ## # - 0x44, // # # - 0x44, // # # - 0x44, // # # - 0xF8, // ##### - 0x00, // - 0x00, // - 0x00, // - - // @804 'c' (7 pixels wide) - 0x00, // - 0x00, // - 0x00, // - 0x3C, // #### - 0x44, // # # - 0x40, // # - 0x40, // # - 0x44, // # # - 0x38, // ### - 0x00, // - 0x00, // - 0x00, // - - // @816 'd' (7 pixels wide) - 0x00, // - 0x0C, // ## - 0x04, // # - 0x34, // ## # - 0x4C, // # ## - 0x44, // # # - 0x44, // # # - 0x44, // # # - 0x3E, // ##### - 0x00, // - 0x00, // - 0x00, // - - // @828 'e' (7 pixels wide) - 0x00, // - 0x00, // - 0x00, // - 0x38, // ### - 0x44, // # # - 0x7C, // ##### - 0x40, // # - 0x40, // # - 0x3C, // #### - 0x00, // - 0x00, // - 0x00, // - - // @840 'f' (7 pixels wide) - 0x00, // - 0x1C, // ### - 0x20, // # - 0x7C, // ##### - 0x20, // # - 0x20, // # - 0x20, // # - 0x20, // # - 0x7C, // ##### - 0x00, // - 0x00, // - 0x00, // - - // @852 'g' (7 pixels wide) - 0x00, // - 0x00, // - 0x00, // - 0x36, // ## ## - 0x4C, // # ## - 0x44, // # # - 0x44, // # # - 0x44, // # # - 0x3C, // #### - 0x04, // # - 0x38, // ### - 0x00, // - - // @864 'h' (7 pixels wide) - 0x00, // - 0xC0, // ## - 0x40, // # - 0x58, // # ## - 0x64, // ## # - 0x44, // # # - 0x44, // # # - 0x44, // # # - 0xEE, // ### ### - 0x00, // - 0x00, // - 0x00, // - - // @876 'i' (7 pixels wide) - 0x00, // - 0x10, // # - 0x00, // - 0x70, // ### - 0x10, // # - 0x10, // # - 0x10, // # - 0x10, // # - 0x7C, // ##### - 0x00, // - 0x00, // - 0x00, // - - // @888 'j' (7 pixels wide) - 0x00, // - 0x10, // # - 0x00, // - 0x78, // #### - 0x08, // # - 0x08, // # - 0x08, // # - 0x08, // # - 0x08, // # - 0x08, // # - 0x70, // ### - 0x00, // - - // @900 'k' (7 pixels wide) - 0x00, // - 0xC0, // ## - 0x40, // # - 0x5C, // # ### - 0x48, // # # - 0x70, // ### - 0x50, // # # - 0x48, // # # - 0xDC, // ## ### - 0x00, // - 0x00, // - 0x00, // - - // @912 'l' (7 pixels wide) - 0x00, // - 0x30, // ## - 0x10, // # - 0x10, // # - 0x10, // # - 0x10, // # - 0x10, // # - 0x10, // # - 0x7C, // ##### - 0x00, // - 0x00, // - 0x00, // - - // @924 'm' (7 pixels wide) - 0x00, // - 0x00, // - 0x00, // - 0xE8, // ### # - 0x54, // # # # - 0x54, // # # # - 0x54, // # # # - 0x54, // # # # - 0xFE, // ####### - 0x00, // - 0x00, // - 0x00, // - - // @936 'n' (7 pixels wide) - 0x00, // - 0x00, // - 0x00, // - 0xD8, // ## ## - 0x64, // ## # - 0x44, // # # - 0x44, // # # - 0x44, // # # - 0xEE, // ### ### - 0x00, // - 0x00, // - 0x00, // - - // @948 'o' (7 pixels wide) - 0x00, // - 0x00, // - 0x00, // - 0x38, // ### - 0x44, // # # - 0x44, // # # - 0x44, // # # - 0x44, // # # - 0x38, // ### - 0x00, // - 0x00, // - 0x00, // - - // @960 'p' (7 pixels wide) - 0x00, // - 0x00, // - 0x00, // - 0xD8, // ## ## - 0x64, // ## # - 0x44, // # # - 0x44, // # # - 0x44, // # # - 0x78, // #### - 0x40, // # - 0xE0, // ### - 0x00, // - - // @972 'q' (7 pixels wide) - 0x00, // - 0x00, // - 0x00, // - 0x36, // ## ## - 0x4C, // # ## - 0x44, // # # - 0x44, // # # - 0x44, // # # - 0x3C, // #### - 0x04, // # - 0x0E, // ### - 0x00, // - - // @984 'r' (7 pixels wide) - 0x00, // - 0x00, // - 0x00, // - 0x6C, // ## ## - 0x30, // ## - 0x20, // # - 0x20, // # - 0x20, // # - 0x7C, // ##### - 0x00, // - 0x00, // - 0x00, // - - // @996 's' (7 pixels wide) - 0x00, // - 0x00, // - 0x00, // - 0x3C, // #### - 0x44, // # # - 0x38, // ### - 0x04, // # - 0x44, // # # - 0x78, // #### - 0x00, // - 0x00, // - 0x00, // - - // @1008 't' (7 pixels wide) - 0x00, // - 0x00, // - 0x20, // # - 0x7C, // ##### - 0x20, // # - 0x20, // # - 0x20, // # - 0x22, // # # - 0x1C, // ### - 0x00, // - 0x00, // - 0x00, // - - // @1020 'u' (7 pixels wide) - 0x00, // - 0x00, // - 0x00, // - 0xCC, // ## ## - 0x44, // # # - 0x44, // # # - 0x44, // # # - 0x4C, // # ## - 0x36, // ## ## - 0x00, // - 0x00, // - 0x00, // - - // @1032 'v' (7 pixels wide) - 0x00, // - 0x00, // - 0x00, // - 0xEE, // ### ### - 0x44, // # # - 0x44, // # # - 0x28, // # # - 0x28, // # # - 0x10, // # - 0x00, // - 0x00, // - 0x00, // - - // @1044 'w' (7 pixels wide) - 0x00, // - 0x00, // - 0x00, // - 0xEE, // ### ### - 0x44, // # # - 0x54, // # # # - 0x54, // # # # - 0x54, // # # # - 0x28, // # # - 0x00, // - 0x00, // - 0x00, // - - // @1056 'x' (7 pixels wide) - 0x00, // - 0x00, // - 0x00, // - 0xCC, // ## ## - 0x48, // # # - 0x30, // ## - 0x30, // ## - 0x48, // # # - 0xCC, // ## ## - 0x00, // - 0x00, // - 0x00, // - - // @1068 'y' (7 pixels wide) - 0x00, // - 0x00, // - 0x00, // - 0xEE, // ### ### - 0x44, // # # - 0x24, // # # - 0x28, // # # - 0x18, // ## - 0x10, // # - 0x10, // # - 0x78, // #### - 0x00, // - - // @1080 'z' (7 pixels wide) - 0x00, // - 0x00, // - 0x00, // - 0x7C, // ##### - 0x48, // # # - 0x10, // # - 0x20, // # - 0x44, // # # - 0x7C, // ##### - 0x00, // - 0x00, // - 0x00, // - - // @1092 '{' (7 pixels wide) - 0x00, // - 0x08, // # - 0x10, // # - 0x10, // # - 0x10, // # - 0x10, // # - 0x20, // # - 0x10, // # - 0x10, // # - 0x10, // # - 0x08, // # - 0x00, // - - // @1104 '|' (7 pixels wide) - 0x00, // - 0x10, // # - 0x10, // # - 0x10, // # - 0x10, // # - 0x10, // # - 0x10, // # - 0x10, // # - 0x10, // # - 0x10, // # - 0x00, // - 0x00, // - - // @1116 '}' (7 pixels wide) - 0x00, // - 0x20, // # - 0x10, // # - 0x10, // # - 0x10, // # - 0x10, // # - 0x08, // # - 0x10, // # - 0x10, // # - 0x10, // # - 0x20, // # - 0x00, // - - // @1128 '~' (7 pixels wide) - 0x00, // - 0x00, // - 0x00, // - 0x00, // - 0x00, // - 0x24, // # # - 0x58, // # ## - 0x00, // - 0x00, // - 0x00, // - 0x00, // - 0x00, // -}; - -sFONT Font12 = { - Font12_Table, - 7, /* Width */ - 12, /* Height */ -}; - -/** - * @} - */ - - -/** @defgroup FONTS_Private_Function_Prototypes - * @{ - */ -/** - * @} - */ - - -/** @defgroup FONTS_Private_Functions - * @{ - */ - -/** - * @} - */ - -/** - * @} - */ - -/** - * @} - */ - -/** - * @} - */ - -/** - * @} - */ -/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
--- a/Fonts/font16.c Mon May 30 11:09:05 2016 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1844 +0,0 @@ -/** - ****************************************************************************** - * @file font16.c - * @author MCD Application Team - * @version V1.0.0 - * @date 18-February-2014 - * @brief This file provides text font16 for STM32xx-EVAL's LCD driver. - ****************************************************************************** - * @attention - * - * <h2><center>© COPYRIGHT(c) 2014 STMicroelectronics</center></h2> - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. Neither the name of STMicroelectronics nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - ****************************************************************************** - */ - -/* Includes ------------------------------------------------------------------*/ -#include "fonts.h" - -/** @addtogroup Utilities - * @{ - */ - -/** @addtogroup STM32_EVAL - * @{ - */ - -/** @addtogroup Common - * @{ - */ - -/** @addtogroup FONTS - * @brief This file provides text font16 for STM32xx-EVAL's LCD driver. - * @{ - */ - -/** @defgroup FONTS_Private_Types - * @{ - */ -/** - * @} - */ - - -/** @defgroup FONTS_Private_Defines - * @{ - */ -/** - * @} - */ - - -/** @defgroup FONTS_Private_Macros - * @{ - */ -/** - * @} - */ - - -/** @defgroup FONTS_Private_Variables - * @{ - */ -// -// Font data for Courier New 12pt -// - -const uint8_t Font16_Table[] = -{ - // @0 ' ' (11 pixels wide) - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - - // @32 '!' (11 pixels wide) - 0x00, 0x00, // - 0x0C, 0x00, // ## - 0x0C, 0x00, // ## - 0x0C, 0x00, // ## - 0x0C, 0x00, // ## - 0x0C, 0x00, // ## - 0x0C, 0x00, // ## - 0x0C, 0x00, // ## - 0x0C, 0x00, // ## - 0x00, 0x00, // - 0x0C, 0x00, // ## - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - - // @64 '"' (11 pixels wide) - 0x00, 0x00, // - 0x00, 0x00, // - 0x1D, 0xC0, // ### ### - 0x1D, 0xC0, // ### ### - 0x08, 0x80, // # # - 0x08, 0x80, // # # - 0x08, 0x80, // # # - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - - // @96 '#' (11 pixels wide) - 0x00, 0x00, // - 0x0D, 0x80, // ## ## - 0x0D, 0x80, // ## ## - 0x0D, 0x80, // ## ## - 0x0D, 0x80, // ## ## - 0x3F, 0xC0, // ######## - 0x1B, 0x00, // ## ## - 0x3F, 0xC0, // ######## - 0x1B, 0x00, // ## ## - 0x1B, 0x00, // ## ## - 0x1B, 0x00, // ## ## - 0x1B, 0x00, // ## ## - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - - // @128 '$' (11 pixels wide) - 0x04, 0x00, // # - 0x1F, 0x80, // ###### - 0x31, 0x80, // ## ## - 0x31, 0x80, // ## ## - 0x38, 0x00, // ### - 0x1E, 0x00, // #### - 0x0F, 0x00, // #### - 0x03, 0x80, // ### - 0x31, 0x80, // ## ## - 0x31, 0x80, // ## ## - 0x3F, 0x00, // ###### - 0x04, 0x00, // # - 0x04, 0x00, // # - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - - // @160 '%' (11 pixels wide) - 0x00, 0x00, // - 0x18, 0x00, // ## - 0x24, 0x00, // # # - 0x24, 0x00, // # # - 0x18, 0xC0, // ## ## - 0x07, 0x80, // #### - 0x1E, 0x00, // #### - 0x31, 0x80, // ## ## - 0x02, 0x40, // # # - 0x02, 0x40, // # # - 0x01, 0x80, // ## - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - - // @192 '&' (11 pixels wide) - 0x00, 0x00, // - 0x00, 0x00, // - 0x0F, 0x00, // #### - 0x18, 0x00, // ## - 0x18, 0x00, // ## - 0x18, 0x00, // ## - 0x0C, 0x00, // ## - 0x1D, 0x80, // ### ## - 0x37, 0x00, // ## ### - 0x33, 0x00, // ## ## - 0x1D, 0x80, // ### ## - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - - // @224 ''' (11 pixels wide) - 0x00, 0x00, // - 0x00, 0x00, // - 0x07, 0x00, // ### - 0x07, 0x00, // ### - 0x02, 0x00, // # - 0x02, 0x00, // # - 0x02, 0x00, // # - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - - // @256 '(' (11 pixels wide) - 0x00, 0x00, // - 0x03, 0x00, // ## - 0x03, 0x00, // ## - 0x06, 0x00, // ## - 0x0E, 0x00, // ### - 0x0C, 0x00, // ## - 0x0C, 0x00, // ## - 0x0C, 0x00, // ## - 0x0C, 0x00, // ## - 0x0E, 0x00, // ### - 0x06, 0x00, // ## - 0x03, 0x00, // ## - 0x03, 0x00, // ## - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - - // @288 ')' (11 pixels wide) - 0x00, 0x00, // - 0x18, 0x00, // ## - 0x18, 0x00, // ## - 0x0C, 0x00, // ## - 0x06, 0x00, // ## - 0x06, 0x00, // ## - 0x06, 0x00, // ## - 0x06, 0x00, // ## - 0x06, 0x00, // ## - 0x06, 0x00, // ## - 0x0C, 0x00, // ## - 0x1C, 0x00, // ### - 0x18, 0x00, // ## - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - - // @320 '*' (11 pixels wide) - 0x00, 0x00, // - 0x06, 0x00, // ## - 0x06, 0x00, // ## - 0x3F, 0xC0, // ######## - 0x3F, 0xC0, // ######## - 0x0F, 0x00, // #### - 0x1F, 0x80, // ###### - 0x19, 0x80, // ## ## - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - - // @352 '+' (11 pixels wide) - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x04, 0x00, // # - 0x04, 0x00, // # - 0x04, 0x00, // # - 0x3F, 0x80, // ####### - 0x04, 0x00, // # - 0x04, 0x00, // # - 0x04, 0x00, // # - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - - // @384 ',' (11 pixels wide) - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x06, 0x00, // ## - 0x04, 0x00, // # - 0x0C, 0x00, // ## - 0x08, 0x00, // # - 0x08, 0x00, // # - 0x00, 0x00, // - 0x00, 0x00, // - - // @416 '-' (11 pixels wide) - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x3F, 0x80, // ####### - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - - // @448 '.' (11 pixels wide) - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x0C, 0x00, // ## - 0x0C, 0x00, // ## - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - - // @480 '/' (11 pixels wide) - 0x00, 0xC0, // ## - 0x00, 0xC0, // ## - 0x01, 0x80, // ## - 0x01, 0x80, // ## - 0x03, 0x00, // ## - 0x03, 0x00, // ## - 0x06, 0x00, // ## - 0x0C, 0x00, // ## - 0x0C, 0x00, // ## - 0x18, 0x00, // ## - 0x18, 0x00, // ## - 0x30, 0x00, // ## - 0x30, 0x00, // ## - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - - // @512 '0' (11 pixels wide) - 0x00, 0x00, // - 0x0E, 0x00, // ### - 0x1B, 0x00, // ## ## - 0x31, 0x80, // ## ## - 0x31, 0x80, // ## ## - 0x31, 0x80, // ## ## - 0x31, 0x80, // ## ## - 0x31, 0x80, // ## ## - 0x31, 0x80, // ## ## - 0x1B, 0x00, // ## ## - 0x0E, 0x00, // ### - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - - // @544 '1' (11 pixels wide) - 0x00, 0x00, // - 0x06, 0x00, // ## - 0x3E, 0x00, // ##### - 0x06, 0x00, // ## - 0x06, 0x00, // ## - 0x06, 0x00, // ## - 0x06, 0x00, // ## - 0x06, 0x00, // ## - 0x06, 0x00, // ## - 0x06, 0x00, // ## - 0x3F, 0xC0, // ######## - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - - // @576 '2' (11 pixels wide) - 0x00, 0x00, // - 0x0F, 0x00, // #### - 0x19, 0x80, // ## ## - 0x31, 0x80, // ## ## - 0x31, 0x80, // ## ## - 0x03, 0x00, // ## - 0x06, 0x00, // ## - 0x0C, 0x00, // ## - 0x18, 0x00, // ## - 0x30, 0x00, // ## - 0x3F, 0x80, // ####### - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - - // @608 '3' (11 pixels wide) - 0x00, 0x00, // - 0x3F, 0x00, // ###### - 0x61, 0x80, // ## ## - 0x01, 0x80, // ## - 0x03, 0x00, // ## - 0x1F, 0x00, // ##### - 0x03, 0x80, // ### - 0x01, 0x80, // ## - 0x01, 0x80, // ## - 0x61, 0x80, // ## ## - 0x3F, 0x00, // ###### - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - - // @640 '4' (11 pixels wide) - 0x00, 0x00, // - 0x07, 0x00, // ### - 0x07, 0x00, // ### - 0x0F, 0x00, // #### - 0x0B, 0x00, // # ## - 0x1B, 0x00, // ## ## - 0x13, 0x00, // # ## - 0x33, 0x00, // ## ## - 0x3F, 0x80, // ####### - 0x03, 0x00, // ## - 0x0F, 0x80, // ##### - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - - // @672 '5' (11 pixels wide) - 0x00, 0x00, // - 0x1F, 0x80, // ###### - 0x18, 0x00, // ## - 0x18, 0x00, // ## - 0x18, 0x00, // ## - 0x1F, 0x00, // ##### - 0x11, 0x80, // # ## - 0x01, 0x80, // ## - 0x01, 0x80, // ## - 0x21, 0x80, // # ## - 0x1F, 0x00, // ##### - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - - // @704 '6' (11 pixels wide) - 0x00, 0x00, // - 0x07, 0x80, // #### - 0x1C, 0x00, // ### - 0x18, 0x00, // ## - 0x30, 0x00, // ## - 0x37, 0x00, // ## ### - 0x39, 0x80, // ### ## - 0x31, 0x80, // ## ## - 0x31, 0x80, // ## ## - 0x19, 0x80, // ## ## - 0x0F, 0x00, // #### - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - - // @736 '7' (11 pixels wide) - 0x00, 0x00, // - 0x7F, 0x00, // ####### - 0x43, 0x00, // # ## - 0x03, 0x00, // ## - 0x06, 0x00, // ## - 0x06, 0x00, // ## - 0x06, 0x00, // ## - 0x06, 0x00, // ## - 0x0C, 0x00, // ## - 0x0C, 0x00, // ## - 0x0C, 0x00, // ## - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - - // @768 '8' (11 pixels wide) - 0x00, 0x00, // - 0x1F, 0x00, // ##### - 0x31, 0x80, // ## ## - 0x31, 0x80, // ## ## - 0x31, 0x80, // ## ## - 0x1F, 0x00, // ##### - 0x31, 0x80, // ## ## - 0x31, 0x80, // ## ## - 0x31, 0x80, // ## ## - 0x31, 0x80, // ## ## - 0x1F, 0x00, // ##### - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - - // @800 '9' (11 pixels wide) - 0x00, 0x00, // - 0x1E, 0x00, // #### - 0x33, 0x00, // ## ## - 0x31, 0x80, // ## ## - 0x31, 0x80, // ## ## - 0x33, 0x80, // ## ### - 0x1D, 0x80, // ### ## - 0x01, 0x80, // ## - 0x03, 0x00, // ## - 0x07, 0x00, // ### - 0x3C, 0x00, // #### - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - - // @832 ':' (11 pixels wide) - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x0C, 0x00, // ## - 0x0C, 0x00, // ## - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x0C, 0x00, // ## - 0x0C, 0x00, // ## - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - - // @864 ';' (11 pixels wide) - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x03, 0x00, // ## - 0x03, 0x00, // ## - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x06, 0x00, // ## - 0x04, 0x00, // # - 0x08, 0x00, // # - 0x08, 0x00, // # - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - - // @896 '<' (11 pixels wide) - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0xC0, // ## - 0x03, 0x00, // ## - 0x04, 0x00, // # - 0x18, 0x00, // ## - 0x60, 0x00, // ## - 0x18, 0x00, // ## - 0x04, 0x00, // # - 0x03, 0x00, // ## - 0x00, 0xC0, // ## - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - - // @928 '=' (11 pixels wide) - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x7F, 0xC0, // ######### - 0x00, 0x00, // - 0x7F, 0xC0, // ######### - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - - // @960 '>' (11 pixels wide) - 0x00, 0x00, // - 0x00, 0x00, // - 0x60, 0x00, // ## - 0x18, 0x00, // ## - 0x04, 0x00, // # - 0x03, 0x00, // ## - 0x00, 0xC0, // ## - 0x03, 0x00, // ## - 0x04, 0x00, // # - 0x18, 0x00, // ## - 0x60, 0x00, // ## - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - - // @992 '?' (11 pixels wide) - 0x00, 0x00, // - 0x00, 0x00, // - 0x1F, 0x00, // ##### - 0x31, 0x80, // ## ## - 0x31, 0x80, // ## ## - 0x01, 0x80, // ## - 0x07, 0x00, // ### - 0x0C, 0x00, // ## - 0x0C, 0x00, // ## - 0x00, 0x00, // - 0x0C, 0x00, // ## - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - - // @1024 '@' (11 pixels wide) - 0x00, 0x00, // - 0x0E, 0x00, // ### - 0x11, 0x00, // # # - 0x21, 0x00, // # # - 0x21, 0x00, // # # - 0x27, 0x00, // # ### - 0x29, 0x00, // # # # - 0x29, 0x00, // # # # - 0x27, 0x00, // # ### - 0x20, 0x00, // # - 0x11, 0x00, // # # - 0x0E, 0x00, // ### - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - - // @1056 'A' (11 pixels wide) - 0x00, 0x00, // - 0x00, 0x00, // - 0x3F, 0x00, // ###### - 0x0F, 0x00, // #### - 0x09, 0x00, // # # - 0x19, 0x80, // ## ## - 0x19, 0x80, // ## ## - 0x1F, 0x80, // ###### - 0x30, 0xC0, // ## ## - 0x30, 0xC0, // ## ## - 0x79, 0xE0, // #### #### - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - - // @1088 'B' (11 pixels wide) - 0x00, 0x00, // - 0x00, 0x00, // - 0x7F, 0x00, // ####### - 0x31, 0x80, // ## ## - 0x31, 0x80, // ## ## - 0x31, 0x80, // ## ## - 0x3F, 0x00, // ###### - 0x31, 0x80, // ## ## - 0x31, 0x80, // ## ## - 0x31, 0x80, // ## ## - 0x7F, 0x00, // ####### - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - - // @1120 'C' (11 pixels wide) - 0x00, 0x00, // - 0x00, 0x00, // - 0x1F, 0x40, // ##### # - 0x30, 0xC0, // ## ## - 0x60, 0x40, // ## # - 0x60, 0x00, // ## - 0x60, 0x00, // ## - 0x60, 0x00, // ## - 0x60, 0x40, // ## # - 0x30, 0x80, // ## # - 0x1F, 0x00, // ##### - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - - // @1152 'D' (11 pixels wide) - 0x00, 0x00, // - 0x00, 0x00, // - 0x7F, 0x00, // ####### - 0x31, 0x80, // ## ## - 0x30, 0xC0, // ## ## - 0x30, 0xC0, // ## ## - 0x30, 0xC0, // ## ## - 0x30, 0xC0, // ## ## - 0x30, 0xC0, // ## ## - 0x31, 0x80, // ## ## - 0x7F, 0x00, // ####### - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - - // @1184 'E' (11 pixels wide) - 0x00, 0x00, // - 0x00, 0x00, // - 0x7F, 0x80, // ######## - 0x30, 0x80, // ## # - 0x30, 0x80, // ## # - 0x32, 0x00, // ## # - 0x3E, 0x00, // ##### - 0x32, 0x00, // ## # - 0x30, 0x80, // ## # - 0x30, 0x80, // ## # - 0x7F, 0x80, // ######## - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - - // @1216 'F' (11 pixels wide) - 0x00, 0x00, // - 0x00, 0x00, // - 0x7F, 0xC0, // ######### - 0x30, 0x40, // ## # - 0x30, 0x40, // ## # - 0x32, 0x00, // ## # - 0x3E, 0x00, // ##### - 0x32, 0x00, // ## # - 0x30, 0x00, // ## - 0x30, 0x00, // ## - 0x7C, 0x00, // ##### - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - - // @1248 'G' (11 pixels wide) - 0x00, 0x00, // - 0x00, 0x00, // - 0x1E, 0x80, // #### # - 0x31, 0x80, // ## ## - 0x60, 0x80, // ## # - 0x60, 0x00, // ## - 0x60, 0x00, // ## - 0x67, 0xC0, // ## ##### - 0x61, 0x80, // ## ## - 0x31, 0x80, // ## ## - 0x1F, 0x00, // ##### - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - - // @1280 'H' (11 pixels wide) - 0x00, 0x00, // - 0x00, 0x00, // - 0x7B, 0xC0, // #### #### - 0x31, 0x80, // ## ## - 0x31, 0x80, // ## ## - 0x31, 0x80, // ## ## - 0x3F, 0x80, // ####### - 0x31, 0x80, // ## ## - 0x31, 0x80, // ## ## - 0x31, 0x80, // ## ## - 0x7B, 0xC0, // #### #### - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - - // @1312 'I' (11 pixels wide) - 0x00, 0x00, // - 0x00, 0x00, // - 0x3F, 0xC0, // ######## - 0x06, 0x00, // ## - 0x06, 0x00, // ## - 0x06, 0x00, // ## - 0x06, 0x00, // ## - 0x06, 0x00, // ## - 0x06, 0x00, // ## - 0x06, 0x00, // ## - 0x3F, 0xC0, // ######## - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - - // @1344 'J' (11 pixels wide) - 0x00, 0x00, // - 0x00, 0x00, // - 0x1F, 0xC0, // ####### - 0x03, 0x00, // ## - 0x03, 0x00, // ## - 0x03, 0x00, // ## - 0x03, 0x00, // ## - 0x63, 0x00, // ## ## - 0x63, 0x00, // ## ## - 0x63, 0x00, // ## ## - 0x3E, 0x00, // ##### - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - - // @1376 'K' (11 pixels wide) - 0x00, 0x00, // - 0x00, 0x00, // - 0x7B, 0xC0, // #### #### - 0x31, 0x80, // ## ## - 0x33, 0x00, // ## ## - 0x36, 0x00, // ## ## - 0x3C, 0x00, // #### - 0x3E, 0x00, // ##### - 0x33, 0x00, // ## ## - 0x31, 0x80, // ## ## - 0x79, 0xC0, // #### ### - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - - // @1408 'L' (11 pixels wide) - 0x00, 0x00, // - 0x00, 0x00, // - 0x7E, 0x00, // ###### - 0x18, 0x00, // ## - 0x18, 0x00, // ## - 0x18, 0x00, // ## - 0x18, 0x00, // ## - 0x18, 0x40, // ## # - 0x18, 0x40, // ## # - 0x18, 0x40, // ## # - 0x7F, 0xC0, // ######### - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - - // @1440 'M' (11 pixels wide) - 0x00, 0x00, // - 0x00, 0x00, // - 0xE0, 0xE0, // ### ### - 0x60, 0xC0, // ## ## - 0x71, 0xC0, // ### ### - 0x7B, 0xC0, // #### #### - 0x6A, 0xC0, // ## # # ## - 0x6E, 0xC0, // ## ### ## - 0x64, 0xC0, // ## # ## - 0x60, 0xC0, // ## ## - 0xFB, 0xE0, // ##### ##### - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - - // @1472 'N' (11 pixels wide) - 0x00, 0x00, // - 0x00, 0x00, // - 0x73, 0xC0, // ### #### - 0x31, 0x80, // ## ## - 0x39, 0x80, // ### ## - 0x3D, 0x80, // #### ## - 0x35, 0x80, // ## # ## - 0x37, 0x80, // ## #### - 0x33, 0x80, // ## ### - 0x31, 0x80, // ## ## - 0x79, 0x80, // #### ## - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - - // @1504 'O' (11 pixels wide) - 0x00, 0x00, // - 0x00, 0x00, // - 0x1F, 0x00, // ##### - 0x31, 0x80, // ## ## - 0x60, 0xC0, // ## ## - 0x60, 0xC0, // ## ## - 0x60, 0xC0, // ## ## - 0x60, 0xC0, // ## ## - 0x60, 0xC0, // ## ## - 0x31, 0x80, // ## ## - 0x1F, 0x00, // ##### - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - - // @1536 'P' (11 pixels wide) - 0x00, 0x00, // - 0x00, 0x00, // - 0x7F, 0x00, // ####### - 0x31, 0x80, // ## ## - 0x31, 0x80, // ## ## - 0x31, 0x80, // ## ## - 0x31, 0x80, // ## ## - 0x3F, 0x00, // ###### - 0x30, 0x00, // ## - 0x30, 0x00, // ## - 0x7E, 0x00, // ###### - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - - // @1568 'Q' (11 pixels wide) - 0x00, 0x00, // - 0x00, 0x00, // - 0x1F, 0x00, // ##### - 0x31, 0x80, // ## ## - 0x60, 0xC0, // ## ## - 0x60, 0xC0, // ## ## - 0x60, 0xC0, // ## ## - 0x60, 0xC0, // ## ## - 0x60, 0xC0, // ## ## - 0x31, 0x80, // ## ## - 0x1F, 0x00, // ##### - 0x0C, 0xC0, // ## ## - 0x1F, 0x80, // ###### - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - - // @1600 'R' (11 pixels wide) - 0x00, 0x00, // - 0x00, 0x00, // - 0x7F, 0x00, // ####### - 0x31, 0x80, // ## ## - 0x31, 0x80, // ## ## - 0x31, 0x80, // ## ## - 0x3E, 0x00, // ##### - 0x33, 0x00, // ## ## - 0x31, 0x80, // ## ## - 0x31, 0x80, // ## ## - 0x7C, 0xE0, // ##### ### - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - - // @1632 'S' (11 pixels wide) - 0x00, 0x00, // - 0x00, 0x00, // - 0x1F, 0x80, // ###### - 0x31, 0x80, // ## ## - 0x31, 0x80, // ## ## - 0x38, 0x00, // ### - 0x1F, 0x00, // ##### - 0x03, 0x80, // ### - 0x31, 0x80, // ## ## - 0x31, 0x80, // ## ## - 0x3F, 0x00, // ###### - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - - // @1664 'T' (11 pixels wide) - 0x00, 0x00, // - 0x00, 0x00, // - 0x7F, 0x80, // ######## - 0x4C, 0x80, // # ## # - 0x4C, 0x80, // # ## # - 0x4C, 0x80, // # ## # - 0x0C, 0x00, // ## - 0x0C, 0x00, // ## - 0x0C, 0x00, // ## - 0x0C, 0x00, // ## - 0x3F, 0x00, // ###### - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - - // @1696 'U' (11 pixels wide) - 0x00, 0x00, // - 0x00, 0x00, // - 0x7B, 0xC0, // #### #### - 0x31, 0x80, // ## ## - 0x31, 0x80, // ## ## - 0x31, 0x80, // ## ## - 0x31, 0x80, // ## ## - 0x31, 0x80, // ## ## - 0x31, 0x80, // ## ## - 0x31, 0x80, // ## ## - 0x1F, 0x00, // ##### - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - - // @1728 'V' (11 pixels wide) - 0x00, 0x00, // - 0x00, 0x00, // - 0x7B, 0xC0, // #### #### - 0x31, 0x80, // ## ## - 0x31, 0x80, // ## ## - 0x1B, 0x00, // ## ## - 0x1B, 0x00, // ## ## - 0x1B, 0x00, // ## ## - 0x0A, 0x00, // # # - 0x0E, 0x00, // ### - 0x0E, 0x00, // ### - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - - // @1760 'W' (11 pixels wide) - 0x00, 0x00, // - 0x00, 0x00, // - 0xFB, 0xE0, // ##### ##### - 0x60, 0xC0, // ## ## - 0x64, 0xC0, // ## # ## - 0x6E, 0xC0, // ## ### ## - 0x6E, 0xC0, // ## ### ## - 0x2A, 0x80, // # # # # - 0x3B, 0x80, // ### ### - 0x3B, 0x80, // ### ### - 0x31, 0x80, // ## ## - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - - // @1792 'X' (11 pixels wide) - 0x00, 0x00, // - 0x00, 0x00, // - 0x7B, 0xC0, // #### #### - 0x31, 0x80, // ## ## - 0x1B, 0x00, // ## ## - 0x0E, 0x00, // ### - 0x0E, 0x00, // ### - 0x0E, 0x00, // ### - 0x1B, 0x00, // ## ## - 0x31, 0x80, // ## ## - 0x7B, 0xC0, // #### #### - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - - // @1824 'Y' (11 pixels wide) - 0x00, 0x00, // - 0x00, 0x00, // - 0x79, 0xE0, // #### #### - 0x30, 0xC0, // ## ## - 0x19, 0x80, // ## ## - 0x0F, 0x00, // #### - 0x06, 0x00, // ## - 0x06, 0x00, // ## - 0x06, 0x00, // ## - 0x06, 0x00, // ## - 0x1F, 0x80, // ###### - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - - // @1856 'Z' (11 pixels wide) - 0x00, 0x00, // - 0x00, 0x00, // - 0x3F, 0x80, // ####### - 0x21, 0x80, // # ## - 0x23, 0x00, // # ## - 0x06, 0x00, // ## - 0x04, 0x00, // # - 0x0C, 0x00, // ## - 0x18, 0x80, // ## # - 0x30, 0x80, // ## # - 0x3F, 0x80, // ####### - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - - // @1888 '[' (11 pixels wide) - 0x00, 0x00, // - 0x07, 0x80, // #### - 0x06, 0x00, // ## - 0x06, 0x00, // ## - 0x06, 0x00, // ## - 0x06, 0x00, // ## - 0x06, 0x00, // ## - 0x06, 0x00, // ## - 0x06, 0x00, // ## - 0x06, 0x00, // ## - 0x06, 0x00, // ## - 0x06, 0x00, // ## - 0x07, 0x80, // #### - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - - // @1920 '\' (11 pixels wide) - 0x30, 0x00, // ## - 0x30, 0x00, // ## - 0x18, 0x00, // ## - 0x18, 0x00, // ## - 0x0C, 0x00, // ## - 0x0C, 0x00, // ## - 0x06, 0x00, // ## - 0x03, 0x00, // ## - 0x03, 0x00, // ## - 0x01, 0x80, // ## - 0x01, 0x80, // ## - 0x00, 0xC0, // ## - 0x00, 0xC0, // ## - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - - // @1952 ']' (11 pixels wide) - 0x00, 0x00, // - 0x1E, 0x00, // #### - 0x06, 0x00, // ## - 0x06, 0x00, // ## - 0x06, 0x00, // ## - 0x06, 0x00, // ## - 0x06, 0x00, // ## - 0x06, 0x00, // ## - 0x06, 0x00, // ## - 0x06, 0x00, // ## - 0x06, 0x00, // ## - 0x06, 0x00, // ## - 0x1E, 0x00, // #### - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - - // @1984 '^' (11 pixels wide) - 0x04, 0x00, // # - 0x0A, 0x00, // # # - 0x0A, 0x00, // # # - 0x11, 0x00, // # # - 0x20, 0x80, // # # - 0x20, 0x80, // # # - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - - // @2016 '_' (11 pixels wide) - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0xFF, 0xE0, // ########### - - // @2048 '`' (11 pixels wide) - 0x08, 0x00, // # - 0x04, 0x00, // # - 0x02, 0x00, // # - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - - // @2080 'a' (11 pixels wide) - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x1F, 0x00, // ##### - 0x01, 0x80, // ## - 0x01, 0x80, // ## - 0x1F, 0x80, // ###### - 0x31, 0x80, // ## ## - 0x33, 0x80, // ## ### - 0x1D, 0xC0, // ### ### - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - - // @2112 'b' (11 pixels wide) - 0x00, 0x00, // - 0x70, 0x00, // ### - 0x30, 0x00, // ## - 0x30, 0x00, // ## - 0x37, 0x00, // ## ### - 0x39, 0x80, // ### ## - 0x30, 0xC0, // ## ## - 0x30, 0xC0, // ## ## - 0x30, 0xC0, // ## ## - 0x39, 0x80, // ### ## - 0x77, 0x00, // ### ### - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - - // @2144 'c' (11 pixels wide) - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x1E, 0x80, // #### # - 0x31, 0x80, // ## ## - 0x60, 0x80, // ## # - 0x60, 0x00, // ## - 0x60, 0x80, // ## # - 0x31, 0x80, // ## ## - 0x1F, 0x00, // ##### - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - - // @2176 'd' (11 pixels wide) - 0x00, 0x00, // - 0x03, 0x80, // ### - 0x01, 0x80, // ## - 0x01, 0x80, // ## - 0x1D, 0x80, // ### ## - 0x33, 0x80, // ## ### - 0x61, 0x80, // ## ## - 0x61, 0x80, // ## ## - 0x61, 0x80, // ## ## - 0x33, 0x80, // ## ### - 0x1D, 0xC0, // ### ### - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - - // @2208 'e' (11 pixels wide) - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x1F, 0x00, // ##### - 0x31, 0x80, // ## ## - 0x60, 0xC0, // ## ## - 0x7F, 0xC0, // ######### - 0x60, 0x00, // ## - 0x30, 0xC0, // ## ## - 0x1F, 0x80, // ###### - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - - // @2240 'f' (11 pixels wide) - 0x00, 0x00, // - 0x07, 0xE0, // ###### - 0x0C, 0x00, // ## - 0x0C, 0x00, // ## - 0x3F, 0x80, // ####### - 0x0C, 0x00, // ## - 0x0C, 0x00, // ## - 0x0C, 0x00, // ## - 0x0C, 0x00, // ## - 0x0C, 0x00, // ## - 0x3F, 0x80, // ####### - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - - // @2272 'g' (11 pixels wide) - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x1D, 0xC0, // ### ### - 0x33, 0x80, // ## ### - 0x61, 0x80, // ## ## - 0x61, 0x80, // ## ## - 0x61, 0x80, // ## ## - 0x33, 0x80, // ## ### - 0x1D, 0x80, // ### ## - 0x01, 0x80, // ## - 0x01, 0x80, // ## - 0x1F, 0x00, // ##### - 0x00, 0x00, // - 0x00, 0x00, // - - // @2304 'h' (11 pixels wide) - 0x00, 0x00, // - 0x70, 0x00, // ### - 0x30, 0x00, // ## - 0x30, 0x00, // ## - 0x37, 0x00, // ## ### - 0x39, 0x80, // ### ## - 0x31, 0x80, // ## ## - 0x31, 0x80, // ## ## - 0x31, 0x80, // ## ## - 0x31, 0x80, // ## ## - 0x7B, 0xC0, // #### #### - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - - // @2336 'i' (11 pixels wide) - 0x00, 0x00, // - 0x06, 0x00, // ## - 0x06, 0x00, // ## - 0x00, 0x00, // - 0x1E, 0x00, // #### - 0x06, 0x00, // ## - 0x06, 0x00, // ## - 0x06, 0x00, // ## - 0x06, 0x00, // ## - 0x06, 0x00, // ## - 0x3F, 0xC0, // ######## - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - - // @2368 'j' (11 pixels wide) - 0x00, 0x00, // - 0x06, 0x00, // ## - 0x06, 0x00, // ## - 0x00, 0x00, // - 0x3F, 0x00, // ###### - 0x03, 0x00, // ## - 0x03, 0x00, // ## - 0x03, 0x00, // ## - 0x03, 0x00, // ## - 0x03, 0x00, // ## - 0x03, 0x00, // ## - 0x03, 0x00, // ## - 0x03, 0x00, // ## - 0x3E, 0x00, // ##### - 0x00, 0x00, // - 0x00, 0x00, // - - // @2400 'k' (11 pixels wide) - 0x00, 0x00, // - 0x70, 0x00, // ### - 0x30, 0x00, // ## - 0x30, 0x00, // ## - 0x37, 0x80, // ## #### - 0x36, 0x00, // ## ## - 0x3C, 0x00, // #### - 0x3C, 0x00, // #### - 0x36, 0x00, // ## ## - 0x33, 0x00, // ## ## - 0x77, 0xC0, // ### ##### - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - - // @2432 'l' (11 pixels wide) - 0x00, 0x00, // - 0x1E, 0x00, // #### - 0x06, 0x00, // ## - 0x06, 0x00, // ## - 0x06, 0x00, // ## - 0x06, 0x00, // ## - 0x06, 0x00, // ## - 0x06, 0x00, // ## - 0x06, 0x00, // ## - 0x06, 0x00, // ## - 0x3F, 0xC0, // ######## - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - - // @2464 'm' (11 pixels wide) - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x7F, 0x80, // ######## - 0x36, 0xC0, // ## ## ## - 0x36, 0xC0, // ## ## ## - 0x36, 0xC0, // ## ## ## - 0x36, 0xC0, // ## ## ## - 0x36, 0xC0, // ## ## ## - 0x76, 0xE0, // ### ## ### - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - - // @2496 'n' (11 pixels wide) - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x77, 0x00, // ### ### - 0x39, 0x80, // ### ## - 0x31, 0x80, // ## ## - 0x31, 0x80, // ## ## - 0x31, 0x80, // ## ## - 0x31, 0x80, // ## ## - 0x7B, 0xC0, // #### #### - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - - // @2528 'o' (11 pixels wide) - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x1F, 0x00, // ##### - 0x31, 0x80, // ## ## - 0x60, 0xC0, // ## ## - 0x60, 0xC0, // ## ## - 0x60, 0xC0, // ## ## - 0x31, 0x80, // ## ## - 0x1F, 0x00, // ##### - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - - // @2560 'p' (11 pixels wide) - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x77, 0x00, // ### ### - 0x39, 0x80, // ### ## - 0x30, 0xC0, // ## ## - 0x30, 0xC0, // ## ## - 0x30, 0xC0, // ## ## - 0x39, 0x80, // ### ## - 0x37, 0x00, // ## ### - 0x30, 0x00, // ## - 0x30, 0x00, // ## - 0x7C, 0x00, // ##### - 0x00, 0x00, // - 0x00, 0x00, // - - // @2592 'q' (11 pixels wide) - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x1D, 0xC0, // ### ### - 0x33, 0x80, // ## ### - 0x61, 0x80, // ## ## - 0x61, 0x80, // ## ## - 0x61, 0x80, // ## ## - 0x33, 0x80, // ## ### - 0x1D, 0x80, // ### ## - 0x01, 0x80, // ## - 0x01, 0x80, // ## - 0x07, 0xC0, // ##### - 0x00, 0x00, // - 0x00, 0x00, // - - // @2624 'r' (11 pixels wide) - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x7B, 0x80, // #### ### - 0x1C, 0xC0, // ### ## - 0x18, 0x00, // ## - 0x18, 0x00, // ## - 0x18, 0x00, // ## - 0x18, 0x00, // ## - 0x7F, 0x00, // ####### - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - - // @2656 's' (11 pixels wide) - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x1F, 0x80, // ###### - 0x31, 0x80, // ## ## - 0x3C, 0x00, // #### - 0x1F, 0x00, // ##### - 0x03, 0x80, // ### - 0x31, 0x80, // ## ## - 0x3F, 0x00, // ###### - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - - // @2688 't' (11 pixels wide) - 0x00, 0x00, // - 0x18, 0x00, // ## - 0x18, 0x00, // ## - 0x18, 0x00, // ## - 0x7F, 0x00, // ####### - 0x18, 0x00, // ## - 0x18, 0x00, // ## - 0x18, 0x00, // ## - 0x18, 0x00, // ## - 0x18, 0x80, // ## # - 0x0F, 0x00, // #### - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - - // @2720 'u' (11 pixels wide) - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x73, 0x80, // ### ### - 0x31, 0x80, // ## ## - 0x31, 0x80, // ## ## - 0x31, 0x80, // ## ## - 0x31, 0x80, // ## ## - 0x33, 0x80, // ## ### - 0x1D, 0xC0, // ### ### - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - - // @2752 'v' (11 pixels wide) - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x7B, 0xC0, // #### #### - 0x31, 0x80, // ## ## - 0x31, 0x80, // ## ## - 0x1B, 0x00, // ## ## - 0x1B, 0x00, // ## ## - 0x0E, 0x00, // ### - 0x0E, 0x00, // ### - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - - // @2784 'w' (11 pixels wide) - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0xF1, 0xE0, // #### #### - 0x60, 0xC0, // ## ## - 0x64, 0xC0, // ## # ## - 0x6E, 0xC0, // ## ### ## - 0x3B, 0x80, // ### ### - 0x3B, 0x80, // ### ### - 0x31, 0x80, // ## ## - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - - // @2816 'x' (11 pixels wide) - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x7B, 0xC0, // #### #### - 0x1B, 0x00, // ## ## - 0x0E, 0x00, // ### - 0x0E, 0x00, // ### - 0x0E, 0x00, // ### - 0x1B, 0x00, // ## ## - 0x7B, 0xC0, // #### #### - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - - // @2848 'y' (11 pixels wide) - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x79, 0xE0, // #### #### - 0x30, 0xC0, // ## ## - 0x19, 0x80, // ## ## - 0x19, 0x80, // ## ## - 0x0B, 0x00, // # ## - 0x0F, 0x00, // #### - 0x06, 0x00, // ## - 0x06, 0x00, // ## - 0x0C, 0x00, // ## - 0x3E, 0x00, // ##### - 0x00, 0x00, // - 0x00, 0x00, // - - // @2880 'z' (11 pixels wide) - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x3F, 0x80, // ####### - 0x21, 0x80, // # ## - 0x03, 0x00, // ## - 0x0E, 0x00, // ### - 0x18, 0x00, // ## - 0x30, 0x80, // ## # - 0x3F, 0x80, // ####### - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - - // @2912 '{' (11 pixels wide) - 0x00, 0x00, // - 0x06, 0x00, // ## - 0x0C, 0x00, // ## - 0x0C, 0x00, // ## - 0x0C, 0x00, // ## - 0x0C, 0x00, // ## - 0x0C, 0x00, // ## - 0x18, 0x00, // ## - 0x0C, 0x00, // ## - 0x0C, 0x00, // ## - 0x0C, 0x00, // ## - 0x0C, 0x00, // ## - 0x06, 0x00, // ## - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - - // @2944 '|' (11 pixels wide) - 0x00, 0x00, // - 0x06, 0x00, // ## - 0x06, 0x00, // ## - 0x06, 0x00, // ## - 0x06, 0x00, // ## - 0x06, 0x00, // ## - 0x06, 0x00, // ## - 0x06, 0x00, // ## - 0x06, 0x00, // ## - 0x06, 0x00, // ## - 0x06, 0x00, // ## - 0x06, 0x00, // ## - 0x06, 0x00, // ## - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - - // @2976 '}' (11 pixels wide) - 0x00, 0x00, // - 0x0C, 0x00, // ## - 0x06, 0x00, // ## - 0x06, 0x00, // ## - 0x06, 0x00, // ## - 0x06, 0x00, // ## - 0x06, 0x00, // ## - 0x03, 0x00, // ## - 0x06, 0x00, // ## - 0x06, 0x00, // ## - 0x06, 0x00, // ## - 0x06, 0x00, // ## - 0x0C, 0x00, // ## - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - - // @3008 '~' (11 pixels wide) - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x18, 0x00, // ## - 0x24, 0x80, // # # # - 0x03, 0x00, // ## - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // -}; - -sFONT Font16 = { - Font16_Table, - 11, /* Width */ - 16, /* Height */ -}; - -/** - * @} - */ - - -/** @defgroup FONTS_Private_Function_Prototypes - * @{ - */ -/** - * @} - */ - - -/** @defgroup FONTS_Private_Functions - * @{ - */ - -/** - * @} - */ - -/** - * @} - */ - -/** - * @} - */ - -/** - * @} - */ - -/** - * @} - */ -/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
--- a/Fonts/font20.c Mon May 30 11:09:05 2016 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,2223 +0,0 @@ -/** - ****************************************************************************** - * @file font20.c - * @author MCD Application Team - * @version V1.0.0 - * @date 18-February-2014 - * @brief This file provides text font20 for STM32xx-EVAL's LCD driver. - ****************************************************************************** - * @attention - * - * <h2><center>© COPYRIGHT(c) 2014 STMicroelectronics</center></h2> - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. Neither the name of STMicroelectronics nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - ****************************************************************************** - */ - -/* Includes ------------------------------------------------------------------*/ -#include "fonts.h" - -/** @addtogroup Utilities - * @{ - */ - -/** @addtogroup STM32_EVAL - * @{ - */ - -/** @addtogroup Common - * @{ - */ - -/** @addtogroup FONTS - * @brief This file provides text font20 for STM32xx-EVAL's LCD driver. - * @{ - */ - -/** @defgroup FONTS_Private_Types - * @{ - */ -/** - * @} - */ - - -/** @defgroup FONTS_Private_Defines - * @{ - */ -/** - * @} - */ - - -/** @defgroup FONTS_Private_Macros - * @{ - */ -/** - * @} - */ - - -/** @defgroup FONTS_Private_Variables - * @{ - */ - -// Character bitmaps for Courier New 15pt -const uint8_t Font20_Table[] = -{ - // @0 ' ' (14 pixels wide) - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - - // @40 '!' (14 pixels wide) - 0x00, 0x00, // - 0x07, 0x00, // ### - 0x07, 0x00, // ### - 0x07, 0x00, // ### - 0x07, 0x00, // ### - 0x07, 0x00, // ### - 0x07, 0x00, // ### - 0x07, 0x00, // ### - 0x02, 0x00, // # - 0x02, 0x00, // # - 0x00, 0x00, // - 0x00, 0x00, // - 0x07, 0x00, // ### - 0x07, 0x00, // ### - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - - // @80 '"' (14 pixels wide) - 0x00, 0x00, // - 0x00, 0x00, // - 0x1C, 0xE0, // ### ### - 0x1C, 0xE0, // ### ### - 0x1C, 0xE0, // ### ### - 0x08, 0x40, // # # - 0x08, 0x40, // # # - 0x08, 0x40, // # # - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - - // @120 '#' (14 pixels wide) - 0x0C, 0xC0, // ## ## - 0x0C, 0xC0, // ## ## - 0x0C, 0xC0, // ## ## - 0x0C, 0xC0, // ## ## - 0x0C, 0xC0, // ## ## - 0x3F, 0xF0, // ########## - 0x3F, 0xF0, // ########## - 0x0C, 0xC0, // ## ## - 0x0C, 0xC0, // ## ## - 0x3F, 0xF0, // ########## - 0x3F, 0xF0, // ########## - 0x0C, 0xC0, // ## ## - 0x0C, 0xC0, // ## ## - 0x0C, 0xC0, // ## ## - 0x0C, 0xC0, // ## ## - 0x0C, 0xC0, // ## ## - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - - // @160 '$' (14 pixels wide) - 0x03, 0x00, // ## - 0x03, 0x00, // ## - 0x07, 0xE0, // ###### - 0x0F, 0xE0, // ####### - 0x18, 0x60, // ## ## - 0x18, 0x00, // ## - 0x1F, 0x00, // ##### - 0x0F, 0xC0, // ###### - 0x00, 0xE0, // ### - 0x18, 0x60, // ## ## - 0x18, 0x60, // ## ## - 0x1F, 0xC0, // ####### - 0x1F, 0x80, // ###### - 0x03, 0x00, // ## - 0x03, 0x00, // ## - 0x03, 0x00, // ## - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - - // @200 '%' (14 pixels wide) - 0x00, 0x00, // - 0x1C, 0x00, // ### - 0x22, 0x00, // # # - 0x22, 0x00, // # # - 0x22, 0x00, // # # - 0x1C, 0x60, // ### ## - 0x01, 0xE0, // #### - 0x0F, 0x80, // ##### - 0x3C, 0x00, // #### - 0x31, 0xC0, // ## ### - 0x02, 0x20, // # # - 0x02, 0x20, // # # - 0x02, 0x20, // # # - 0x01, 0xC0, // ### - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - - // @240 '&' (14 pixels wide) - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x03, 0xE0, // ##### - 0x0F, 0xE0, // ####### - 0x0C, 0x00, // ## - 0x0C, 0x00, // ## - 0x06, 0x00, // ## - 0x0F, 0x30, // #### ## - 0x1F, 0xF0, // ######### - 0x19, 0xE0, // ## #### - 0x18, 0xC0, // ## ## - 0x1F, 0xF0, // ######### - 0x07, 0xB0, // #### ## - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - - // @280 ''' (14 pixels wide) - 0x00, 0x00, // - 0x00, 0x00, // - 0x03, 0x80, // ### - 0x03, 0x80, // ### - 0x03, 0x80, // ### - 0x01, 0x00, // # - 0x01, 0x00, // # - 0x01, 0x00, // # - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - - // @320 '(' (14 pixels wide) - 0x00, 0x00, // - 0x00, 0xC0, // ## - 0x00, 0xC0, // ## - 0x01, 0x80, // ## - 0x01, 0x80, // ## - 0x01, 0x80, // ## - 0x03, 0x00, // ## - 0x03, 0x00, // ## - 0x03, 0x00, // ## - 0x03, 0x00, // ## - 0x03, 0x00, // ## - 0x03, 0x00, // ## - 0x01, 0x80, // ## - 0x01, 0x80, // ## - 0x01, 0x80, // ## - 0x00, 0xC0, // ## - 0x00, 0xC0, // ## - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - - // @360 ')' (14 pixels wide) - 0x00, 0x00, // - 0x0C, 0x00, // ## - 0x0C, 0x00, // ## - 0x06, 0x00, // ## - 0x06, 0x00, // ## - 0x06, 0x00, // ## - 0x03, 0x00, // ## - 0x03, 0x00, // ## - 0x03, 0x00, // ## - 0x03, 0x00, // ## - 0x03, 0x00, // ## - 0x03, 0x00, // ## - 0x06, 0x00, // ## - 0x06, 0x00, // ## - 0x06, 0x00, // ## - 0x0C, 0x00, // ## - 0x0C, 0x00, // ## - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - - // @400 '*' (14 pixels wide) - 0x00, 0x00, // - 0x03, 0x00, // ## - 0x03, 0x00, // ## - 0x03, 0x00, // ## - 0x1B, 0x60, // ## ## ## - 0x1F, 0xE0, // ######## - 0x07, 0x80, // #### - 0x07, 0x80, // #### - 0x0F, 0xC0, // ###### - 0x0C, 0xC0, // ## ## - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - - // @440 '+' (14 pixels wide) - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x03, 0x00, // ## - 0x03, 0x00, // ## - 0x03, 0x00, // ## - 0x03, 0x00, // ## - 0x3F, 0xF0, // ########## - 0x3F, 0xF0, // ########## - 0x03, 0x00, // ## - 0x03, 0x00, // ## - 0x03, 0x00, // ## - 0x03, 0x00, // ## - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - - // @480 ',' (14 pixels wide) - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x03, 0x80, // ### - 0x03, 0x00, // ## - 0x03, 0x00, // ## - 0x06, 0x00, // ## - 0x06, 0x00, // ## - 0x04, 0x00, // # - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - - // @520 '-' (14 pixels wide) - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x3F, 0xE0, // ######### - 0x3F, 0xE0, // ######### - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - - // @560 '.' (14 pixels wide) - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x03, 0x80, // ### - 0x03, 0x80, // ### - 0x03, 0x80, // ### - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - - // @600 '/' (14 pixels wide) - 0x00, 0x60, // ## - 0x00, 0x60, // ## - 0x00, 0xC0, // ## - 0x00, 0xC0, // ## - 0x00, 0xC0, // ## - 0x01, 0x80, // ## - 0x01, 0x80, // ## - 0x03, 0x00, // ## - 0x03, 0x00, // ## - 0x06, 0x00, // ## - 0x06, 0x00, // ## - 0x0C, 0x00, // ## - 0x0C, 0x00, // ## - 0x0C, 0x00, // ## - 0x18, 0x00, // ## - 0x18, 0x00, // ## - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - - // @640 '0' (14 pixels wide) - 0x00, 0x00, // - 0x0F, 0x80, // ##### - 0x1F, 0xC0, // ####### - 0x18, 0xC0, // ## ## - 0x30, 0x60, // ## ## - 0x30, 0x60, // ## ## - 0x30, 0x60, // ## ## - 0x30, 0x60, // ## ## - 0x30, 0x60, // ## ## - 0x30, 0x60, // ## ## - 0x30, 0x60, // ## ## - 0x18, 0xC0, // ## ## - 0x1F, 0xC0, // ####### - 0x0F, 0x80, // ##### - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - - // @680 '1' (14 pixels wide) - 0x00, 0x00, // - 0x03, 0x00, // ## - 0x1F, 0x00, // ##### - 0x1F, 0x00, // ##### - 0x03, 0x00, // ## - 0x03, 0x00, // ## - 0x03, 0x00, // ## - 0x03, 0x00, // ## - 0x03, 0x00, // ## - 0x03, 0x00, // ## - 0x03, 0x00, // ## - 0x03, 0x00, // ## - 0x1F, 0xE0, // ######## - 0x1F, 0xE0, // ######## - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - - // @720 '2' (14 pixels wide) - 0x00, 0x00, // - 0x0F, 0x80, // ##### - 0x1F, 0xC0, // ####### - 0x38, 0xE0, // ### ### - 0x30, 0x60, // ## ## - 0x00, 0x60, // ## - 0x00, 0xC0, // ## - 0x01, 0x80, // ## - 0x03, 0x00, // ## - 0x06, 0x00, // ## - 0x0C, 0x00, // ## - 0x18, 0x00, // ## - 0x3F, 0xE0, // ######### - 0x3F, 0xE0, // ######### - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - - // @760 '3' (14 pixels wide) - 0x00, 0x00, // - 0x0F, 0x80, // ##### - 0x3F, 0xC0, // ######## - 0x30, 0xE0, // ## ### - 0x00, 0x60, // ## - 0x00, 0xE0, // ### - 0x07, 0xC0, // ##### - 0x07, 0xC0, // ##### - 0x00, 0xE0, // ### - 0x00, 0x60, // ## - 0x00, 0x60, // ## - 0x60, 0xE0, // ## ### - 0x7F, 0xC0, // ######### - 0x3F, 0x80, // ####### - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - - // @800 '4' (14 pixels wide) - 0x00, 0x00, // - 0x01, 0xC0, // ### - 0x03, 0xC0, // #### - 0x03, 0xC0, // #### - 0x06, 0xC0, // ## ## - 0x0C, 0xC0, // ## ## - 0x0C, 0xC0, // ## ## - 0x18, 0xC0, // ## ## - 0x30, 0xC0, // ## ## - 0x3F, 0xE0, // ######### - 0x3F, 0xE0, // ######### - 0x00, 0xC0, // ## - 0x03, 0xE0, // ##### - 0x03, 0xE0, // ##### - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - - // @840 '5' (14 pixels wide) - 0x00, 0x00, // - 0x1F, 0xC0, // ####### - 0x1F, 0xC0, // ####### - 0x18, 0x00, // ## - 0x18, 0x00, // ## - 0x1F, 0x80, // ###### - 0x1F, 0xC0, // ####### - 0x18, 0xE0, // ## ### - 0x00, 0x60, // ## - 0x00, 0x60, // ## - 0x00, 0x60, // ## - 0x30, 0xE0, // ## ### - 0x3F, 0xC0, // ######## - 0x1F, 0x80, // ###### - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - - // @880 '6' (14 pixels wide) - 0x00, 0x00, // - 0x03, 0xE0, // ##### - 0x0F, 0xE0, // ####### - 0x1E, 0x00, // #### - 0x18, 0x00, // ## - 0x38, 0x00, // ### - 0x37, 0x80, // ## #### - 0x3F, 0xC0, // ######## - 0x38, 0xE0, // ### ### - 0x30, 0x60, // ## ## - 0x30, 0x60, // ## ## - 0x18, 0xE0, // ## ### - 0x1F, 0xC0, // ####### - 0x07, 0x80, // #### - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - - // @920 '7' (14 pixels wide) - 0x00, 0x00, // - 0x3F, 0xE0, // ######### - 0x3F, 0xE0, // ######### - 0x30, 0x60, // ## ## - 0x00, 0x60, // ## - 0x00, 0xC0, // ## - 0x00, 0xC0, // ## - 0x00, 0xC0, // ## - 0x01, 0x80, // ## - 0x01, 0x80, // ## - 0x01, 0x80, // ## - 0x03, 0x00, // ## - 0x03, 0x00, // ## - 0x03, 0x00, // ## - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - - // @960 '8' (14 pixels wide) - 0x00, 0x00, // - 0x0F, 0x80, // ##### - 0x1F, 0xC0, // ####### - 0x38, 0xE0, // ### ### - 0x30, 0x60, // ## ## - 0x38, 0xE0, // ### ### - 0x1F, 0xC0, // ####### - 0x1F, 0xC0, // ####### - 0x38, 0xE0, // ### ### - 0x30, 0x60, // ## ## - 0x30, 0x60, // ## ## - 0x38, 0xE0, // ### ### - 0x1F, 0xC0, // ####### - 0x0F, 0x80, // ##### - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - - // @1000 '9' (14 pixels wide) - 0x00, 0x00, // - 0x0F, 0x00, // #### - 0x1F, 0xC0, // ####### - 0x38, 0xC0, // ### ## - 0x30, 0x60, // ## ## - 0x30, 0x60, // ## ## - 0x38, 0xE0, // ### ### - 0x1F, 0xE0, // ######## - 0x0F, 0x60, // #### ## - 0x00, 0xE0, // ### - 0x00, 0xC0, // ## - 0x03, 0xC0, // #### - 0x3F, 0x80, // ####### - 0x3E, 0x00, // ##### - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - - // @1040 ':' (14 pixels wide) - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x03, 0x80, // ### - 0x03, 0x80, // ### - 0x03, 0x80, // ### - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x03, 0x80, // ### - 0x03, 0x80, // ### - 0x03, 0x80, // ### - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - - // @1080 ';' (14 pixels wide) - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x01, 0xC0, // ### - 0x01, 0xC0, // ### - 0x01, 0xC0, // ### - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x03, 0x80, // ### - 0x03, 0x00, // ## - 0x06, 0x00, // ## - 0x06, 0x00, // ## - 0x04, 0x00, // # - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - - // @1120 '<' (14 pixels wide) - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x30, // ## - 0x00, 0xF0, // #### - 0x03, 0xC0, // #### - 0x07, 0x00, // ### - 0x1C, 0x00, // ### - 0x78, 0x00, // #### - 0x1C, 0x00, // ### - 0x07, 0x00, // ### - 0x03, 0xC0, // #### - 0x00, 0xF0, // #### - 0x00, 0x30, // ## - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - - // @1160 '=' (14 pixels wide) - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x7F, 0xF0, // ########### - 0x7F, 0xF0, // ########### - 0x00, 0x00, // - 0x00, 0x00, // - 0x7F, 0xF0, // ########### - 0x7F, 0xF0, // ########### - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - - // @1200 '>' (14 pixels wide) - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x30, 0x00, // ## - 0x3C, 0x00, // #### - 0x0F, 0x00, // #### - 0x03, 0x80, // ### - 0x00, 0xE0, // ### - 0x00, 0x78, // #### - 0x00, 0xE0, // ### - 0x03, 0x80, // ### - 0x0F, 0x00, // #### - 0x3C, 0x00, // #### - 0x30, 0x00, // ## - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - - // @1240 '?' (14 pixels wide) - 0x00, 0x00, // - 0x00, 0x00, // - 0x0F, 0x80, // ##### - 0x1F, 0xC0, // ####### - 0x18, 0x60, // ## ## - 0x18, 0x60, // ## ## - 0x00, 0x60, // ## - 0x01, 0xC0, // ### - 0x03, 0x80, // ### - 0x03, 0x00, // ## - 0x00, 0x00, // - 0x00, 0x00, // - 0x07, 0x00, // ### - 0x07, 0x00, // ### - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - - // @1280 '@' (14 pixels wide) - 0x00, 0x00, // - 0x03, 0x80, // ### - 0x0C, 0x80, // ## # - 0x08, 0x40, // # # - 0x10, 0x40, // # # - 0x10, 0x40, // # # - 0x11, 0xC0, // # ### - 0x12, 0x40, // # # # - 0x12, 0x40, // # # # - 0x12, 0x40, // # # # - 0x11, 0xC0, // # ### - 0x10, 0x00, // # - 0x08, 0x00, // # - 0x08, 0x40, // # # - 0x07, 0x80, // #### - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - - // @1320 'A' (14 pixels wide) - 0x00, 0x00, // - 0x00, 0x00, // - 0x1F, 0x80, // ###### - 0x1F, 0x80, // ###### - 0x03, 0x80, // ### - 0x06, 0xC0, // ## ## - 0x06, 0xC0, // ## ## - 0x0C, 0xC0, // ## ## - 0x0C, 0x60, // ## ## - 0x1F, 0xE0, // ######## - 0x1F, 0xE0, // ######## - 0x30, 0x30, // ## ## - 0x78, 0x78, // #### #### - 0x78, 0x78, // #### #### - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - - // @1360 'B' (14 pixels wide) - 0x00, 0x00, // - 0x00, 0x00, // - 0x3F, 0x80, // ####### - 0x3F, 0xC0, // ######## - 0x18, 0x60, // ## ## - 0x18, 0x60, // ## ## - 0x18, 0xE0, // ## ### - 0x1F, 0xC0, // ####### - 0x1F, 0xE0, // ######## - 0x18, 0x70, // ## ### - 0x18, 0x30, // ## ## - 0x18, 0x30, // ## ## - 0x3F, 0xF0, // ########## - 0x3F, 0xE0, // ######### - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - - // @1400 'C' (14 pixels wide) - 0x00, 0x00, // - 0x00, 0x00, // - 0x07, 0xB0, // #### ## - 0x0F, 0xF0, // ######## - 0x1C, 0x70, // ### ### - 0x38, 0x30, // ### ## - 0x30, 0x00, // ## - 0x30, 0x00, // ## - 0x30, 0x00, // ## - 0x30, 0x00, // ## - 0x38, 0x30, // ### ## - 0x1C, 0x70, // ### ### - 0x0F, 0xE0, // ####### - 0x07, 0xC0, // ##### - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - - // @1440 'D' (14 pixels wide) - 0x00, 0x00, // - 0x00, 0x00, // - 0x7F, 0x80, // ######## - 0x7F, 0xC0, // ######### - 0x30, 0xE0, // ## ### - 0x30, 0x70, // ## ### - 0x30, 0x30, // ## ## - 0x30, 0x30, // ## ## - 0x30, 0x30, // ## ## - 0x30, 0x30, // ## ## - 0x30, 0x70, // ## ### - 0x30, 0xE0, // ## ### - 0x7F, 0xC0, // ######### - 0x7F, 0x80, // ######## - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - - // @1480 'E' (14 pixels wide) - 0x00, 0x00, // - 0x00, 0x00, // - 0x3F, 0xF0, // ########## - 0x3F, 0xF0, // ########## - 0x18, 0x30, // ## ## - 0x18, 0x30, // ## ## - 0x19, 0x80, // ## ## - 0x1F, 0x80, // ###### - 0x1F, 0x80, // ###### - 0x19, 0x80, // ## ## - 0x18, 0x30, // ## ## - 0x18, 0x30, // ## ## - 0x3F, 0xF0, // ########## - 0x3F, 0xF0, // ########## - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - - // @1520 'F' (14 pixels wide) - 0x00, 0x00, // - 0x00, 0x00, // - 0x3F, 0xF0, // ########## - 0x3F, 0xF0, // ########## - 0x18, 0x30, // ## ## - 0x18, 0x30, // ## ## - 0x19, 0x80, // ## ## - 0x1F, 0x80, // ###### - 0x1F, 0x80, // ###### - 0x19, 0x80, // ## ## - 0x18, 0x00, // ## - 0x18, 0x00, // ## - 0x3F, 0x00, // ###### - 0x3F, 0x00, // ###### - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - - // @1560 'G' (14 pixels wide) - 0x00, 0x00, // - 0x00, 0x00, // - 0x07, 0xB0, // #### ## - 0x1F, 0xF0, // ######### - 0x18, 0x70, // ## ### - 0x30, 0x30, // ## ## - 0x30, 0x00, // ## - 0x30, 0x00, // ## - 0x31, 0xF8, // ## ###### - 0x31, 0xF8, // ## ###### - 0x30, 0x30, // ## ## - 0x18, 0x30, // ## ## - 0x1F, 0xF0, // ######### - 0x07, 0xC0, // ##### - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - - // @1600 'H' (14 pixels wide) - 0x00, 0x00, // - 0x00, 0x00, // - 0x3C, 0xF0, // #### #### - 0x3C, 0xF0, // #### #### - 0x18, 0x60, // ## ## - 0x18, 0x60, // ## ## - 0x18, 0x60, // ## ## - 0x1F, 0xE0, // ######## - 0x1F, 0xE0, // ######## - 0x18, 0x60, // ## ## - 0x18, 0x60, // ## ## - 0x18, 0x60, // ## ## - 0x3C, 0xF0, // #### #### - 0x3C, 0xF0, // #### #### - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - - // @1640 'I' (14 pixels wide) - 0x00, 0x00, // - 0x00, 0x00, // - 0x1F, 0xE0, // ######## - 0x1F, 0xE0, // ######## - 0x03, 0x00, // ## - 0x03, 0x00, // ## - 0x03, 0x00, // ## - 0x03, 0x00, // ## - 0x03, 0x00, // ## - 0x03, 0x00, // ## - 0x03, 0x00, // ## - 0x03, 0x00, // ## - 0x1F, 0xE0, // ######## - 0x1F, 0xE0, // ######## - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - - // @1680 'J' (14 pixels wide) - 0x00, 0x00, // - 0x00, 0x00, // - 0x03, 0xF8, // ####### - 0x03, 0xF8, // ####### - 0x00, 0x60, // ## - 0x00, 0x60, // ## - 0x00, 0x60, // ## - 0x00, 0x60, // ## - 0x30, 0x60, // ## ## - 0x30, 0x60, // ## ## - 0x30, 0x60, // ## ## - 0x30, 0xE0, // ## ### - 0x3F, 0xC0, // ######## - 0x0F, 0x80, // ##### - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - - // @1720 'K' (14 pixels wide) - 0x00, 0x00, // - 0x00, 0x00, // - 0x3E, 0xF8, // ##### ##### - 0x3E, 0xF8, // ##### ##### - 0x18, 0xE0, // ## ### - 0x19, 0x80, // ## ## - 0x1B, 0x00, // ## ## - 0x1F, 0x00, // ##### - 0x1D, 0x80, // ### ## - 0x18, 0xC0, // ## ## - 0x18, 0xC0, // ## ## - 0x18, 0x60, // ## ## - 0x3E, 0x78, // ##### #### - 0x3E, 0x38, // ##### ### - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - - // @1760 'L' (14 pixels wide) - 0x00, 0x00, // - 0x00, 0x00, // - 0x3F, 0x00, // ###### - 0x3F, 0x00, // ###### - 0x0C, 0x00, // ## - 0x0C, 0x00, // ## - 0x0C, 0x00, // ## - 0x0C, 0x00, // ## - 0x0C, 0x00, // ## - 0x0C, 0x30, // ## ## - 0x0C, 0x30, // ## ## - 0x0C, 0x30, // ## ## - 0x3F, 0xF0, // ########## - 0x3F, 0xF0, // ########## - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - - // @1800 'M' (14 pixels wide) - 0x00, 0x00, // - 0x00, 0x00, // - 0x78, 0x78, // #### #### - 0x78, 0x78, // #### #### - 0x38, 0x70, // ### ### - 0x3C, 0xF0, // #### #### - 0x34, 0xB0, // ## # # ## - 0x37, 0xB0, // ## #### ## - 0x37, 0xB0, // ## #### ## - 0x33, 0x30, // ## ## ## - 0x33, 0x30, // ## ## ## - 0x30, 0x30, // ## ## - 0x7C, 0xF8, // ##### ##### - 0x7C, 0xF8, // ##### ##### - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - - // @1840 'N' (14 pixels wide) - 0x00, 0x00, // - 0x00, 0x00, // - 0x39, 0xF0, // ### ##### - 0x3D, 0xF0, // #### ##### - 0x1C, 0x60, // ### ## - 0x1E, 0x60, // #### ## - 0x1E, 0x60, // #### ## - 0x1B, 0x60, // ## ## ## - 0x1B, 0x60, // ## ## ## - 0x19, 0xE0, // ## #### - 0x19, 0xE0, // ## #### - 0x18, 0xE0, // ## ### - 0x3E, 0xE0, // ##### ### - 0x3E, 0x60, // ##### ## - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - - // @1880 'O' (14 pixels wide) - 0x00, 0x00, // - 0x00, 0x00, // - 0x07, 0x80, // #### - 0x0F, 0xC0, // ###### - 0x1C, 0xE0, // ### ### - 0x38, 0x70, // ### ### - 0x30, 0x30, // ## ## - 0x30, 0x30, // ## ## - 0x30, 0x30, // ## ## - 0x30, 0x30, // ## ## - 0x38, 0x70, // ### ### - 0x1C, 0xE0, // ### ### - 0x0F, 0xC0, // ###### - 0x07, 0x80, // #### - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - - // @1920 'P' (14 pixels wide) - 0x00, 0x00, // - 0x00, 0x00, // - 0x3F, 0xC0, // ######## - 0x3F, 0xE0, // ######### - 0x18, 0x70, // ## ### - 0x18, 0x30, // ## ## - 0x18, 0x30, // ## ## - 0x18, 0x70, // ## ### - 0x1F, 0xE0, // ######## - 0x1F, 0xC0, // ####### - 0x18, 0x00, // ## - 0x18, 0x00, // ## - 0x3F, 0x00, // ###### - 0x3F, 0x00, // ###### - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - - // @1960 'Q' (14 pixels wide) - 0x00, 0x00, // - 0x00, 0x00, // - 0x07, 0x80, // #### - 0x0F, 0xC0, // ###### - 0x1C, 0xE0, // ### ### - 0x38, 0x70, // ### ### - 0x30, 0x30, // ## ## - 0x30, 0x30, // ## ## - 0x30, 0x30, // ## ## - 0x30, 0x30, // ## ## - 0x38, 0x70, // ### ### - 0x1C, 0xE0, // ### ### - 0x0F, 0xC0, // ###### - 0x07, 0x80, // #### - 0x07, 0xB0, // #### ## - 0x0F, 0xF0, // ######## - 0x0C, 0xE0, // ## ### - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - - // @2000 'R' (14 pixels wide) - 0x00, 0x00, // - 0x00, 0x00, // - 0x3F, 0xC0, // ######## - 0x3F, 0xE0, // ######### - 0x18, 0x70, // ## ### - 0x18, 0x30, // ## ## - 0x18, 0x70, // ## ### - 0x1F, 0xE0, // ######## - 0x1F, 0xC0, // ####### - 0x18, 0xE0, // ## ### - 0x18, 0x60, // ## ## - 0x18, 0x70, // ## ### - 0x3E, 0x38, // ##### ### - 0x3E, 0x18, // ##### ## - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - - // @2040 'S' (14 pixels wide) - 0x00, 0x00, // - 0x00, 0x00, // - 0x0F, 0xB0, // ##### ## - 0x1F, 0xF0, // ######### - 0x38, 0x70, // ### ### - 0x30, 0x30, // ## ## - 0x38, 0x00, // ### - 0x1F, 0x80, // ###### - 0x07, 0xE0, // ###### - 0x00, 0x70, // ### - 0x30, 0x30, // ## ## - 0x38, 0x70, // ### ### - 0x3F, 0xE0, // ######### - 0x37, 0xC0, // ## ##### - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - - // @2080 'T' (14 pixels wide) - 0x00, 0x00, // - 0x00, 0x00, // - 0x3F, 0xF0, // ########## - 0x3F, 0xF0, // ########## - 0x33, 0x30, // ## ## ## - 0x33, 0x30, // ## ## ## - 0x33, 0x30, // ## ## ## - 0x03, 0x00, // ## - 0x03, 0x00, // ## - 0x03, 0x00, // ## - 0x03, 0x00, // ## - 0x03, 0x00, // ## - 0x0F, 0xC0, // ###### - 0x0F, 0xC0, // ###### - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - - // @2120 'U' (14 pixels wide) - 0x00, 0x00, // - 0x00, 0x00, // - 0x3C, 0xF0, // #### #### - 0x3C, 0xF0, // #### #### - 0x18, 0x60, // ## ## - 0x18, 0x60, // ## ## - 0x18, 0x60, // ## ## - 0x18, 0x60, // ## ## - 0x18, 0x60, // ## ## - 0x18, 0x60, // ## ## - 0x18, 0x60, // ## ## - 0x1C, 0xE0, // ### ### - 0x0F, 0xC0, // ###### - 0x07, 0x80, // #### - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - - // @2160 'V' (14 pixels wide) - 0x00, 0x00, // - 0x00, 0x00, // - 0x78, 0xF0, // #### #### - 0x78, 0xF0, // #### #### - 0x30, 0x60, // ## ## - 0x30, 0x60, // ## ## - 0x18, 0xC0, // ## ## - 0x18, 0xC0, // ## ## - 0x0D, 0x80, // ## ## - 0x0D, 0x80, // ## ## - 0x0D, 0x80, // ## ## - 0x07, 0x00, // ### - 0x07, 0x00, // ### - 0x07, 0x00, // ### - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - - // @2200 'W' (14 pixels wide) - 0x00, 0x00, // - 0x00, 0x00, // - 0x7C, 0x7C, // ##### ##### - 0x7C, 0x7C, // ##### ##### - 0x30, 0x18, // ## ## - 0x33, 0x98, // ## ### ## - 0x33, 0x98, // ## ### ## - 0x33, 0x98, // ## ### ## - 0x36, 0xD8, // ## ## ## ## - 0x16, 0xD0, // # ## ## # - 0x1C, 0x70, // ### ### - 0x1C, 0x70, // ### ### - 0x1C, 0x70, // ### ### - 0x18, 0x30, // ## ## - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - - // @2240 'X' (14 pixels wide) - 0x00, 0x00, // - 0x00, 0x00, // - 0x78, 0xF0, // #### #### - 0x78, 0xF0, // #### #### - 0x30, 0x60, // ## ## - 0x18, 0xC0, // ## ## - 0x0D, 0x80, // ## ## - 0x07, 0x00, // ### - 0x07, 0x00, // ### - 0x0D, 0x80, // ## ## - 0x18, 0xC0, // ## ## - 0x30, 0x60, // ## ## - 0x78, 0xF0, // #### #### - 0x78, 0xF0, // #### #### - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - - // @2280 'Y' (14 pixels wide) - 0x00, 0x00, // - 0x00, 0x00, // - 0x3C, 0xF0, // #### #### - 0x3C, 0xF0, // #### #### - 0x18, 0x60, // ## ## - 0x0C, 0xC0, // ## ## - 0x07, 0x80, // #### - 0x07, 0x80, // #### - 0x03, 0x00, // ## - 0x03, 0x00, // ## - 0x03, 0x00, // ## - 0x03, 0x00, // ## - 0x0F, 0xC0, // ###### - 0x0F, 0xC0, // ###### - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - - // @2320 'Z' (14 pixels wide) - 0x00, 0x00, // - 0x00, 0x00, // - 0x1F, 0xE0, // ######## - 0x1F, 0xE0, // ######## - 0x18, 0x60, // ## ## - 0x18, 0xC0, // ## ## - 0x01, 0x80, // ## - 0x03, 0x00, // ## - 0x03, 0x00, // ## - 0x06, 0x00, // ## - 0x0C, 0x60, // ## ## - 0x18, 0x60, // ## ## - 0x1F, 0xE0, // ######## - 0x1F, 0xE0, // ######## - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - - // @2360 '[' (14 pixels wide) - 0x00, 0x00, // - 0x03, 0xC0, // #### - 0x03, 0xC0, // #### - 0x03, 0x00, // ## - 0x03, 0x00, // ## - 0x03, 0x00, // ## - 0x03, 0x00, // ## - 0x03, 0x00, // ## - 0x03, 0x00, // ## - 0x03, 0x00, // ## - 0x03, 0x00, // ## - 0x03, 0x00, // ## - 0x03, 0x00, // ## - 0x03, 0x00, // ## - 0x03, 0x00, // ## - 0x03, 0xC0, // #### - 0x03, 0xC0, // #### - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - - // @2400 '\' (14 pixels wide) - 0x18, 0x00, // ## - 0x18, 0x00, // ## - 0x0C, 0x00, // ## - 0x0C, 0x00, // ## - 0x0C, 0x00, // ## - 0x06, 0x00, // ## - 0x06, 0x00, // ## - 0x03, 0x00, // ## - 0x03, 0x00, // ## - 0x01, 0x80, // ## - 0x01, 0x80, // ## - 0x00, 0xC0, // ## - 0x00, 0xC0, // ## - 0x00, 0xC0, // ## - 0x00, 0x60, // ## - 0x00, 0x60, // ## - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - - // @2440 ']' (14 pixels wide) - 0x00, 0x00, // - 0x0F, 0x00, // #### - 0x0F, 0x00, // #### - 0x03, 0x00, // ## - 0x03, 0x00, // ## - 0x03, 0x00, // ## - 0x03, 0x00, // ## - 0x03, 0x00, // ## - 0x03, 0x00, // ## - 0x03, 0x00, // ## - 0x03, 0x00, // ## - 0x03, 0x00, // ## - 0x03, 0x00, // ## - 0x03, 0x00, // ## - 0x03, 0x00, // ## - 0x0F, 0x00, // #### - 0x0F, 0x00, // #### - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - - // @2480 '^' (14 pixels wide) - 0x00, 0x00, // - 0x02, 0x00, // # - 0x07, 0x00, // ### - 0x0D, 0x80, // ## ## - 0x18, 0xC0, // ## ## - 0x30, 0x60, // ## ## - 0x20, 0x20, // # # - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - - // @2520 '_' (14 pixels wide) - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0xFF, 0xFC, // ############## - 0xFF, 0xFC, // ############## - - // @2560 '`' (14 pixels wide) - 0x00, 0x00, // - 0x04, 0x00, // # - 0x03, 0x00, // ## - 0x00, 0x80, // # - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - - // @2600 'a' (14 pixels wide) - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x0F, 0xC0, // ###### - 0x1F, 0xE0, // ######## - 0x00, 0x60, // ## - 0x0F, 0xE0, // ####### - 0x1F, 0xE0, // ######## - 0x38, 0x60, // ### ## - 0x30, 0xE0, // ## ### - 0x3F, 0xF0, // ########## - 0x1F, 0x70, // ##### ### - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - - // @2640 'b' (14 pixels wide) - 0x00, 0x00, // - 0x70, 0x00, // ### - 0x70, 0x00, // ### - 0x30, 0x00, // ## - 0x30, 0x00, // ## - 0x37, 0x80, // ## #### - 0x3F, 0xE0, // ######### - 0x38, 0x60, // ### ## - 0x30, 0x30, // ## ## - 0x30, 0x30, // ## ## - 0x30, 0x30, // ## ## - 0x38, 0x60, // ### ## - 0x7F, 0xE0, // ########## - 0x77, 0x80, // ### #### - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - - // @2680 'c' (14 pixels wide) - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x07, 0xB0, // #### ## - 0x1F, 0xF0, // ######### - 0x18, 0x30, // ## ## - 0x30, 0x30, // ## ## - 0x30, 0x00, // ## - 0x30, 0x00, // ## - 0x38, 0x30, // ### ## - 0x1F, 0xF0, // ######### - 0x0F, 0xC0, // ###### - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - - // @2720 'd' (14 pixels wide) - 0x00, 0x00, // - 0x00, 0x70, // ### - 0x00, 0x70, // ### - 0x00, 0x30, // ## - 0x00, 0x30, // ## - 0x07, 0xB0, // #### ## - 0x1F, 0xF0, // ######### - 0x18, 0x70, // ## ### - 0x30, 0x30, // ## ## - 0x30, 0x30, // ## ## - 0x30, 0x30, // ## ## - 0x38, 0x70, // ### ### - 0x1F, 0xF8, // ########## - 0x07, 0xB8, // #### ### - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - - // @2760 'e' (14 pixels wide) - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x07, 0x80, // #### - 0x1F, 0xE0, // ######## - 0x18, 0x60, // ## ## - 0x3F, 0xF0, // ########## - 0x3F, 0xF0, // ########## - 0x30, 0x00, // ## - 0x18, 0x30, // ## ## - 0x1F, 0xF0, // ######### - 0x07, 0xC0, // ##### - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - - // @2800 'f' (14 pixels wide) - 0x00, 0x00, // - 0x03, 0xF0, // ###### - 0x07, 0xF0, // ####### - 0x06, 0x00, // ## - 0x06, 0x00, // ## - 0x1F, 0xE0, // ######## - 0x1F, 0xE0, // ######## - 0x06, 0x00, // ## - 0x06, 0x00, // ## - 0x06, 0x00, // ## - 0x06, 0x00, // ## - 0x06, 0x00, // ## - 0x1F, 0xE0, // ######## - 0x1F, 0xE0, // ######## - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - - // @2840 'g' (14 pixels wide) - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x07, 0xB8, // #### ### - 0x1F, 0xF8, // ########## - 0x18, 0x70, // ## ### - 0x30, 0x30, // ## ## - 0x30, 0x30, // ## ## - 0x30, 0x30, // ## ## - 0x18, 0x70, // ## ### - 0x1F, 0xF0, // ######### - 0x07, 0xB0, // #### ## - 0x00, 0x30, // ## - 0x00, 0x70, // ### - 0x0F, 0xE0, // ####### - 0x0F, 0xC0, // ###### - 0x00, 0x00, // - 0x00, 0x00, // - - // @2880 'h' (14 pixels wide) - 0x00, 0x00, // - 0x38, 0x00, // ### - 0x38, 0x00, // ### - 0x18, 0x00, // ## - 0x18, 0x00, // ## - 0x1B, 0xC0, // ## #### - 0x1F, 0xE0, // ######## - 0x1C, 0x60, // ### ## - 0x18, 0x60, // ## ## - 0x18, 0x60, // ## ## - 0x18, 0x60, // ## ## - 0x18, 0x60, // ## ## - 0x3C, 0xF0, // #### #### - 0x3C, 0xF0, // #### #### - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - - // @2920 'i' (14 pixels wide) - 0x00, 0x00, // - 0x03, 0x00, // ## - 0x03, 0x00, // ## - 0x00, 0x00, // - 0x00, 0x00, // - 0x1F, 0x00, // ##### - 0x1F, 0x00, // ##### - 0x03, 0x00, // ## - 0x03, 0x00, // ## - 0x03, 0x00, // ## - 0x03, 0x00, // ## - 0x03, 0x00, // ## - 0x1F, 0xE0, // ######## - 0x1F, 0xE0, // ######## - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - - // @2960 'j' (14 pixels wide) - 0x00, 0x00, // - 0x03, 0x00, // ## - 0x03, 0x00, // ## - 0x00, 0x00, // - 0x00, 0x00, // - 0x1F, 0xC0, // ####### - 0x1F, 0xC0, // ####### - 0x00, 0xC0, // ## - 0x00, 0xC0, // ## - 0x00, 0xC0, // ## - 0x00, 0xC0, // ## - 0x00, 0xC0, // ## - 0x00, 0xC0, // ## - 0x00, 0xC0, // ## - 0x00, 0xC0, // ## - 0x01, 0xC0, // ### - 0x3F, 0x80, // ####### - 0x3F, 0x00, // ###### - 0x00, 0x00, // - 0x00, 0x00, // - - // @3000 'k' (14 pixels wide) - 0x00, 0x00, // - 0x38, 0x00, // ### - 0x38, 0x00, // ### - 0x18, 0x00, // ## - 0x18, 0x00, // ## - 0x1B, 0xE0, // ## ##### - 0x1B, 0xE0, // ## ##### - 0x1B, 0x00, // ## ## - 0x1E, 0x00, // #### - 0x1E, 0x00, // #### - 0x1B, 0x00, // ## ## - 0x19, 0x80, // ## ## - 0x39, 0xF0, // ### ##### - 0x39, 0xF0, // ### ##### - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - - // @3040 'l' (14 pixels wide) - 0x00, 0x00, // - 0x1F, 0x00, // ##### - 0x1F, 0x00, // ##### - 0x03, 0x00, // ## - 0x03, 0x00, // ## - 0x03, 0x00, // ## - 0x03, 0x00, // ## - 0x03, 0x00, // ## - 0x03, 0x00, // ## - 0x03, 0x00, // ## - 0x03, 0x00, // ## - 0x03, 0x00, // ## - 0x1F, 0xE0, // ######## - 0x1F, 0xE0, // ######## - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - - // @3080 'm' (14 pixels wide) - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x7E, 0xE0, // ###### ### - 0x7F, 0xF0, // ########### - 0x33, 0x30, // ## ## ## - 0x33, 0x30, // ## ## ## - 0x33, 0x30, // ## ## ## - 0x33, 0x30, // ## ## ## - 0x33, 0x30, // ## ## ## - 0x7B, 0xB8, // #### ### ### - 0x7B, 0xB8, // #### ### ### - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - - // @3120 'n' (14 pixels wide) - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x3B, 0xC0, // ### #### - 0x3F, 0xE0, // ######### - 0x1C, 0x60, // ### ## - 0x18, 0x60, // ## ## - 0x18, 0x60, // ## ## - 0x18, 0x60, // ## ## - 0x18, 0x60, // ## ## - 0x3C, 0xF0, // #### #### - 0x3C, 0xF0, // #### #### - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - - // @3160 'o' (14 pixels wide) - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x07, 0x80, // #### - 0x1F, 0xE0, // ######## - 0x18, 0x60, // ## ## - 0x30, 0x30, // ## ## - 0x30, 0x30, // ## ## - 0x30, 0x30, // ## ## - 0x18, 0x60, // ## ## - 0x1F, 0xE0, // ######## - 0x07, 0x80, // #### - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - - // @3200 'p' (14 pixels wide) - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x77, 0x80, // ### #### - 0x7F, 0xE0, // ########## - 0x38, 0x60, // ### ## - 0x30, 0x30, // ## ## - 0x30, 0x30, // ## ## - 0x30, 0x30, // ## ## - 0x38, 0x60, // ### ## - 0x3F, 0xE0, // ######### - 0x37, 0x80, // ## #### - 0x30, 0x00, // ## - 0x30, 0x00, // ## - 0x7C, 0x00, // ##### - 0x7C, 0x00, // ##### - 0x00, 0x00, // - 0x00, 0x00, // - - // @3240 'q' (14 pixels wide) - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x07, 0xB8, // #### ### - 0x1F, 0xF8, // ########## - 0x18, 0x70, // ## ### - 0x30, 0x30, // ## ## - 0x30, 0x30, // ## ## - 0x30, 0x30, // ## ## - 0x18, 0x70, // ## ### - 0x1F, 0xF0, // ######### - 0x07, 0xB0, // #### ## - 0x00, 0x30, // ## - 0x00, 0x30, // ## - 0x00, 0xF8, // ##### - 0x00, 0xF8, // ##### - 0x00, 0x00, // - 0x00, 0x00, // - - // @3280 'r' (14 pixels wide) - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x3C, 0xE0, // #### ### - 0x3D, 0xF0, // #### ##### - 0x0F, 0x30, // #### ## - 0x0E, 0x00, // ### - 0x0C, 0x00, // ## - 0x0C, 0x00, // ## - 0x0C, 0x00, // ## - 0x3F, 0xC0, // ######## - 0x3F, 0xC0, // ######## - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - - // @3320 's' (14 pixels wide) - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x07, 0xE0, // ###### - 0x1F, 0xE0, // ######## - 0x18, 0x60, // ## ## - 0x1E, 0x00, // #### - 0x0F, 0xC0, // ###### - 0x01, 0xE0, // #### - 0x18, 0x60, // ## ## - 0x1F, 0xE0, // ######## - 0x1F, 0x80, // ###### - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - - // @3360 't' (14 pixels wide) - 0x00, 0x00, // - 0x00, 0x00, // - 0x0C, 0x00, // ## - 0x0C, 0x00, // ## - 0x0C, 0x00, // ## - 0x3F, 0xE0, // ######### - 0x3F, 0xE0, // ######### - 0x0C, 0x00, // ## - 0x0C, 0x00, // ## - 0x0C, 0x00, // ## - 0x0C, 0x00, // ## - 0x0C, 0x30, // ## ## - 0x0F, 0xF0, // ######## - 0x07, 0xC0, // ##### - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - - // @3400 'u' (14 pixels wide) - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x38, 0xE0, // ### ### - 0x38, 0xE0, // ### ### - 0x18, 0x60, // ## ## - 0x18, 0x60, // ## ## - 0x18, 0x60, // ## ## - 0x18, 0x60, // ## ## - 0x18, 0xE0, // ## ### - 0x1F, 0xF0, // ######### - 0x0F, 0x70, // #### ### - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - - // @3440 'v' (14 pixels wide) - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x78, 0xF0, // #### #### - 0x78, 0xF0, // #### #### - 0x30, 0x60, // ## ## - 0x18, 0xC0, // ## ## - 0x18, 0xC0, // ## ## - 0x0D, 0x80, // ## ## - 0x0D, 0x80, // ## ## - 0x07, 0x00, // ### - 0x07, 0x00, // ### - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - - // @3480 'w' (14 pixels wide) - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x78, 0xF0, // #### #### - 0x78, 0xF0, // #### #### - 0x32, 0x60, // ## # ## - 0x32, 0x60, // ## # ## - 0x37, 0xE0, // ## ###### - 0x1D, 0xC0, // ### ### - 0x1D, 0xC0, // ### ### - 0x18, 0xC0, // ## ## - 0x18, 0xC0, // ## ## - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - - // @3520 'x' (14 pixels wide) - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x3C, 0xF0, // #### #### - 0x3C, 0xF0, // #### #### - 0x0C, 0xC0, // ## ## - 0x07, 0x80, // #### - 0x03, 0x00, // ## - 0x07, 0x80, // #### - 0x0C, 0xC0, // ## ## - 0x3C, 0xF0, // #### #### - 0x3C, 0xF0, // #### #### - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - - // @3560 'y' (14 pixels wide) - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x78, 0xF0, // #### #### - 0x78, 0xF0, // #### #### - 0x30, 0x60, // ## ## - 0x18, 0xC0, // ## ## - 0x18, 0xC0, // ## ## - 0x0D, 0x80, // ## ## - 0x0F, 0x80, // ##### - 0x07, 0x00, // ### - 0x06, 0x00, // ## - 0x06, 0x00, // ## - 0x0C, 0x00, // ## - 0x7F, 0x00, // ####### - 0x7F, 0x00, // ####### - 0x00, 0x00, // - 0x00, 0x00, // - - // @3600 'z' (14 pixels wide) - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x1F, 0xE0, // ######## - 0x1F, 0xE0, // ######## - 0x18, 0xC0, // ## ## - 0x01, 0x80, // ## - 0x03, 0x00, // ## - 0x06, 0x00, // ## - 0x0C, 0x60, // ## ## - 0x1F, 0xE0, // ######## - 0x1F, 0xE0, // ######## - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - - // @3640 '{' (14 pixels wide) - 0x00, 0x00, // - 0x01, 0xC0, // ### - 0x03, 0xC0, // #### - 0x03, 0x00, // ## - 0x03, 0x00, // ## - 0x03, 0x00, // ## - 0x03, 0x00, // ## - 0x03, 0x00, // ## - 0x07, 0x00, // ### - 0x0E, 0x00, // ### - 0x07, 0x00, // ### - 0x03, 0x00, // ## - 0x03, 0x00, // ## - 0x03, 0x00, // ## - 0x03, 0x00, // ## - 0x03, 0xC0, // #### - 0x01, 0xC0, // ### - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - - // @3680 '|' (14 pixels wide) - 0x00, 0x00, // - 0x03, 0x00, // ## - 0x03, 0x00, // ## - 0x03, 0x00, // ## - 0x03, 0x00, // ## - 0x03, 0x00, // ## - 0x03, 0x00, // ## - 0x03, 0x00, // ## - 0x03, 0x00, // ## - 0x03, 0x00, // ## - 0x03, 0x00, // ## - 0x03, 0x00, // ## - 0x03, 0x00, // ## - 0x03, 0x00, // ## - 0x03, 0x00, // ## - 0x03, 0x00, // ## - 0x03, 0x00, // ## - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - - // @3720 '}' (14 pixels wide) - 0x00, 0x00, // - 0x1C, 0x00, // ### - 0x1E, 0x00, // #### - 0x06, 0x00, // ## - 0x06, 0x00, // ## - 0x06, 0x00, // ## - 0x06, 0x00, // ## - 0x06, 0x00, // ## - 0x07, 0x00, // ### - 0x03, 0x80, // ### - 0x07, 0x00, // ### - 0x06, 0x00, // ## - 0x06, 0x00, // ## - 0x06, 0x00, // ## - 0x06, 0x00, // ## - 0x1E, 0x00, // #### - 0x1C, 0x00, // ### - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - - // @3760 '~' (14 pixels wide) - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x0E, 0x00, // ### - 0x3F, 0x30, // ###### ## - 0x33, 0xF0, // ## ###### - 0x01, 0xE0, // #### - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // - 0x00, 0x00, // -}; - - -sFONT Font20 = { - Font20_Table, - 14, /* Width */ - 20, /* Height */ -}; - -/** - * @} - */ - - -/** @defgroup FONTS_Private_Function_Prototypes - * @{ - */ -/** - * @} - */ - - -/** @defgroup FONTS_Private_Functions - * @{ - */ - -/** - * @} - */ - -/** - * @} - */ - -/** - * @} - */ - -/** - * @} - */ - -/** - * @} - */ -/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
--- a/Fonts/font24.c Mon May 30 11:09:05 2016 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,2600 +0,0 @@ -/** - ****************************************************************************** - * @file font24.c - * @author MCD Application Team - * @version V1.0.0 - * @date 18-February-2014 - * @brief This file provides text font24 for STM32xx-EVAL's LCD driver. - ****************************************************************************** - * @attention - * - * <h2><center>© COPYRIGHT(c) 2014 STMicroelectronics</center></h2> - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. Neither the name of STMicroelectronics nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - ****************************************************************************** - */ - -/* Includes ------------------------------------------------------------------*/ -#include "fonts.h" - -/** @addtogroup Utilities - * @{ - */ - -/** @addtogroup STM32_EVAL - * @{ - */ - -/** @addtogroup Common - * @{ - */ - -/** @addtogroup FONTS - * @brief This file provides text font24 for STM32xx-EVAL's LCD driver. - * @{ - */ - -/** @defgroup FONTS_Private_Types - * @{ - */ -/** - * @} - */ - - -/** @defgroup FONTS_Private_Defines - * @{ - */ -/** - * @} - */ - - -/** @defgroup FONTS_Private_Macros - * @{ - */ -/** - * @} - */ - - -/** @defgroup FONTS_Private_Variables - * @{ - */ -const uint8_t Font24_Table [] = -{ - // @0 ' ' (17 pixels wide) - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - - // @72 '!' (17 pixels wide) - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x03, 0x80, 0x00, // ### - 0x03, 0x80, 0x00, // ### - 0x03, 0x80, 0x00, // ### - 0x03, 0x80, 0x00, // ### - 0x03, 0x80, 0x00, // ### - 0x03, 0x80, 0x00, // ### - 0x03, 0x80, 0x00, // ### - 0x03, 0x80, 0x00, // ### - 0x03, 0x80, 0x00, // ### - 0x01, 0x00, 0x00, // # - 0x01, 0x00, 0x00, // # - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x03, 0x80, 0x00, // ### - 0x03, 0x80, 0x00, // ### - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - - // @144 '"' (17 pixels wide) - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x0E, 0x70, 0x00, // ### ### - 0x0E, 0x70, 0x00, // ### ### - 0x0E, 0x70, 0x00, // ### ### - 0x04, 0x20, 0x00, // # # - 0x04, 0x20, 0x00, // # # - 0x04, 0x20, 0x00, // # # - 0x04, 0x20, 0x00, // # # - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - - // @216 '#' (17 pixels wide) - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x06, 0x60, 0x00, // ## ## - 0x06, 0x60, 0x00, // ## ## - 0x06, 0x60, 0x00, // ## ## - 0x06, 0x60, 0x00, // ## ## - 0x06, 0x60, 0x00, // ## ## - 0x3F, 0xF8, 0x00, // ########### - 0x3F, 0xF8, 0x00, // ########### - 0x06, 0x60, 0x00, // ## ## - 0x0C, 0xC0, 0x00, // ## ## - 0x3F, 0xF8, 0x00, // ########### - 0x3F, 0xF8, 0x00, // ########### - 0x0C, 0xC0, 0x00, // ## ## - 0x0C, 0xC0, 0x00, // ## ## - 0x0C, 0xC0, 0x00, // ## ## - 0x0C, 0xC0, 0x00, // ## ## - 0x0C, 0xC0, 0x00, // ## ## - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - - // @288 '$' (17 pixels wide) - 0x00, 0x00, 0x00, // - 0x01, 0x80, 0x00, // ## - 0x01, 0x80, 0x00, // ## - 0x07, 0xB0, 0x00, // #### ## - 0x0F, 0xF0, 0x00, // ######## - 0x18, 0x70, 0x00, // ## ### - 0x18, 0x70, 0x00, // ## ### - 0x1C, 0x00, 0x00, // ### - 0x0F, 0x80, 0x00, // ##### - 0x07, 0xE0, 0x00, // ###### - 0x00, 0xF0, 0x00, // #### - 0x18, 0x30, 0x00, // ## ## - 0x1C, 0x30, 0x00, // ### ## - 0x1C, 0x70, 0x00, // ### ### - 0x1F, 0xE0, 0x00, // ######## - 0x1B, 0xC0, 0x00, // ## #### - 0x01, 0x80, 0x00, // ## - 0x01, 0x80, 0x00, // ## - 0x01, 0x80, 0x00, // ## - 0x01, 0x80, 0x00, // ## - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - - // @360 '%' (17 pixels wide) - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x07, 0x80, 0x00, // #### - 0x0F, 0xC0, 0x00, // ###### - 0x1C, 0xE0, 0x00, // ### ### - 0x18, 0x60, 0x00, // ## ## - 0x18, 0x60, 0x00, // ## ## - 0x1C, 0xE0, 0x00, // ### ### - 0x0F, 0xF8, 0x00, // ######### - 0x07, 0xE0, 0x00, // ###### - 0x1F, 0xF0, 0x00, // ######### - 0x07, 0x38, 0x00, // ### ### - 0x06, 0x18, 0x00, // ## ## - 0x06, 0x18, 0x00, // ## ## - 0x07, 0x38, 0x00, // ### ### - 0x03, 0xF0, 0x00, // ###### - 0x01, 0xE0, 0x00, // #### - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - - // @432 '&' (17 pixels wide) - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x03, 0xF0, 0x00, // ###### - 0x07, 0xF0, 0x00, // ####### - 0x0C, 0x60, 0x00, // ## ## - 0x0C, 0x00, 0x00, // ## - 0x0C, 0x00, 0x00, // ## - 0x06, 0x00, 0x00, // ## - 0x07, 0x00, 0x00, // ### - 0x0F, 0x9C, 0x00, // ##### ### - 0x1D, 0xFC, 0x00, // ### ####### - 0x18, 0xF0, 0x00, // ## #### - 0x18, 0x70, 0x00, // ## ### - 0x0F, 0xFC, 0x00, // ########## - 0x07, 0xDC, 0x00, // ##### ### - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - - // @504 ''' (17 pixels wide) - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x03, 0x80, 0x00, // ### - 0x03, 0x80, 0x00, // ### - 0x03, 0x80, 0x00, // ### - 0x01, 0x00, 0x00, // # - 0x01, 0x00, 0x00, // # - 0x01, 0x00, 0x00, // # - 0x01, 0x00, 0x00, // # - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - - // @576 '(' (17 pixels wide) - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x18, 0x00, // ## - 0x00, 0x38, 0x00, // ### - 0x00, 0x70, 0x00, // ### - 0x00, 0xF0, 0x00, // #### - 0x00, 0xE0, 0x00, // ### - 0x00, 0xE0, 0x00, // ### - 0x01, 0xC0, 0x00, // ### - 0x01, 0xC0, 0x00, // ### - 0x01, 0xC0, 0x00, // ### - 0x01, 0xC0, 0x00, // ### - 0x01, 0xC0, 0x00, // ### - 0x01, 0xC0, 0x00, // ### - 0x00, 0xE0, 0x00, // ### - 0x00, 0xE0, 0x00, // ### - 0x00, 0x70, 0x00, // ### - 0x00, 0x70, 0x00, // ### - 0x00, 0x38, 0x00, // ### - 0x00, 0x18, 0x00, // ## - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - - // @648 ')' (17 pixels wide) - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x18, 0x00, 0x00, // ## - 0x1C, 0x00, 0x00, // ### - 0x0E, 0x00, 0x00, // ### - 0x0E, 0x00, 0x00, // ### - 0x07, 0x00, 0x00, // ### - 0x07, 0x00, 0x00, // ### - 0x03, 0x80, 0x00, // ### - 0x03, 0x80, 0x00, // ### - 0x03, 0x80, 0x00, // ### - 0x03, 0x80, 0x00, // ### - 0x03, 0x80, 0x00, // ### - 0x03, 0x80, 0x00, // ### - 0x07, 0x00, 0x00, // ### - 0x07, 0x00, 0x00, // ### - 0x0F, 0x00, 0x00, // #### - 0x0E, 0x00, 0x00, // ### - 0x1C, 0x00, 0x00, // ### - 0x18, 0x00, 0x00, // ## - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - - // @720 '*' (17 pixels wide) - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x01, 0x80, 0x00, // ## - 0x01, 0x80, 0x00, // ## - 0x01, 0x80, 0x00, // ## - 0x1D, 0xB8, 0x00, // ### ## ### - 0x1F, 0xF8, 0x00, // ########## - 0x07, 0xE0, 0x00, // ###### - 0x03, 0xC0, 0x00, // #### - 0x03, 0xC0, 0x00, // #### - 0x06, 0x60, 0x00, // ## ## - 0x06, 0x60, 0x00, // ## ## - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - - // @792 '+' (17 pixels wide) - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x01, 0x80, 0x00, // ## - 0x01, 0x80, 0x00, // ## - 0x01, 0x80, 0x00, // ## - 0x01, 0x80, 0x00, // ## - 0x01, 0x80, 0x00, // ## - 0x3F, 0xFC, 0x00, // ############ - 0x3F, 0xFC, 0x00, // ############ - 0x01, 0x80, 0x00, // ## - 0x01, 0x80, 0x00, // ## - 0x01, 0x80, 0x00, // ## - 0x01, 0x80, 0x00, // ## - 0x01, 0x80, 0x00, // ## - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - - // @864 ',' (17 pixels wide) - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0xE0, 0x00, // ### - 0x00, 0xC0, 0x00, // ## - 0x01, 0xC0, 0x00, // ### - 0x01, 0x80, 0x00, // ## - 0x01, 0x80, 0x00, // ## - 0x03, 0x00, 0x00, // ## - 0x03, 0x00, 0x00, // ## - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - - // @936 '-' (17 pixels wide) - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x1F, 0xF8, 0x00, // ########## - 0x1F, 0xF8, 0x00, // ########## - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - - // @1008 '.' (17 pixels wide) - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x03, 0xC0, 0x00, // #### - 0x03, 0xC0, 0x00, // #### - 0x03, 0xC0, 0x00, // #### - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - - // @1080 '/' (17 pixels wide) - 0x00, 0x18, 0x00, // ## - 0x00, 0x18, 0x00, // ## - 0x00, 0x38, 0x00, // ### - 0x00, 0x30, 0x00, // ## - 0x00, 0x70, 0x00, // ### - 0x00, 0x60, 0x00, // ## - 0x00, 0x60, 0x00, // ## - 0x00, 0xC0, 0x00, // ## - 0x00, 0xC0, 0x00, // ## - 0x01, 0x80, 0x00, // ## - 0x01, 0x80, 0x00, // ## - 0x03, 0x00, 0x00, // ## - 0x03, 0x00, 0x00, // ## - 0x06, 0x00, 0x00, // ## - 0x06, 0x00, 0x00, // ## - 0x0E, 0x00, 0x00, // ### - 0x0C, 0x00, 0x00, // ## - 0x1C, 0x00, 0x00, // ### - 0x18, 0x00, 0x00, // ## - 0x18, 0x00, 0x00, // ## - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - - // @1152 '0' (17 pixels wide) - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x03, 0xC0, 0x00, // #### - 0x07, 0xE0, 0x00, // ###### - 0x0C, 0x30, 0x00, // ## ## - 0x0C, 0x30, 0x00, // ## ## - 0x18, 0x18, 0x00, // ## ## - 0x18, 0x18, 0x00, // ## ## - 0x18, 0x18, 0x00, // ## ## - 0x18, 0x18, 0x00, // ## ## - 0x18, 0x18, 0x00, // ## ## - 0x18, 0x18, 0x00, // ## ## - 0x18, 0x18, 0x00, // ## ## - 0x0C, 0x30, 0x00, // ## ## - 0x0C, 0x30, 0x00, // ## ## - 0x07, 0xE0, 0x00, // ###### - 0x03, 0xC0, 0x00, // #### - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - - // @1224 '1' (17 pixels wide) - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x80, 0x00, // # - 0x07, 0x80, 0x00, // #### - 0x1F, 0x80, 0x00, // ###### - 0x1D, 0x80, 0x00, // ### ## - 0x01, 0x80, 0x00, // ## - 0x01, 0x80, 0x00, // ## - 0x01, 0x80, 0x00, // ## - 0x01, 0x80, 0x00, // ## - 0x01, 0x80, 0x00, // ## - 0x01, 0x80, 0x00, // ## - 0x01, 0x80, 0x00, // ## - 0x01, 0x80, 0x00, // ## - 0x01, 0x80, 0x00, // ## - 0x1F, 0xF8, 0x00, // ########## - 0x1F, 0xF8, 0x00, // ########## - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - - // @1296 '2' (17 pixels wide) - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x07, 0xC0, 0x00, // ##### - 0x1F, 0xF0, 0x00, // ######### - 0x38, 0x30, 0x00, // ### ## - 0x30, 0x18, 0x00, // ## ## - 0x30, 0x18, 0x00, // ## ## - 0x00, 0x18, 0x00, // ## - 0x00, 0x30, 0x00, // ## - 0x00, 0x60, 0x00, // ## - 0x01, 0xC0, 0x00, // ### - 0x03, 0x80, 0x00, // ### - 0x06, 0x00, 0x00, // ## - 0x0C, 0x00, 0x00, // ## - 0x18, 0x00, 0x00, // ## - 0x3F, 0xF8, 0x00, // ########### - 0x3F, 0xF8, 0x00, // ########### - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - - // @1368 '3' (17 pixels wide) - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x03, 0xC0, 0x00, // #### - 0x0F, 0xE0, 0x00, // ####### - 0x0C, 0x70, 0x00, // ## ### - 0x00, 0x30, 0x00, // ## - 0x00, 0x30, 0x00, // ## - 0x00, 0x60, 0x00, // ## - 0x03, 0xC0, 0x00, // #### - 0x03, 0xE0, 0x00, // ##### - 0x00, 0x70, 0x00, // ### - 0x00, 0x18, 0x00, // ## - 0x00, 0x18, 0x00, // ## - 0x00, 0x18, 0x00, // ## - 0x18, 0x38, 0x00, // ## ### - 0x1F, 0xF0, 0x00, // ######### - 0x0F, 0xC0, 0x00, // ###### - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - - // @1440 '4' (17 pixels wide) - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0xE0, 0x00, // ### - 0x01, 0xE0, 0x00, // #### - 0x01, 0xE0, 0x00, // #### - 0x03, 0x60, 0x00, // ## ## - 0x06, 0x60, 0x00, // ## ## - 0x06, 0x60, 0x00, // ## ## - 0x0C, 0x60, 0x00, // ## ## - 0x0C, 0x60, 0x00, // ## ## - 0x18, 0x60, 0x00, // ## ## - 0x30, 0x60, 0x00, // ## ## - 0x3F, 0xF8, 0x00, // ########### - 0x3F, 0xF8, 0x00, // ########### - 0x00, 0x60, 0x00, // ## - 0x03, 0xF8, 0x00, // ####### - 0x03, 0xF8, 0x00, // ####### - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - - // @1512 '5' (17 pixels wide) - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x1F, 0xF0, 0x00, // ######### - 0x1F, 0xF0, 0x00, // ######### - 0x18, 0x00, 0x00, // ## - 0x18, 0x00, 0x00, // ## - 0x18, 0x00, 0x00, // ## - 0x1B, 0xC0, 0x00, // ## #### - 0x1F, 0xF0, 0x00, // ######### - 0x1C, 0x30, 0x00, // ### ## - 0x00, 0x18, 0x00, // ## - 0x00, 0x18, 0x00, // ## - 0x00, 0x18, 0x00, // ## - 0x00, 0x18, 0x00, // ## - 0x30, 0x30, 0x00, // ## ## - 0x3F, 0xF0, 0x00, // ########## - 0x0F, 0xC0, 0x00, // ###### - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - - // @1584 '6' (17 pixels wide) - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0xF8, 0x00, // ##### - 0x03, 0xF8, 0x00, // ####### - 0x07, 0x00, 0x00, // ### - 0x0E, 0x00, 0x00, // ### - 0x0C, 0x00, 0x00, // ## - 0x18, 0x00, 0x00, // ## - 0x1B, 0xC0, 0x00, // ## #### - 0x1F, 0xF0, 0x00, // ######### - 0x1C, 0x30, 0x00, // ### ## - 0x18, 0x18, 0x00, // ## ## - 0x18, 0x18, 0x00, // ## ## - 0x18, 0x18, 0x00, // ## ## - 0x0C, 0x38, 0x00, // ## ### - 0x0F, 0xF0, 0x00, // ######## - 0x03, 0xE0, 0x00, // ##### - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - - // @1656 '7' (17 pixels wide) - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x1F, 0xF8, 0x00, // ########## - 0x1F, 0xF8, 0x00, // ########## - 0x18, 0x18, 0x00, // ## ## - 0x18, 0x38, 0x00, // ## ### - 0x00, 0x30, 0x00, // ## - 0x00, 0x30, 0x00, // ## - 0x00, 0x70, 0x00, // ### - 0x00, 0x60, 0x00, // ## - 0x00, 0x60, 0x00, // ## - 0x00, 0xE0, 0x00, // ### - 0x00, 0xC0, 0x00, // ## - 0x00, 0xC0, 0x00, // ## - 0x01, 0xC0, 0x00, // ### - 0x01, 0x80, 0x00, // ## - 0x01, 0x80, 0x00, // ## - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - - // @1728 '8' (17 pixels wide) - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x07, 0xE0, 0x00, // ###### - 0x0F, 0xF0, 0x00, // ######## - 0x1C, 0x38, 0x00, // ### ### - 0x18, 0x18, 0x00, // ## ## - 0x18, 0x18, 0x00, // ## ## - 0x0C, 0x30, 0x00, // ## ## - 0x07, 0xE0, 0x00, // ###### - 0x07, 0xE0, 0x00, // ###### - 0x0C, 0x30, 0x00, // ## ## - 0x18, 0x18, 0x00, // ## ## - 0x18, 0x18, 0x00, // ## ## - 0x18, 0x18, 0x00, // ## ## - 0x1C, 0x38, 0x00, // ### ### - 0x0F, 0xF0, 0x00, // ######## - 0x07, 0xE0, 0x00, // ###### - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - - // @1800 '9' (17 pixels wide) - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x07, 0xC0, 0x00, // ##### - 0x0F, 0xF0, 0x00, // ######## - 0x1C, 0x30, 0x00, // ### ## - 0x18, 0x18, 0x00, // ## ## - 0x18, 0x18, 0x00, // ## ## - 0x18, 0x18, 0x00, // ## ## - 0x0C, 0x38, 0x00, // ## ### - 0x0F, 0xF8, 0x00, // ######### - 0x03, 0xD8, 0x00, // #### ## - 0x00, 0x18, 0x00, // ## - 0x00, 0x30, 0x00, // ## - 0x00, 0x70, 0x00, // ### - 0x00, 0xE0, 0x00, // ### - 0x1F, 0xC0, 0x00, // ####### - 0x1F, 0x00, 0x00, // ##### - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - - // @1872 ':' (17 pixels wide) - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x03, 0xC0, 0x00, // #### - 0x03, 0xC0, 0x00, // #### - 0x03, 0xC0, 0x00, // #### - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x03, 0xC0, 0x00, // #### - 0x03, 0xC0, 0x00, // #### - 0x03, 0xC0, 0x00, // #### - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - - // @1944 ';' (17 pixels wide) - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0xF0, 0x00, // #### - 0x00, 0xF0, 0x00, // #### - 0x00, 0xF0, 0x00, // #### - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0xE0, 0x00, // ### - 0x01, 0xC0, 0x00, // ### - 0x01, 0x80, 0x00, // ## - 0x01, 0x80, 0x00, // ## - 0x03, 0x00, 0x00, // ## - 0x02, 0x00, 0x00, // # - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - - // @2016 '<' (17 pixels wide) - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x1C, 0x00, // ### - 0x00, 0x3C, 0x00, // #### - 0x00, 0xF0, 0x00, // #### - 0x03, 0xC0, 0x00, // #### - 0x0F, 0x00, 0x00, // #### - 0x3C, 0x00, 0x00, // #### - 0xF0, 0x00, 0x00, // #### - 0x3C, 0x00, 0x00, // #### - 0x0F, 0x00, 0x00, // #### - 0x03, 0xC0, 0x00, // #### - 0x00, 0xF0, 0x00, // #### - 0x00, 0x3C, 0x00, // #### - 0x00, 0x1C, 0x00, // ### - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - - // @2088 '=' (17 pixels wide) - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x7F, 0xFC, 0x00, // ############# - 0x7F, 0xFC, 0x00, // ############# - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x7F, 0xFC, 0x00, // ############# - 0x7F, 0xFC, 0x00, // ############# - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - - // @2160 '>' (17 pixels wide) - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x70, 0x00, 0x00, // ### - 0x78, 0x00, 0x00, // #### - 0x1E, 0x00, 0x00, // #### - 0x07, 0x80, 0x00, // #### - 0x01, 0xE0, 0x00, // #### - 0x00, 0x78, 0x00, // #### - 0x00, 0x1E, 0x00, // #### - 0x00, 0x78, 0x00, // #### - 0x01, 0xE0, 0x00, // #### - 0x07, 0x80, 0x00, // #### - 0x1E, 0x00, 0x00, // #### - 0x78, 0x00, 0x00, // #### - 0x70, 0x00, 0x00, // ### - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - - // @2232 '?' (17 pixels wide) - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x07, 0xC0, 0x00, // ##### - 0x0F, 0xE0, 0x00, // ####### - 0x18, 0x70, 0x00, // ## ### - 0x18, 0x30, 0x00, // ## ## - 0x18, 0x30, 0x00, // ## ## - 0x00, 0x70, 0x00, // ### - 0x00, 0xE0, 0x00, // ### - 0x03, 0xC0, 0x00, // #### - 0x03, 0x80, 0x00, // ### - 0x03, 0x00, 0x00, // ## - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x07, 0x00, 0x00, // ### - 0x07, 0x00, 0x00, // ### - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - - // @2304 '@' (17 pixels wide) - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x03, 0xE0, 0x00, // ##### - 0x07, 0xF0, 0x00, // ####### - 0x0E, 0x38, 0x00, // ### ### - 0x0C, 0x18, 0x00, // ## ## - 0x18, 0x78, 0x00, // ## #### - 0x18, 0xF8, 0x00, // ## ##### - 0x19, 0xD8, 0x00, // ## ### ## - 0x19, 0x98, 0x00, // ## ## ## - 0x19, 0x98, 0x00, // ## ## ## - 0x19, 0x98, 0x00, // ## ## ## - 0x18, 0xF8, 0x00, // ## ##### - 0x18, 0x78, 0x00, // ## #### - 0x18, 0x00, 0x00, // ## - 0x0C, 0x00, 0x00, // ## - 0x0E, 0x18, 0x00, // ### ## - 0x07, 0xF8, 0x00, // ######## - 0x03, 0xE0, 0x00, // ##### - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - - // @2376 'A' (17 pixels wide) - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x1F, 0x80, 0x00, // ###### - 0x1F, 0xC0, 0x00, // ####### - 0x01, 0xC0, 0x00, // ### - 0x03, 0x60, 0x00, // ## ## - 0x03, 0x60, 0x00, // ## ## - 0x06, 0x30, 0x00, // ## ## - 0x06, 0x30, 0x00, // ## ## - 0x0C, 0x30, 0x00, // ## ## - 0x0F, 0xF8, 0x00, // ######### - 0x1F, 0xF8, 0x00, // ########## - 0x18, 0x0C, 0x00, // ## ## - 0x30, 0x0C, 0x00, // ## ## - 0xFC, 0x7F, 0x00, // ###### ####### - 0xFC, 0x7F, 0x00, // ###### ####### - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - - // @2448 'B' (17 pixels wide) - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x7F, 0xE0, 0x00, // ########## - 0x7F, 0xF0, 0x00, // ########### - 0x18, 0x38, 0x00, // ## ### - 0x18, 0x18, 0x00, // ## ## - 0x18, 0x18, 0x00, // ## ## - 0x18, 0x38, 0x00, // ## ### - 0x1F, 0xF0, 0x00, // ######### - 0x1F, 0xF8, 0x00, // ########## - 0x18, 0x1C, 0x00, // ## ### - 0x18, 0x0C, 0x00, // ## ## - 0x18, 0x0C, 0x00, // ## ## - 0x18, 0x0C, 0x00, // ## ## - 0x7F, 0xF8, 0x00, // ############ - 0x7F, 0xF0, 0x00, // ########### - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - - // @2520 'C' (17 pixels wide) - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x03, 0xEC, 0x00, // ##### ## - 0x0F, 0xFC, 0x00, // ########## - 0x1C, 0x1C, 0x00, // ### ### - 0x18, 0x0C, 0x00, // ## ## - 0x30, 0x0C, 0x00, // ## ## - 0x30, 0x00, 0x00, // ## - 0x30, 0x00, 0x00, // ## - 0x30, 0x00, 0x00, // ## - 0x30, 0x00, 0x00, // ## - 0x30, 0x00, 0x00, // ## - 0x18, 0x0C, 0x00, // ## ## - 0x1C, 0x1C, 0x00, // ### ### - 0x0F, 0xF8, 0x00, // ######### - 0x03, 0xF0, 0x00, // ###### - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - - // @2592 'D' (17 pixels wide) - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x7F, 0xC0, 0x00, // ######### - 0x7F, 0xF0, 0x00, // ########### - 0x18, 0x38, 0x00, // ## ### - 0x18, 0x18, 0x00, // ## ## - 0x18, 0x0C, 0x00, // ## ## - 0x18, 0x0C, 0x00, // ## ## - 0x18, 0x0C, 0x00, // ## ## - 0x18, 0x0C, 0x00, // ## ## - 0x18, 0x0C, 0x00, // ## ## - 0x18, 0x0C, 0x00, // ## ## - 0x18, 0x18, 0x00, // ## ## - 0x18, 0x38, 0x00, // ## ### - 0x7F, 0xF0, 0x00, // ########### - 0x7F, 0xE0, 0x00, // ########## - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - - // @2664 'E' (17 pixels wide) - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x7F, 0xF8, 0x00, // ############ - 0x7F, 0xF8, 0x00, // ############ - 0x18, 0x18, 0x00, // ## ## - 0x18, 0x18, 0x00, // ## ## - 0x19, 0x98, 0x00, // ## ## ## - 0x19, 0x80, 0x00, // ## ## - 0x1F, 0x80, 0x00, // ###### - 0x1F, 0x80, 0x00, // ###### - 0x19, 0x80, 0x00, // ## ## - 0x19, 0x98, 0x00, // ## ## ## - 0x18, 0x18, 0x00, // ## ## - 0x18, 0x18, 0x00, // ## ## - 0x7F, 0xF8, 0x00, // ############ - 0x7F, 0xF8, 0x00, // ############ - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - - // @2736 'F' (17 pixels wide) - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x3F, 0xFC, 0x00, // ############ - 0x3F, 0xFC, 0x00, // ############ - 0x0C, 0x0C, 0x00, // ## ## - 0x0C, 0x0C, 0x00, // ## ## - 0x0C, 0xCC, 0x00, // ## ## ## - 0x0C, 0xC0, 0x00, // ## ## - 0x0F, 0xC0, 0x00, // ###### - 0x0F, 0xC0, 0x00, // ###### - 0x0C, 0xC0, 0x00, // ## ## - 0x0C, 0xC0, 0x00, // ## ## - 0x0C, 0x00, 0x00, // ## - 0x0C, 0x00, 0x00, // ## - 0x3F, 0xC0, 0x00, // ######## - 0x3F, 0xC0, 0x00, // ######## - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - - // @2808 'G' (17 pixels wide) - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x03, 0xEC, 0x00, // ##### ## - 0x0F, 0xFC, 0x00, // ########## - 0x1C, 0x1C, 0x00, // ### ### - 0x18, 0x0C, 0x00, // ## ## - 0x30, 0x0C, 0x00, // ## ## - 0x30, 0x00, 0x00, // ## - 0x30, 0x00, 0x00, // ## - 0x30, 0xFE, 0x00, // ## ####### - 0x30, 0xFE, 0x00, // ## ####### - 0x30, 0x0C, 0x00, // ## ## - 0x38, 0x0C, 0x00, // ### ## - 0x1C, 0x1C, 0x00, // ### ### - 0x0F, 0xFC, 0x00, // ########## - 0x03, 0xF0, 0x00, // ###### - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - - // @2880 'H' (17 pixels wide) - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x7E, 0x7E, 0x00, // ###### ###### - 0x7E, 0x7E, 0x00, // ###### ###### - 0x18, 0x18, 0x00, // ## ## - 0x18, 0x18, 0x00, // ## ## - 0x18, 0x18, 0x00, // ## ## - 0x18, 0x18, 0x00, // ## ## - 0x1F, 0xF8, 0x00, // ########## - 0x1F, 0xF8, 0x00, // ########## - 0x18, 0x18, 0x00, // ## ## - 0x18, 0x18, 0x00, // ## ## - 0x18, 0x18, 0x00, // ## ## - 0x18, 0x18, 0x00, // ## ## - 0x7E, 0x7E, 0x00, // ###### ###### - 0x7E, 0x7E, 0x00, // ###### ###### - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - - // @2952 'I' (17 pixels wide) - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x1F, 0xF8, 0x00, // ########## - 0x1F, 0xF8, 0x00, // ########## - 0x01, 0x80, 0x00, // ## - 0x01, 0x80, 0x00, // ## - 0x01, 0x80, 0x00, // ## - 0x01, 0x80, 0x00, // ## - 0x01, 0x80, 0x00, // ## - 0x01, 0x80, 0x00, // ## - 0x01, 0x80, 0x00, // ## - 0x01, 0x80, 0x00, // ## - 0x01, 0x80, 0x00, // ## - 0x01, 0x80, 0x00, // ## - 0x1F, 0xF8, 0x00, // ########## - 0x1F, 0xF8, 0x00, // ########## - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - - // @3024 'J' (17 pixels wide) - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x07, 0xFE, 0x00, // ########## - 0x07, 0xFE, 0x00, // ########## - 0x00, 0x30, 0x00, // ## - 0x00, 0x30, 0x00, // ## - 0x00, 0x30, 0x00, // ## - 0x00, 0x30, 0x00, // ## - 0x00, 0x30, 0x00, // ## - 0x30, 0x30, 0x00, // ## ## - 0x30, 0x30, 0x00, // ## ## - 0x30, 0x30, 0x00, // ## ## - 0x30, 0x30, 0x00, // ## ## - 0x30, 0x60, 0x00, // ## ## - 0x3F, 0xE0, 0x00, // ######### - 0x0F, 0x80, 0x00, // ##### - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - - // @3096 'K' (17 pixels wide) - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x7F, 0x3E, 0x00, // ####### ##### - 0x7F, 0x3E, 0x00, // ####### ##### - 0x18, 0x30, 0x00, // ## ## - 0x18, 0x60, 0x00, // ## ## - 0x18, 0xC0, 0x00, // ## ## - 0x19, 0x80, 0x00, // ## ## - 0x1B, 0x80, 0x00, // ## ### - 0x1F, 0xC0, 0x00, // ####### - 0x1C, 0xE0, 0x00, // ### ### - 0x18, 0x70, 0x00, // ## ### - 0x18, 0x30, 0x00, // ## ## - 0x18, 0x38, 0x00, // ## ### - 0x7F, 0x1F, 0x00, // ####### ##### - 0x7F, 0x1F, 0x00, // ####### ##### - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - - // @3168 'L' (17 pixels wide) - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x7F, 0x80, 0x00, // ######## - 0x7F, 0x80, 0x00, // ######## - 0x0C, 0x00, 0x00, // ## - 0x0C, 0x00, 0x00, // ## - 0x0C, 0x00, 0x00, // ## - 0x0C, 0x00, 0x00, // ## - 0x0C, 0x00, 0x00, // ## - 0x0C, 0x00, 0x00, // ## - 0x0C, 0x0C, 0x00, // ## ## - 0x0C, 0x0C, 0x00, // ## ## - 0x0C, 0x0C, 0x00, // ## ## - 0x0C, 0x0C, 0x00, // ## ## - 0x7F, 0xFC, 0x00, // ############# - 0x7F, 0xFC, 0x00, // ############# - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - - // @3240 'M' (17 pixels wide) - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0xF0, 0x0F, 0x00, // #### #### - 0xF8, 0x1F, 0x00, // ##### ##### - 0x38, 0x1C, 0x00, // ### ### - 0x3C, 0x3C, 0x00, // #### #### - 0x3C, 0x3C, 0x00, // #### #### - 0x36, 0x6C, 0x00, // ## ## ## ## - 0x36, 0x6C, 0x00, // ## ## ## ## - 0x33, 0xCC, 0x00, // ## #### ## - 0x33, 0xCC, 0x00, // ## #### ## - 0x31, 0x8C, 0x00, // ## ## ## - 0x30, 0x0C, 0x00, // ## ## - 0x30, 0x0C, 0x00, // ## ## - 0xFE, 0x7F, 0x00, // ####### ####### - 0xFE, 0x7F, 0x00, // ####### ####### - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - - // @3312 'N' (17 pixels wide) - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x78, 0xFE, 0x00, // #### ####### - 0x78, 0xFE, 0x00, // #### ####### - 0x1C, 0x18, 0x00, // ### ## - 0x1E, 0x18, 0x00, // #### ## - 0x1F, 0x18, 0x00, // ##### ## - 0x1B, 0x18, 0x00, // ## ## ## - 0x1B, 0x98, 0x00, // ## ### ## - 0x19, 0xD8, 0x00, // ## ### ## - 0x18, 0xD8, 0x00, // ## ## ## - 0x18, 0xF8, 0x00, // ## ##### - 0x18, 0x78, 0x00, // ## #### - 0x18, 0x38, 0x00, // ## ### - 0x7F, 0x18, 0x00, // ####### ## - 0x7F, 0x18, 0x00, // ####### ## - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - - // @3384 'O' (17 pixels wide) - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x03, 0xC0, 0x00, // #### - 0x0F, 0xF0, 0x00, // ######## - 0x1C, 0x38, 0x00, // ### ### - 0x18, 0x18, 0x00, // ## ## - 0x38, 0x1C, 0x00, // ### ### - 0x30, 0x0C, 0x00, // ## ## - 0x30, 0x0C, 0x00, // ## ## - 0x30, 0x0C, 0x00, // ## ## - 0x30, 0x0C, 0x00, // ## ## - 0x38, 0x1C, 0x00, // ### ### - 0x18, 0x18, 0x00, // ## ## - 0x1C, 0x38, 0x00, // ### ### - 0x0F, 0xF0, 0x00, // ######## - 0x03, 0xC0, 0x00, // #### - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - - // @3456 'P' (17 pixels wide) - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x3F, 0xF0, 0x00, // ########## - 0x3F, 0xF8, 0x00, // ########### - 0x0C, 0x1C, 0x00, // ## ### - 0x0C, 0x0C, 0x00, // ## ## - 0x0C, 0x0C, 0x00, // ## ## - 0x0C, 0x0C, 0x00, // ## ## - 0x0C, 0x18, 0x00, // ## ## - 0x0F, 0xF8, 0x00, // ######### - 0x0F, 0xE0, 0x00, // ####### - 0x0C, 0x00, 0x00, // ## - 0x0C, 0x00, 0x00, // ## - 0x0C, 0x00, 0x00, // ## - 0x3F, 0xC0, 0x00, // ######## - 0x3F, 0xC0, 0x00, // ######## - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - - // @3528 'Q' (17 pixels wide) - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x03, 0xC0, 0x00, // #### - 0x0F, 0xF0, 0x00, // ######## - 0x1C, 0x38, 0x00, // ### ### - 0x18, 0x18, 0x00, // ## ## - 0x38, 0x1C, 0x00, // ### ### - 0x30, 0x0C, 0x00, // ## ## - 0x30, 0x0C, 0x00, // ## ## - 0x30, 0x0C, 0x00, // ## ## - 0x30, 0x0C, 0x00, // ## ## - 0x38, 0x1C, 0x00, // ### ### - 0x18, 0x18, 0x00, // ## ## - 0x1C, 0x38, 0x00, // ### ### - 0x0F, 0xF0, 0x00, // ######## - 0x07, 0xC0, 0x00, // ##### - 0x07, 0xCC, 0x00, // ##### ## - 0x0F, 0xFC, 0x00, // ########## - 0x0C, 0x38, 0x00, // ## ### - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - - // @3600 'R' (17 pixels wide) - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x7F, 0xE0, 0x00, // ########## - 0x7F, 0xF0, 0x00, // ########### - 0x18, 0x38, 0x00, // ## ### - 0x18, 0x18, 0x00, // ## ## - 0x18, 0x18, 0x00, // ## ## - 0x18, 0x38, 0x00, // ## ### - 0x1F, 0xF0, 0x00, // ######### - 0x1F, 0xC0, 0x00, // ####### - 0x18, 0xE0, 0x00, // ## ### - 0x18, 0x70, 0x00, // ## ### - 0x18, 0x30, 0x00, // ## ## - 0x18, 0x38, 0x00, // ## ### - 0x7F, 0x1E, 0x00, // ####### #### - 0x7F, 0x0E, 0x00, // ####### ### - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - - // @3672 'S' (17 pixels wide) - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x07, 0xD8, 0x00, // ##### ## - 0x0F, 0xF8, 0x00, // ######### - 0x1C, 0x38, 0x00, // ### ### - 0x18, 0x18, 0x00, // ## ## - 0x18, 0x18, 0x00, // ## ## - 0x1E, 0x00, 0x00, // #### - 0x0F, 0xC0, 0x00, // ###### - 0x03, 0xF0, 0x00, // ###### - 0x00, 0x78, 0x00, // #### - 0x18, 0x18, 0x00, // ## ## - 0x18, 0x18, 0x00, // ## ## - 0x1C, 0x38, 0x00, // ### ### - 0x1F, 0xF0, 0x00, // ######### - 0x1B, 0xE0, 0x00, // ## ##### - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - - // @3744 'T' (17 pixels wide) - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x3F, 0xFC, 0x00, // ############ - 0x3F, 0xFC, 0x00, // ############ - 0x31, 0x8C, 0x00, // ## ## ## - 0x31, 0x8C, 0x00, // ## ## ## - 0x31, 0x8C, 0x00, // ## ## ## - 0x31, 0x8C, 0x00, // ## ## ## - 0x01, 0x80, 0x00, // ## - 0x01, 0x80, 0x00, // ## - 0x01, 0x80, 0x00, // ## - 0x01, 0x80, 0x00, // ## - 0x01, 0x80, 0x00, // ## - 0x01, 0x80, 0x00, // ## - 0x0F, 0xF0, 0x00, // ######## - 0x0F, 0xF0, 0x00, // ######## - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - - // @3816 'U' (17 pixels wide) - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x7E, 0x7E, 0x00, // ###### ###### - 0x7E, 0x7E, 0x00, // ###### ###### - 0x18, 0x18, 0x00, // ## ## - 0x18, 0x18, 0x00, // ## ## - 0x18, 0x18, 0x00, // ## ## - 0x18, 0x18, 0x00, // ## ## - 0x18, 0x18, 0x00, // ## ## - 0x18, 0x18, 0x00, // ## ## - 0x18, 0x18, 0x00, // ## ## - 0x18, 0x18, 0x00, // ## ## - 0x18, 0x18, 0x00, // ## ## - 0x0C, 0x30, 0x00, // ## ## - 0x0F, 0xF0, 0x00, // ######## - 0x03, 0xC0, 0x00, // #### - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - - // @3888 'V' (17 pixels wide) - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x7F, 0x7F, 0x00, // ####### ####### - 0x7F, 0x7F, 0x00, // ####### ####### - 0x18, 0x0C, 0x00, // ## ## - 0x0C, 0x18, 0x00, // ## ## - 0x0C, 0x18, 0x00, // ## ## - 0x0C, 0x18, 0x00, // ## ## - 0x06, 0x30, 0x00, // ## ## - 0x06, 0x30, 0x00, // ## ## - 0x03, 0x60, 0x00, // ## ## - 0x03, 0x60, 0x00, // ## ## - 0x03, 0x60, 0x00, // ## ## - 0x01, 0xC0, 0x00, // ### - 0x01, 0xC0, 0x00, // ### - 0x00, 0x80, 0x00, // # - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - - // @3960 'W' (17 pixels wide) - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0xFE, 0x3F, 0x80, // ####### ####### - 0xFE, 0x3F, 0x80, // ####### ####### - 0x30, 0x06, 0x00, // ## ## - 0x30, 0x06, 0x00, // ## ## - 0x30, 0x86, 0x00, // ## # ## - 0x19, 0xCC, 0x00, // ## ### ## - 0x19, 0xCC, 0x00, // ## ### ## - 0x1B, 0x6C, 0x00, // ## ## ## ## - 0x1B, 0x6C, 0x00, // ## ## ## ## - 0x1E, 0x7C, 0x00, // #### ##### - 0x0E, 0x38, 0x00, // ### ### - 0x0E, 0x38, 0x00, // ### ### - 0x0C, 0x18, 0x00, // ## ## - 0x0C, 0x18, 0x00, // ## ## - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - - // @4032 'X' (17 pixels wide) - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x7E, 0x7E, 0x00, // ###### ###### - 0x7E, 0x7E, 0x00, // ###### ###### - 0x18, 0x18, 0x00, // ## ## - 0x0C, 0x30, 0x00, // ## ## - 0x06, 0x60, 0x00, // ## ## - 0x03, 0xC0, 0x00, // #### - 0x01, 0x80, 0x00, // ## - 0x01, 0x80, 0x00, // ## - 0x03, 0xC0, 0x00, // #### - 0x06, 0x60, 0x00, // ## ## - 0x0C, 0x30, 0x00, // ## ## - 0x18, 0x18, 0x00, // ## ## - 0x7E, 0x7E, 0x00, // ###### ###### - 0x7E, 0x7E, 0x00, // ###### ###### - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - - // @4104 'Y' (17 pixels wide) - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x7C, 0x7E, 0x00, // ##### ###### - 0x7C, 0x7E, 0x00, // ##### ###### - 0x18, 0x18, 0x00, // ## ## - 0x0C, 0x30, 0x00, // ## ## - 0x06, 0x60, 0x00, // ## ## - 0x06, 0x60, 0x00, // ## ## - 0x03, 0xC0, 0x00, // #### - 0x01, 0x80, 0x00, // ## - 0x01, 0x80, 0x00, // ## - 0x01, 0x80, 0x00, // ## - 0x01, 0x80, 0x00, // ## - 0x01, 0x80, 0x00, // ## - 0x0F, 0xF0, 0x00, // ######## - 0x0F, 0xF0, 0x00, // ######## - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - - // @4176 'Z' (17 pixels wide) - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x1F, 0xF8, 0x00, // ########## - 0x1F, 0xF8, 0x00, // ########## - 0x18, 0x18, 0x00, // ## ## - 0x18, 0x30, 0x00, // ## ## - 0x18, 0x60, 0x00, // ## ## - 0x18, 0xC0, 0x00, // ## ## - 0x01, 0x80, 0x00, // ## - 0x03, 0x00, 0x00, // ## - 0x06, 0x18, 0x00, // ## ## - 0x0C, 0x18, 0x00, // ## ## - 0x18, 0x18, 0x00, // ## ## - 0x30, 0x18, 0x00, // ## ## - 0x3F, 0xF8, 0x00, // ########### - 0x3F, 0xF8, 0x00, // ########### - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - - // @4248 '[' (17 pixels wide) - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x01, 0xF0, 0x00, // ##### - 0x01, 0xF0, 0x00, // ##### - 0x01, 0x80, 0x00, // ## - 0x01, 0x80, 0x00, // ## - 0x01, 0x80, 0x00, // ## - 0x01, 0x80, 0x00, // ## - 0x01, 0x80, 0x00, // ## - 0x01, 0x80, 0x00, // ## - 0x01, 0x80, 0x00, // ## - 0x01, 0x80, 0x00, // ## - 0x01, 0x80, 0x00, // ## - 0x01, 0x80, 0x00, // ## - 0x01, 0x80, 0x00, // ## - 0x01, 0x80, 0x00, // ## - 0x01, 0x80, 0x00, // ## - 0x01, 0x80, 0x00, // ## - 0x01, 0xF0, 0x00, // ##### - 0x01, 0xF0, 0x00, // ##### - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - - // @4320 '\' (17 pixels wide) - 0x18, 0x00, 0x00, // ## - 0x18, 0x00, 0x00, // ## - 0x1C, 0x00, 0x00, // ### - 0x0C, 0x00, 0x00, // ## - 0x0E, 0x00, 0x00, // ### - 0x06, 0x00, 0x00, // ## - 0x06, 0x00, 0x00, // ## - 0x03, 0x00, 0x00, // ## - 0x03, 0x00, 0x00, // ## - 0x01, 0x80, 0x00, // ## - 0x01, 0x80, 0x00, // ## - 0x00, 0xC0, 0x00, // ## - 0x00, 0xC0, 0x00, // ## - 0x00, 0x60, 0x00, // ## - 0x00, 0x60, 0x00, // ## - 0x00, 0x70, 0x00, // ### - 0x00, 0x30, 0x00, // ## - 0x00, 0x38, 0x00, // ### - 0x00, 0x18, 0x00, // ## - 0x00, 0x18, 0x00, // ## - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - - // @4392 ']' (17 pixels wide) - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x0F, 0x80, 0x00, // ##### - 0x0F, 0x80, 0x00, // ##### - 0x01, 0x80, 0x00, // ## - 0x01, 0x80, 0x00, // ## - 0x01, 0x80, 0x00, // ## - 0x01, 0x80, 0x00, // ## - 0x01, 0x80, 0x00, // ## - 0x01, 0x80, 0x00, // ## - 0x01, 0x80, 0x00, // ## - 0x01, 0x80, 0x00, // ## - 0x01, 0x80, 0x00, // ## - 0x01, 0x80, 0x00, // ## - 0x01, 0x80, 0x00, // ## - 0x01, 0x80, 0x00, // ## - 0x01, 0x80, 0x00, // ## - 0x01, 0x80, 0x00, // ## - 0x0F, 0x80, 0x00, // ##### - 0x0F, 0x80, 0x00, // ##### - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - - // @4464 '^' (17 pixels wide) - 0x00, 0x00, 0x00, // - 0x00, 0x80, 0x00, // # - 0x01, 0xC0, 0x00, // ### - 0x03, 0xE0, 0x00, // ##### - 0x07, 0x70, 0x00, // ### ### - 0x06, 0x30, 0x00, // ## ## - 0x0C, 0x18, 0x00, // ## ## - 0x18, 0x0C, 0x00, // ## ## - 0x10, 0x04, 0x00, // # # - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - - // @4536 '_' (17 pixels wide) - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0xFF, 0xFF, 0x00, // ################ - 0xFF, 0xFF, 0x00, // ################ - - // @4608 '`' (17 pixels wide) - 0x00, 0x00, 0x00, // - 0x03, 0x00, 0x00, // ## - 0x03, 0x80, 0x00, // ### - 0x00, 0xE0, 0x00, // ### - 0x00, 0x60, 0x00, // ## - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - - // @4680 'a' (17 pixels wide) - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x0F, 0xC0, 0x00, // ###### - 0x1F, 0xE0, 0x00, // ######## - 0x00, 0x30, 0x00, // ## - 0x00, 0x30, 0x00, // ## - 0x07, 0xF0, 0x00, // ####### - 0x1F, 0xF0, 0x00, // ######### - 0x38, 0x30, 0x00, // ### ## - 0x30, 0x30, 0x00, // ## ## - 0x30, 0x70, 0x00, // ## ### - 0x1F, 0xFC, 0x00, // ########### - 0x0F, 0xBC, 0x00, // ##### #### - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - - // @4752 'b' (17 pixels wide) - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x78, 0x00, 0x00, // #### - 0x78, 0x00, 0x00, // #### - 0x18, 0x00, 0x00, // ## - 0x18, 0x00, 0x00, // ## - 0x1B, 0xE0, 0x00, // ## ##### - 0x1F, 0xF8, 0x00, // ########## - 0x1C, 0x18, 0x00, // ### ## - 0x18, 0x0C, 0x00, // ## ## - 0x18, 0x0C, 0x00, // ## ## - 0x18, 0x0C, 0x00, // ## ## - 0x18, 0x0C, 0x00, // ## ## - 0x18, 0x0C, 0x00, // ## ## - 0x1C, 0x18, 0x00, // ### ## - 0x7F, 0xF8, 0x00, // ############ - 0x7B, 0xE0, 0x00, // #### ##### - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - - // @4824 'c' (17 pixels wide) - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x03, 0xEC, 0x00, // ##### ## - 0x0F, 0xFC, 0x00, // ########## - 0x1C, 0x1C, 0x00, // ### ### - 0x38, 0x0C, 0x00, // ### ## - 0x30, 0x0C, 0x00, // ## ## - 0x30, 0x00, 0x00, // ## - 0x30, 0x00, 0x00, // ## - 0x38, 0x0C, 0x00, // ### ## - 0x1C, 0x1C, 0x00, // ### ### - 0x0F, 0xF8, 0x00, // ######### - 0x03, 0xF0, 0x00, // ###### - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - - // @4896 'd' (17 pixels wide) - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x78, 0x00, // #### - 0x00, 0x78, 0x00, // #### - 0x00, 0x18, 0x00, // ## - 0x00, 0x18, 0x00, // ## - 0x07, 0xD8, 0x00, // ##### ## - 0x1F, 0xF8, 0x00, // ########## - 0x18, 0x38, 0x00, // ## ### - 0x30, 0x18, 0x00, // ## ## - 0x30, 0x18, 0x00, // ## ## - 0x30, 0x18, 0x00, // ## ## - 0x30, 0x18, 0x00, // ## ## - 0x30, 0x18, 0x00, // ## ## - 0x18, 0x38, 0x00, // ## ### - 0x1F, 0xFE, 0x00, // ############ - 0x07, 0xDE, 0x00, // ##### #### - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - - // @4968 'e' (17 pixels wide) - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x07, 0xE0, 0x00, // ###### - 0x1F, 0xF8, 0x00, // ########## - 0x18, 0x18, 0x00, // ## ## - 0x30, 0x0C, 0x00, // ## ## - 0x3F, 0xFC, 0x00, // ############ - 0x3F, 0xFC, 0x00, // ############ - 0x30, 0x00, 0x00, // ## - 0x30, 0x00, 0x00, // ## - 0x18, 0x0C, 0x00, // ## ## - 0x1F, 0xFC, 0x00, // ########### - 0x07, 0xF0, 0x00, // ####### - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - - // @5040 'f' (17 pixels wide) - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x01, 0xFC, 0x00, // ####### - 0x03, 0xFC, 0x00, // ######## - 0x06, 0x00, 0x00, // ## - 0x06, 0x00, 0x00, // ## - 0x3F, 0xF8, 0x00, // ########### - 0x3F, 0xF8, 0x00, // ########### - 0x06, 0x00, 0x00, // ## - 0x06, 0x00, 0x00, // ## - 0x06, 0x00, 0x00, // ## - 0x06, 0x00, 0x00, // ## - 0x06, 0x00, 0x00, // ## - 0x06, 0x00, 0x00, // ## - 0x06, 0x00, 0x00, // ## - 0x3F, 0xF0, 0x00, // ########## - 0x3F, 0xF0, 0x00, // ########## - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - - // @5112 'g' (17 pixels wide) - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x07, 0xDE, 0x00, // ##### #### - 0x1F, 0xFE, 0x00, // ############ - 0x18, 0x38, 0x00, // ## ### - 0x30, 0x18, 0x00, // ## ## - 0x30, 0x18, 0x00, // ## ## - 0x30, 0x18, 0x00, // ## ## - 0x30, 0x18, 0x00, // ## ## - 0x30, 0x18, 0x00, // ## ## - 0x18, 0x38, 0x00, // ## ### - 0x1F, 0xF8, 0x00, // ########## - 0x07, 0xD8, 0x00, // ##### ## - 0x00, 0x18, 0x00, // ## - 0x00, 0x18, 0x00, // ## - 0x00, 0x38, 0x00, // ### - 0x0F, 0xF0, 0x00, // ######## - 0x0F, 0xC0, 0x00, // ###### - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - - // @5184 'h' (17 pixels wide) - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x78, 0x00, 0x00, // #### - 0x78, 0x00, 0x00, // #### - 0x18, 0x00, 0x00, // ## - 0x18, 0x00, 0x00, // ## - 0x1B, 0xE0, 0x00, // ## ##### - 0x1F, 0xF0, 0x00, // ######### - 0x1C, 0x38, 0x00, // ### ### - 0x18, 0x18, 0x00, // ## ## - 0x18, 0x18, 0x00, // ## ## - 0x18, 0x18, 0x00, // ## ## - 0x18, 0x18, 0x00, // ## ## - 0x18, 0x18, 0x00, // ## ## - 0x18, 0x18, 0x00, // ## ## - 0x7E, 0x7E, 0x00, // ###### ###### - 0x7E, 0x7E, 0x00, // ###### ###### - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - - // @5256 'i' (17 pixels wide) - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x01, 0x80, 0x00, // ## - 0x01, 0x80, 0x00, // ## - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x1F, 0x80, 0x00, // ###### - 0x1F, 0x80, 0x00, // ###### - 0x01, 0x80, 0x00, // ## - 0x01, 0x80, 0x00, // ## - 0x01, 0x80, 0x00, // ## - 0x01, 0x80, 0x00, // ## - 0x01, 0x80, 0x00, // ## - 0x01, 0x80, 0x00, // ## - 0x01, 0x80, 0x00, // ## - 0x3F, 0xFC, 0x00, // ############ - 0x3F, 0xFC, 0x00, // ############ - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - - // @5328 'j' (17 pixels wide) - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0xC0, 0x00, // ## - 0x00, 0xC0, 0x00, // ## - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x1F, 0xF0, 0x00, // ######### - 0x1F, 0xF0, 0x00, // ######### - 0x00, 0x30, 0x00, // ## - 0x00, 0x30, 0x00, // ## - 0x00, 0x30, 0x00, // ## - 0x00, 0x30, 0x00, // ## - 0x00, 0x30, 0x00, // ## - 0x00, 0x30, 0x00, // ## - 0x00, 0x30, 0x00, // ## - 0x00, 0x30, 0x00, // ## - 0x00, 0x30, 0x00, // ## - 0x00, 0x30, 0x00, // ## - 0x00, 0x30, 0x00, // ## - 0x00, 0x70, 0x00, // ### - 0x1F, 0xE0, 0x00, // ######## - 0x1F, 0x80, 0x00, // ###### - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - - // @5400 'k' (17 pixels wide) - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x3C, 0x00, 0x00, // #### - 0x3C, 0x00, 0x00, // #### - 0x0C, 0x00, 0x00, // ## - 0x0C, 0x00, 0x00, // ## - 0x0C, 0xF8, 0x00, // ## ##### - 0x0C, 0xF8, 0x00, // ## ##### - 0x0C, 0xC0, 0x00, // ## ## - 0x0D, 0x80, 0x00, // ## ## - 0x0F, 0x80, 0x00, // ##### - 0x0F, 0x00, 0x00, // #### - 0x0F, 0x80, 0x00, // ##### - 0x0D, 0xC0, 0x00, // ## ### - 0x0C, 0xE0, 0x00, // ## ### - 0x3C, 0x7C, 0x00, // #### ##### - 0x3C, 0x7C, 0x00, // #### ##### - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - - // @5472 'l' (17 pixels wide) - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x1F, 0x80, 0x00, // ###### - 0x1F, 0x80, 0x00, // ###### - 0x01, 0x80, 0x00, // ## - 0x01, 0x80, 0x00, // ## - 0x01, 0x80, 0x00, // ## - 0x01, 0x80, 0x00, // ## - 0x01, 0x80, 0x00, // ## - 0x01, 0x80, 0x00, // ## - 0x01, 0x80, 0x00, // ## - 0x01, 0x80, 0x00, // ## - 0x01, 0x80, 0x00, // ## - 0x01, 0x80, 0x00, // ## - 0x01, 0x80, 0x00, // ## - 0x3F, 0xFC, 0x00, // ############ - 0x3F, 0xFC, 0x00, // ############ - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - - // @5544 'm' (17 pixels wide) - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0xF7, 0x78, 0x00, // #### ### #### - 0xFF, 0xFC, 0x00, // ############## - 0x39, 0xCC, 0x00, // ### ### ## - 0x31, 0x8C, 0x00, // ## ## ## - 0x31, 0x8C, 0x00, // ## ## ## - 0x31, 0x8C, 0x00, // ## ## ## - 0x31, 0x8C, 0x00, // ## ## ## - 0x31, 0x8C, 0x00, // ## ## ## - 0x31, 0x8C, 0x00, // ## ## ## - 0xFD, 0xEF, 0x00, // ###### #### #### - 0xFD, 0xEF, 0x00, // ###### #### #### - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - - // @5616 'n' (17 pixels wide) - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x7B, 0xE0, 0x00, // #### ##### - 0x7F, 0xF0, 0x00, // ########### - 0x1C, 0x38, 0x00, // ### ### - 0x18, 0x18, 0x00, // ## ## - 0x18, 0x18, 0x00, // ## ## - 0x18, 0x18, 0x00, // ## ## - 0x18, 0x18, 0x00, // ## ## - 0x18, 0x18, 0x00, // ## ## - 0x18, 0x18, 0x00, // ## ## - 0x7E, 0x7E, 0x00, // ###### ###### - 0x7E, 0x7E, 0x00, // ###### ###### - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - - // @5688 'o' (17 pixels wide) - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x03, 0xC0, 0x00, // #### - 0x0F, 0xF0, 0x00, // ######## - 0x1C, 0x38, 0x00, // ### ### - 0x38, 0x1C, 0x00, // ### ### - 0x30, 0x0C, 0x00, // ## ## - 0x30, 0x0C, 0x00, // ## ## - 0x30, 0x0C, 0x00, // ## ## - 0x38, 0x1C, 0x00, // ### ### - 0x1C, 0x38, 0x00, // ### ### - 0x0F, 0xF0, 0x00, // ######## - 0x03, 0xC0, 0x00, // #### - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - - // @5760 'p' (17 pixels wide) - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x7B, 0xE0, 0x00, // #### ##### - 0x7F, 0xF8, 0x00, // ############ - 0x1C, 0x18, 0x00, // ### ## - 0x18, 0x0C, 0x00, // ## ## - 0x18, 0x0C, 0x00, // ## ## - 0x18, 0x0C, 0x00, // ## ## - 0x18, 0x0C, 0x00, // ## ## - 0x18, 0x0C, 0x00, // ## ## - 0x1C, 0x18, 0x00, // ### ## - 0x1F, 0xF8, 0x00, // ########## - 0x1B, 0xE0, 0x00, // ## ##### - 0x18, 0x00, 0x00, // ## - 0x18, 0x00, 0x00, // ## - 0x18, 0x00, 0x00, // ## - 0x7F, 0x00, 0x00, // ####### - 0x7F, 0x00, 0x00, // ####### - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - - // @5832 'q' (17 pixels wide) - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x07, 0xDE, 0x00, // ##### #### - 0x1F, 0xFE, 0x00, // ############ - 0x18, 0x38, 0x00, // ## ### - 0x30, 0x18, 0x00, // ## ## - 0x30, 0x18, 0x00, // ## ## - 0x30, 0x18, 0x00, // ## ## - 0x30, 0x18, 0x00, // ## ## - 0x30, 0x18, 0x00, // ## ## - 0x18, 0x38, 0x00, // ## ### - 0x1F, 0xF8, 0x00, // ########## - 0x07, 0xD8, 0x00, // ##### ## - 0x00, 0x18, 0x00, // ## - 0x00, 0x18, 0x00, // ## - 0x00, 0x18, 0x00, // ## - 0x00, 0xFE, 0x00, // ####### - 0x00, 0xFE, 0x00, // ####### - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - - // @5904 'r' (17 pixels wide) - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x3E, 0x78, 0x00, // ##### #### - 0x3E, 0xFC, 0x00, // ##### ###### - 0x07, 0xCC, 0x00, // ##### ## - 0x07, 0x00, 0x00, // ### - 0x06, 0x00, 0x00, // ## - 0x06, 0x00, 0x00, // ## - 0x06, 0x00, 0x00, // ## - 0x06, 0x00, 0x00, // ## - 0x06, 0x00, 0x00, // ## - 0x3F, 0xF0, 0x00, // ########## - 0x3F, 0xF0, 0x00, // ########## - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - - // @5976 's' (17 pixels wide) - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x07, 0xF8, 0x00, // ######## - 0x0F, 0xF8, 0x00, // ######### - 0x18, 0x18, 0x00, // ## ## - 0x18, 0x18, 0x00, // ## ## - 0x1F, 0x80, 0x00, // ###### - 0x0F, 0xF0, 0x00, // ######## - 0x00, 0xF8, 0x00, // ##### - 0x18, 0x18, 0x00, // ## ## - 0x18, 0x38, 0x00, // ## ### - 0x1F, 0xF0, 0x00, // ######### - 0x1F, 0xE0, 0x00, // ######## - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - - // @6048 't' (17 pixels wide) - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x0C, 0x00, 0x00, // ## - 0x0C, 0x00, 0x00, // ## - 0x0C, 0x00, 0x00, // ## - 0x0C, 0x00, 0x00, // ## - 0x3F, 0xF0, 0x00, // ########## - 0x3F, 0xF0, 0x00, // ########## - 0x0C, 0x00, 0x00, // ## - 0x0C, 0x00, 0x00, // ## - 0x0C, 0x00, 0x00, // ## - 0x0C, 0x00, 0x00, // ## - 0x0C, 0x00, 0x00, // ## - 0x0C, 0x00, 0x00, // ## - 0x0C, 0x1C, 0x00, // ## ### - 0x07, 0xFC, 0x00, // ######### - 0x03, 0xF0, 0x00, // ###### - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - - // @6120 'u' (17 pixels wide) - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x78, 0x78, 0x00, // #### #### - 0x78, 0x78, 0x00, // #### #### - 0x18, 0x18, 0x00, // ## ## - 0x18, 0x18, 0x00, // ## ## - 0x18, 0x18, 0x00, // ## ## - 0x18, 0x18, 0x00, // ## ## - 0x18, 0x18, 0x00, // ## ## - 0x18, 0x18, 0x00, // ## ## - 0x18, 0x38, 0x00, // ## ### - 0x0F, 0xFE, 0x00, // ########### - 0x07, 0xDE, 0x00, // ##### #### - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - - // @6192 'v' (17 pixels wide) - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x7C, 0x3E, 0x00, // ##### ##### - 0x7C, 0x3E, 0x00, // ##### ##### - 0x18, 0x18, 0x00, // ## ## - 0x18, 0x18, 0x00, // ## ## - 0x0C, 0x30, 0x00, // ## ## - 0x0C, 0x30, 0x00, // ## ## - 0x06, 0x60, 0x00, // ## ## - 0x06, 0x60, 0x00, // ## ## - 0x07, 0xE0, 0x00, // ###### - 0x03, 0xC0, 0x00, // #### - 0x03, 0xC0, 0x00, // #### - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - - // @6264 'w' (17 pixels wide) - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x78, 0x3C, 0x00, // #### #### - 0x78, 0x3C, 0x00, // #### #### - 0x31, 0x18, 0x00, // ## # ## - 0x33, 0x98, 0x00, // ## ### ## - 0x33, 0x98, 0x00, // ## ### ## - 0x1A, 0xB0, 0x00, // ## # # ## - 0x1E, 0xF0, 0x00, // #### #### - 0x1E, 0xF0, 0x00, // #### #### - 0x1C, 0x60, 0x00, // ### ## - 0x0C, 0x60, 0x00, // ## ## - 0x0C, 0x60, 0x00, // ## ## - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - - // @6336 'x' (17 pixels wide) - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x3E, 0x7C, 0x00, // ##### ##### - 0x3E, 0x7C, 0x00, // ##### ##### - 0x0C, 0x30, 0x00, // ## ## - 0x06, 0x60, 0x00, // ## ## - 0x03, 0xC0, 0x00, // #### - 0x01, 0x80, 0x00, // ## - 0x03, 0xC0, 0x00, // #### - 0x06, 0x60, 0x00, // ## ## - 0x0C, 0x30, 0x00, // ## ## - 0x3E, 0x7C, 0x00, // ##### ##### - 0x3E, 0x7C, 0x00, // ##### ##### - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - - // @6408 'y' (17 pixels wide) - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x7E, 0x1F, 0x00, // ###### ##### - 0x7E, 0x1F, 0x00, // ###### ##### - 0x18, 0x0C, 0x00, // ## ## - 0x0C, 0x18, 0x00, // ## ## - 0x0C, 0x18, 0x00, // ## ## - 0x06, 0x30, 0x00, // ## ## - 0x06, 0x30, 0x00, // ## ## - 0x03, 0x60, 0x00, // ## ## - 0x03, 0xE0, 0x00, // ##### - 0x01, 0xC0, 0x00, // ### - 0x00, 0xC0, 0x00, // ## - 0x01, 0x80, 0x00, // ## - 0x01, 0x80, 0x00, // ## - 0x03, 0x00, 0x00, // ## - 0x3F, 0xC0, 0x00, // ######## - 0x3F, 0xC0, 0x00, // ######## - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - - // @6480 'z' (17 pixels wide) - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x1F, 0xF8, 0x00, // ########## - 0x1F, 0xF8, 0x00, // ########## - 0x18, 0x30, 0x00, // ## ## - 0x18, 0x60, 0x00, // ## ## - 0x00, 0xC0, 0x00, // ## - 0x01, 0x80, 0x00, // ## - 0x03, 0x00, 0x00, // ## - 0x06, 0x18, 0x00, // ## ## - 0x0C, 0x18, 0x00, // ## ## - 0x1F, 0xF8, 0x00, // ########## - 0x1F, 0xF8, 0x00, // ########## - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - - // @6552 '{' (17 pixels wide) - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0xE0, 0x00, // ### - 0x01, 0xE0, 0x00, // #### - 0x01, 0x80, 0x00, // ## - 0x01, 0x80, 0x00, // ## - 0x01, 0x80, 0x00, // ## - 0x01, 0x80, 0x00, // ## - 0x01, 0x80, 0x00, // ## - 0x01, 0x80, 0x00, // ## - 0x03, 0x80, 0x00, // ### - 0x07, 0x00, 0x00, // ### - 0x03, 0x80, 0x00, // ### - 0x01, 0x80, 0x00, // ## - 0x01, 0x80, 0x00, // ## - 0x01, 0x80, 0x00, // ## - 0x01, 0x80, 0x00, // ## - 0x01, 0x80, 0x00, // ## - 0x01, 0xE0, 0x00, // #### - 0x00, 0xE0, 0x00, // ### - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - - // @6624 '|' (17 pixels wide) - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x01, 0x80, 0x00, // ## - 0x01, 0x80, 0x00, // ## - 0x01, 0x80, 0x00, // ## - 0x01, 0x80, 0x00, // ## - 0x01, 0x80, 0x00, // ## - 0x01, 0x80, 0x00, // ## - 0x01, 0x80, 0x00, // ## - 0x01, 0x80, 0x00, // ## - 0x01, 0x80, 0x00, // ## - 0x01, 0x80, 0x00, // ## - 0x01, 0x80, 0x00, // ## - 0x01, 0x80, 0x00, // ## - 0x01, 0x80, 0x00, // ## - 0x01, 0x80, 0x00, // ## - 0x01, 0x80, 0x00, // ## - 0x01, 0x80, 0x00, // ## - 0x01, 0x80, 0x00, // ## - 0x01, 0x80, 0x00, // ## - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - - // @6696 '}' (17 pixels wide) - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x07, 0x00, 0x00, // ### - 0x07, 0x80, 0x00, // #### - 0x01, 0x80, 0x00, // ## - 0x01, 0x80, 0x00, // ## - 0x01, 0x80, 0x00, // ## - 0x01, 0x80, 0x00, // ## - 0x01, 0x80, 0x00, // ## - 0x01, 0x80, 0x00, // ## - 0x01, 0xC0, 0x00, // ### - 0x00, 0xE0, 0x00, // ### - 0x01, 0xC0, 0x00, // ### - 0x01, 0x80, 0x00, // ## - 0x01, 0x80, 0x00, // ## - 0x01, 0x80, 0x00, // ## - 0x01, 0x80, 0x00, // ## - 0x01, 0x80, 0x00, // ## - 0x07, 0x80, 0x00, // #### - 0x07, 0x00, 0x00, // ### - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - - // @6768 '~' (17 pixels wide) - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x0E, 0x00, 0x00, // ### - 0x1F, 0x18, 0x00, // ##### ## - 0x3B, 0xB8, 0x00, // ### ### ### - 0x31, 0xF0, 0x00, // ## ##### - 0x00, 0xE0, 0x00, // ### - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // - 0x00, 0x00, 0x00, // -}; - -sFONT Font24 = { - Font24_Table, - 17, /* Width */ - 24, /* Height */ -}; - -/** - * @} - */ - - -/** @defgroup FONTS_Private_Function_Prototypes - * @{ - */ -/** - * @} - */ - - -/** @defgroup FONTS_Private_Functions - * @{ - */ - -/** - * @} - */ - -/** - * @} - */ - -/** - * @} - */ - -/** - * @} - */ - -/** - * @} - */ -/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
--- a/Fonts/font8.c Mon May 30 11:09:05 2016 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1084 +0,0 @@ -/** - ****************************************************************************** - * @file Font8.c - * @author MCD Application Team - * @version V1.0.0 - * @date 18-February-2014 - * @brief This file provides text Font8 for STM32xx-EVAL's LCD driver. - ****************************************************************************** - * @attention - * - * <h2><center>© COPYRIGHT(c) 2014 STMicroelectronics</center></h2> - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. Neither the name of STMicroelectronics nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - ****************************************************************************** - */ - -/* Includes ------------------------------------------------------------------*/ -#include "fonts.h" - -/** @addtogroup Utilities - * @{ - */ - -/** @addtogroup STM32_EVAL - * @{ - */ - -/** @addtogroup Common - * @{ - */ - -/** @addtogroup FONTS - * @brief This file provides text Font8 for STM32xx-EVAL's LCD driver. - * @{ - */ - -/** @defgroup FONTS_Private_Types - * @{ - */ -/** - * @} - */ - - -/** @defgroup FONTS_Private_Defines - * @{ - */ -/** - * @} - */ - - -/** @defgroup FONTS_Private_Macros - * @{ - */ -/** - * @} - */ - - -/** @defgroup FONTS_Private_Variables - * @{ - */ -// -// Font data for Courier New 12pt -// - -const uint8_t Font8_Table[] = -{ - // @0 ' ' (5 pixels wide) - 0x00, // - 0x00, // - 0x00, // - 0x00, // - 0x00, // - 0x00, // - 0x00, // - 0x00, // - - // @8 '!' (5 pixels wide) - 0x20, // # - 0x20, // # - 0x20, // # - 0x20, // # - 0x00, // - 0x20, // # - 0x00, // - 0x00, // - - // @16 '"' (5 pixels wide) - 0x50, // # # - 0x50, // # # - 0x00, // - 0x00, // - 0x00, // - 0x00, // - 0x00, // - 0x00, // - - // @24 '#' (5 pixels wide) - 0x28, // # # - 0x50, // # # - 0xF8, // ##### - 0x50, // # # - 0xF8, // ##### - 0x50, // # # - 0xA0, // # # - 0x00, // - - // @32 '$' (5 pixels wide) - 0x20, // # - 0x30, // ## - 0x60, // ## - 0x30, // ## - 0x10, // # - 0x60, // ## - 0x20, // # - 0x00, // - - // @40 '%' (5 pixels wide) - 0x20, // # - 0x20, // # - 0x18, // ## - 0x60, // ## - 0x10, // # - 0x10, // # - 0x00, // - 0x00, // - - // @48 '&' (5 pixels wide) - 0x00, // - 0x38, // ### - 0x20, // # - 0x60, // ## - 0x50, // # # - 0x78, // #### - 0x00, // - 0x00, // - - // @56 ''' (5 pixels wide) - 0x20, // # - 0x20, // # - 0x20, // # - 0x00, // - 0x00, // - 0x00, // - 0x00, // - 0x00, // - - // @64 '(' (5 pixels wide) - 0x10, // # - 0x20, // # - 0x20, // # - 0x20, // # - 0x20, // # - 0x20, // # - 0x10, // # - 0x00, // - - // @72 ')' (5 pixels wide) - 0x40, // # - 0x20, // # - 0x20, // # - 0x20, // # - 0x20, // # - 0x20, // # - 0x40, // # - 0x00, // - - // @80 '*' (5 pixels wide) - 0x20, // # - 0x70, // ### - 0x20, // # - 0x50, // # # - 0x00, // - 0x00, // - 0x00, // - 0x00, // - - // @88 '+' (5 pixels wide) - 0x00, // - 0x20, // # - 0x20, // # - 0xF8, // ##### - 0x20, // # - 0x20, // # - 0x00, // - 0x00, // - - // @96 ',' (5 pixels wide) - 0x00, // - 0x00, // - 0x00, // - 0x00, // - 0x10, // # - 0x20, // # - 0x20, // # - 0x00, // - - // @104 '-' (5 pixels wide) - 0x00, // - 0x00, // - 0x00, // - 0x70, // ### - 0x00, // - 0x00, // - 0x00, // - 0x00, // - - // @112 '.' (5 pixels wide) - 0x00, // - 0x00, // - 0x00, // - 0x00, // - 0x00, // - 0x20, // # - 0x00, // - 0x00, // - - // @120 '/' (5 pixels wide) - 0x10, // # - 0x20, // # - 0x20, // # - 0x20, // # - 0x40, // # - 0x40, // # - 0x80, // # - 0x00, // - - // @128 '0' (5 pixels wide) - 0x20, // # - 0x50, // # # - 0x50, // # # - 0x50, // # # - 0x50, // # # - 0x20, // # - 0x00, // - 0x00, // - - // @136 '1' (5 pixels wide) - 0x60, // ## - 0x20, // # - 0x20, // # - 0x20, // # - 0x20, // # - 0xF8, // ##### - 0x00, // - 0x00, // - - // @144 '2' (5 pixels wide) - 0x20, // # - 0x50, // # # - 0x20, // # - 0x20, // # - 0x40, // # - 0x70, // ### - 0x00, // - 0x00, // - - // @152 '3' (5 pixels wide) - 0x20, // # - 0x50, // # # - 0x10, // # - 0x20, // # - 0x10, // # - 0x60, // ## - 0x00, // - 0x00, // - - // @160 '4' (5 pixels wide) - 0x10, // # - 0x30, // ## - 0x50, // # # - 0x78, // #### - 0x10, // # - 0x38, // ### - 0x00, // - 0x00, // - - // @168 '5' (5 pixels wide) - 0x70, // ### - 0x40, // # - 0x60, // ## - 0x10, // # - 0x50, // # # - 0x20, // # - 0x00, // - 0x00, // - - // @176 '6' (5 pixels wide) - 0x30, // ## - 0x40, // # - 0x60, // ## - 0x50, // # # - 0x50, // # # - 0x60, // ## - 0x00, // - 0x00, // - - // @184 '7' (5 pixels wide) - 0x70, // ### - 0x50, // # # - 0x10, // # - 0x20, // # - 0x20, // # - 0x20, // # - 0x00, // - 0x00, // - - // @192 '8' (5 pixels wide) - 0x20, // # - 0x50, // # # - 0x20, // # - 0x50, // # # - 0x50, // # # - 0x20, // # - 0x00, // - 0x00, // - - // @200 '9' (5 pixels wide) - 0x30, // ## - 0x50, // # # - 0x50, // # # - 0x30, // ## - 0x10, // # - 0x60, // ## - 0x00, // - 0x00, // - - // @208 ':' (5 pixels wide) - 0x00, // - 0x00, // - 0x20, // # - 0x00, // - 0x00, // - 0x20, // # - 0x00, // - 0x00, // - - // @216 ';' (5 pixels wide) - 0x00, // - 0x00, // - 0x10, // # - 0x00, // - 0x10, // # - 0x20, // # - 0x00, // - 0x00, // - - // @224 '<' (5 pixels wide) - 0x00, // - 0x10, // # - 0x20, // # - 0xC0, // ## - 0x20, // # - 0x10, // # - 0x00, // - 0x00, // - - // @232 '=' (5 pixels wide) - 0x00, // - 0x70, // ### - 0x00, // - 0x70, // ### - 0x00, // - 0x00, // - 0x00, // - 0x00, // - - // @240 '>' (5 pixels wide) - 0x00, // - 0x40, // # - 0x20, // # - 0x18, // ## - 0x20, // # - 0x40, // # - 0x00, // - 0x00, // - - // @248 '?' (5 pixels wide) - 0x20, // # - 0x50, // # # - 0x10, // # - 0x20, // # - 0x00, // - 0x20, // # - 0x00, // - 0x00, // - - // @256 '@' (5 pixels wide) - 0x30, // ## - 0x48, // # # - 0x48, // # # - 0x58, // # ## - 0x48, // # # - 0x40, // # - 0x38, // ### - 0x00, // - - // @264 'A' (5 pixels wide) - 0x60, // ## - 0x20, // # - 0x50, // # # - 0x70, // ### - 0x88, // # # - 0xD8, // ## ## - 0x00, // - 0x00, // - - // @272 'B' (5 pixels wide) - 0xF0, // #### - 0x48, // # # - 0x70, // ### - 0x48, // # # - 0x48, // # # - 0xF0, // #### - 0x00, // - 0x00, // - - // @280 'C' (5 pixels wide) - 0x70, // ### - 0x50, // # # - 0x40, // # - 0x40, // # - 0x40, // # - 0x30, // ## - 0x00, // - 0x00, // - - // @288 'D' (5 pixels wide) - 0xF0, // #### - 0x48, // # # - 0x48, // # # - 0x48, // # # - 0x48, // # # - 0xF0, // #### - 0x00, // - 0x00, // - - // @296 'E' (5 pixels wide) - 0xF8, // ##### - 0x48, // # # - 0x60, // ## - 0x40, // # - 0x48, // # # - 0xF8, // ##### - 0x00, // - 0x00, // - - // @304 'F' (5 pixels wide) - 0xF8, // ##### - 0x48, // # # - 0x60, // ## - 0x40, // # - 0x40, // # - 0xE0, // ### - 0x00, // - 0x00, // - - // @312 'G' (5 pixels wide) - 0x70, // ### - 0x40, // # - 0x40, // # - 0x58, // # ## - 0x50, // # # - 0x30, // ## - 0x00, // - 0x00, // - - // @320 'H' (5 pixels wide) - 0xE8, // ### # - 0x48, // # # - 0x78, // #### - 0x48, // # # - 0x48, // # # - 0xE8, // ### # - 0x00, // - 0x00, // - - // @328 'I' (5 pixels wide) - 0x70, // ### - 0x20, // # - 0x20, // # - 0x20, // # - 0x20, // # - 0x70, // ### - 0x00, // - 0x00, // - - // @336 'J' (5 pixels wide) - 0x38, // ### - 0x10, // # - 0x10, // # - 0x50, // # # - 0x50, // # # - 0x20, // # - 0x00, // - 0x00, // - - // @344 'K' (5 pixels wide) - 0xD8, // ## ## - 0x50, // # # - 0x60, // ## - 0x70, // ### - 0x50, // # # - 0xD8, // ## ## - 0x00, // - 0x00, // - - // @352 'L' (5 pixels wide) - 0xE0, // ### - 0x40, // # - 0x40, // # - 0x40, // # - 0x48, // # # - 0xF8, // ##### - 0x00, // - 0x00, // - - // @360 'M' (5 pixels wide) - 0xD8, // ## ## - 0xD8, // ## ## - 0xD8, // ## ## - 0xA8, // # # # - 0x88, // # # - 0xD8, // ## ## - 0x00, // - 0x00, // - - // @368 'N' (5 pixels wide) - 0xD8, // ## ## - 0x68, // ## # - 0x68, // ## # - 0x58, // # ## - 0x58, // # ## - 0xE8, // ### # - 0x00, // - 0x00, // - - // @376 'O' (5 pixels wide) - 0x30, // ## - 0x48, // # # - 0x48, // # # - 0x48, // # # - 0x48, // # # - 0x30, // ## - 0x00, // - 0x00, // - - // @384 'P' (5 pixels wide) - 0xF0, // #### - 0x48, // # # - 0x48, // # # - 0x70, // ### - 0x40, // # - 0xE0, // ### - 0x00, // - 0x00, // - - // @392 'Q' (5 pixels wide) - 0x30, // ## - 0x48, // # # - 0x48, // # # - 0x48, // # # - 0x48, // # # - 0x30, // ## - 0x18, // ## - 0x00, // - - // @400 'R' (5 pixels wide) - 0xF0, // #### - 0x48, // # # - 0x48, // # # - 0x70, // ### - 0x48, // # # - 0xE8, // ### # - 0x00, // - 0x00, // - - // @408 'S' (5 pixels wide) - 0x70, // ### - 0x50, // # # - 0x20, // # - 0x10, // # - 0x50, // # # - 0x70, // ### - 0x00, // - 0x00, // - - // @416 'T' (5 pixels wide) - 0xF8, // ##### - 0xA8, // # # # - 0x20, // # - 0x20, // # - 0x20, // # - 0x70, // ### - 0x00, // - 0x00, // - - // @424 'U' (5 pixels wide) - 0xD8, // ## ## - 0x48, // # # - 0x48, // # # - 0x48, // # # - 0x48, // # # - 0x30, // ## - 0x00, // - 0x00, // - - // @432 'V' (5 pixels wide) - 0xD8, // ## ## - 0x88, // # # - 0x48, // # # - 0x50, // # # - 0x50, // # # - 0x30, // ## - 0x00, // - 0x00, // - - // @440 'W' (5 pixels wide) - 0xD8, // ## ## - 0x88, // # # - 0xA8, // # # # - 0xA8, // # # # - 0xA8, // # # # - 0x50, // # # - 0x00, // - 0x00, // - - // @448 'X' (5 pixels wide) - 0xD8, // ## ## - 0x50, // # # - 0x20, // # - 0x20, // # - 0x50, // # # - 0xD8, // ## ## - 0x00, // - 0x00, // - - // @456 'Y' (5 pixels wide) - 0xD8, // ## ## - 0x88, // # # - 0x50, // # # - 0x20, // # - 0x20, // # - 0x70, // ### - 0x00, // - 0x00, // - - // @464 'Z' (5 pixels wide) - 0x78, // #### - 0x48, // # # - 0x10, // # - 0x20, // # - 0x48, // # # - 0x78, // #### - 0x00, // - 0x00, // - - // @472 '[' (5 pixels wide) - 0x30, // ## - 0x20, // # - 0x20, // # - 0x20, // # - 0x20, // # - 0x20, // # - 0x30, // ## - 0x00, // - - // @480 '\' (5 pixels wide) - 0x80, // # - 0x40, // # - 0x40, // # - 0x20, // # - 0x20, // # - 0x20, // # - 0x10, // # - 0x00, // - - // @488 ']' (5 pixels wide) - 0x60, // ## - 0x20, // # - 0x20, // # - 0x20, // # - 0x20, // # - 0x20, // # - 0x60, // ## - 0x00, // - - // @496 '^' (5 pixels wide) - 0x20, // # - 0x20, // # - 0x50, // # # - 0x00, // - 0x00, // - 0x00, // - 0x00, // - 0x00, // - - // @504 '_' (5 pixels wide) - 0x00, // - 0x00, // - 0x00, // - 0x00, // - 0x00, // - 0x00, // - 0x00, // - 0xF8, // ##### - - // @512 '`' (5 pixels wide) - 0x20, // # - 0x10, // # - 0x00, // - 0x00, // - 0x00, // - 0x00, // - 0x00, // - 0x00, // - - // @520 'a' (5 pixels wide) - 0x00, // - 0x00, // - 0x30, // ## - 0x10, // # - 0x70, // ### - 0x78, // #### - 0x00, // - 0x00, // - - // @528 'b' (5 pixels wide) - 0xC0, // ## - 0x40, // # - 0x70, // ### - 0x48, // # # - 0x48, // # # - 0xF0, // #### - 0x00, // - 0x00, // - - // @536 'c' (5 pixels wide) - 0x00, // - 0x00, // - 0x70, // ### - 0x40, // # - 0x40, // # - 0x70, // ### - 0x00, // - 0x00, // - - // @544 'd' (5 pixels wide) - 0x18, // ## - 0x08, // # - 0x38, // ### - 0x48, // # # - 0x48, // # # - 0x38, // ### - 0x00, // - 0x00, // - - // @552 'e' (5 pixels wide) - 0x00, // - 0x00, // - 0x70, // ### - 0x70, // ### - 0x40, // # - 0x30, // ## - 0x00, // - 0x00, // - - // @560 'f' (5 pixels wide) - 0x10, // # - 0x20, // # - 0x70, // ### - 0x20, // # - 0x20, // # - 0x70, // ### - 0x00, // - 0x00, // - - // @568 'g' (5 pixels wide) - 0x00, // - 0x00, // - 0x38, // ### - 0x48, // # # - 0x48, // # # - 0x38, // ### - 0x08, // # - 0x30, // ## - - // @576 'h' (5 pixels wide) - 0xC0, // ## - 0x40, // # - 0x70, // ### - 0x48, // # # - 0x48, // # # - 0xE8, // ### # - 0x00, // - 0x00, // - - // @584 'i' (5 pixels wide) - 0x20, // # - 0x00, // - 0x60, // ## - 0x20, // # - 0x20, // # - 0x70, // ### - 0x00, // - 0x00, // - - // @592 'j' (5 pixels wide) - 0x20, // # - 0x00, // - 0x70, // ### - 0x10, // # - 0x10, // # - 0x10, // # - 0x10, // # - 0x70, // ### - - // @600 'k' (5 pixels wide) - 0xC0, // ## - 0x40, // # - 0x58, // # ## - 0x70, // ### - 0x50, // # # - 0xD8, // ## ## - 0x00, // - 0x00, // - - // @608 'l' (5 pixels wide) - 0x60, // ## - 0x20, // # - 0x20, // # - 0x20, // # - 0x20, // # - 0x70, // ### - 0x00, // - 0x00, // - - // @616 'm' (5 pixels wide) - 0x00, // - 0x00, // - 0xD0, // ## # - 0xA8, // # # # - 0xA8, // # # # - 0xA8, // # # # - 0x00, // - 0x00, // - - // @624 'n' (5 pixels wide) - 0x00, // - 0x00, // - 0xF0, // #### - 0x48, // # # - 0x48, // # # - 0xC8, // ## # - 0x00, // - 0x00, // - - // @632 'o' (5 pixels wide) - 0x00, // - 0x00, // - 0x30, // ## - 0x48, // # # - 0x48, // # # - 0x30, // ## - 0x00, // - 0x00, // - - // @640 'p' (5 pixels wide) - 0x00, // - 0x00, // - 0xF0, // #### - 0x48, // # # - 0x48, // # # - 0x70, // ### - 0x40, // # - 0xE0, // ### - - // @648 'q' (5 pixels wide) - 0x00, // - 0x00, // - 0x38, // ### - 0x48, // # # - 0x48, // # # - 0x38, // ### - 0x08, // # - 0x18, // ## - - // @656 'r' (5 pixels wide) - 0x00, // - 0x00, // - 0x78, // #### - 0x20, // # - 0x20, // # - 0x70, // ### - 0x00, // - 0x00, // - - // @664 's' (5 pixels wide) - 0x00, // - 0x00, // - 0x30, // ## - 0x20, // # - 0x10, // # - 0x60, // ## - 0x00, // - 0x00, // - - // @672 't' (5 pixels wide) - 0x00, // - 0x40, // # - 0xF0, // #### - 0x40, // # - 0x48, // # # - 0x30, // ## - 0x00, // - 0x00, // - - // @680 'u' (5 pixels wide) - 0x00, // - 0x00, // - 0xD8, // ## ## - 0x48, // # # - 0x48, // # # - 0x38, // ### - 0x00, // - 0x00, // - - // @688 'v' (5 pixels wide) - 0x00, // - 0x00, // - 0xC8, // ## # - 0x48, // # # - 0x30, // ## - 0x30, // ## - 0x00, // - 0x00, // - - // @696 'w' (5 pixels wide) - 0x00, // - 0x00, // - 0xD8, // ## ## - 0xA8, // # # # - 0xA8, // # # # - 0x50, // # # - 0x00, // - 0x00, // - - // @704 'x' (5 pixels wide) - 0x00, // - 0x00, // - 0x48, // # # - 0x30, // ## - 0x30, // ## - 0x48, // # # - 0x00, // - 0x00, // - - // @712 'y' (5 pixels wide) - 0x00, // - 0x00, // - 0xD8, // ## ## - 0x50, // # # - 0x50, // # # - 0x20, // # - 0x20, // # - 0x60, // ## - - // @720 'z' (5 pixels wide) - 0x00, // - 0x00, // - 0x78, // #### - 0x50, // # # - 0x28, // # # - 0x78, // #### - 0x00, // - 0x00, // - - // @728 '{' (5 pixels wide) - 0x10, // # - 0x20, // # - 0x20, // # - 0x60, // ## - 0x20, // # - 0x20, // # - 0x10, // # - 0x00, // - - // @736 '|' (5 pixels wide) - 0x20, // # - 0x20, // # - 0x20, // # - 0x20, // # - 0x20, // # - 0x20, // # - 0x20, // # - 0x00, // - - // @744 '}' (5 pixels wide) - 0x40, // # - 0x20, // # - 0x20, // # - 0x30, // ## - 0x20, // # - 0x20, // # - 0x40, // # - 0x00, // - - // @752 '~' (5 pixels wide) - 0x00, // - 0x00, // - 0x00, // - 0x28, // # # - 0x50, // # # - 0x00, // - 0x00, // - 0x00, // -}; - -sFONT Font8 = { - Font8_Table, - 5, /* Width */ - 8, /* Height */ -}; - -/** - * @} - */ - - -/** @defgroup FONTS_Private_Function_Prototypes - * @{ - */ -/** - * @} - */ - - -/** @defgroup FONTS_Private_Functions - * @{ - */ - -/** - * @} - */ - -/** - * @} - */ - -/** - * @} - */ - -/** - * @} - */ - -/** - * @} - */ -/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
--- a/Fonts/fonts.h Mon May 30 11:09:05 2016 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,134 +0,0 @@ -/** - ****************************************************************************** - * @file fonts.h - * @author MCD Application Team - * @version V1.0.0 - * @date 18-February-2014 - * @brief Header for fonts.c file - ****************************************************************************** - * @attention - * - * <h2><center>© COPYRIGHT(c) 2014 STMicroelectronics</center></h2> - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. Neither the name of STMicroelectronics nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - ****************************************************************************** - */ - -/* Define to prevent recursive inclusion -------------------------------------*/ -#ifndef __FONTS_H -#define __FONTS_H - -#ifdef __cplusplus - extern "C" { -#endif - -/* Includes ------------------------------------------------------------------*/ -#include <stdint.h> - -/** @addtogroup Utilities - * @{ - */ - -/** @addtogroup STM32_EVAL - * @{ - */ - -/** @addtogroup Common - * @{ - */ - -/** @addtogroup FONTS - * @{ - */ - -/** @defgroup FONTS_Exported_Types - * @{ - */ -typedef struct _tFont -{ - const uint8_t *table; - uint16_t Width; - uint16_t Height; - -} sFONT; - -extern sFONT Font24; -extern sFONT Font20; -extern sFONT Font16; -extern sFONT Font12; -extern sFONT Font8; -/** - * @} - */ - -/** @defgroup FONTS_Exported_Constants - * @{ - */ -#define LINE(x) ((x) * (((sFONT *)BSP_LCD_GetFont())->Height)) - -/** - * @} - */ - -/** @defgroup FONTS_Exported_Macros - * @{ - */ -/** - * @} - */ - -/** @defgroup FONTS_Exported_Functions - * @{ - */ -/** - * @} - */ - -#ifdef __cplusplus -} -#endif - -#endif /* __FONTS_H */ - -/** - * @} - */ - -/** - * @} - */ - -/** - * @} - */ - -/** - * @} - */ - -/** - * @} - */ - -/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
--- a/PDM/pdm_filter.h Mon May 30 11:09:05 2016 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,76 +0,0 @@ -/** - ****************************************************************************** - * @file pdm_filter.h - * @author MCD Application Team - * @version V2.1.0 - * @date 31-March-2015 - * @brief Header file for PDM audio software decoding Library. - * This Library is used to decode and reconstruct the audio signal - * produced by ST MEMS microphone (MP45Dxxx, MP34Dxxx). - * For more details about this Library, please refer to document - * "PDM audio software decoding on STM32 microcontrollers (AN3998)". - ****************************************************************************** - * @attention - * - * <h2><center>© COPYRIGHT 2015 STMicroelectronics</center></h2> - * - * Licensed under MCD-ST Image SW License Agreement V2, (the "License"); - * You may not use this file except in compliance with the License. - * You may obtain a copy of the License at: - * - * http://www.st.com/software_license_agreement_image_v2 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - ****************************************************************************** - */ - -/* Define to prevent recursive inclusion -------------------------------------*/ -#ifndef __PDM_FILTER_H -#define __PDM_FILTER_H - -#ifdef __cplusplus - extern "C" { -#endif - -/* Includes ------------------------------------------------------------------*/ -#include <stdint.h> - - -/* Exported types ------------------------------------------------------------*/ -typedef struct { - uint16_t Fs; - float LP_HZ; - float HP_HZ; - uint16_t In_MicChannels; - uint16_t Out_MicChannels; - char InternalFilter[34]; -} PDMFilter_InitStruct; - -/* Exported constants --------------------------------------------------------*/ -/* Exported macros -----------------------------------------------------------*/ -#define HTONS(A) ((((uint16_t)(A) & 0xff00) >> 8) | \ - (((uint16_t)(A) & 0x00ff) << 8)) - -/* Exported functions ------------------------------------------------------- */ -void PDM_Filter_Init(PDMFilter_InitStruct * Filter); - -int32_t PDM_Filter_64_MSB(uint8_t* data, uint16_t* dataOut, uint16_t MicGain, PDMFilter_InitStruct * Filter); -int32_t PDM_Filter_80_MSB(uint8_t* data, uint16_t* dataOut, uint16_t MicGain, PDMFilter_InitStruct * Filter); -int32_t PDM_Filter_128_MSB(uint8_t* data, uint16_t* dataOut, uint16_t MicGain, PDMFilter_InitStruct * Filter); -int32_t PDM_Filter_64_LSB(uint8_t* data, uint16_t* dataOut, uint16_t MicGain, PDMFilter_InitStruct * Filter); -int32_t PDM_Filter_80_LSB(uint8_t* data, uint16_t* dataOut, uint16_t MicGain, PDMFilter_InitStruct * Filter); -int32_t PDM_Filter_128_LSB(uint8_t* data, uint16_t* dataOut, uint16_t MicGain, PDMFilter_InitStruct * Filter); - -#ifdef __cplusplus -} -#endif - -#endif /* __PDM_FILTER_H */ - -/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ -
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Utilities/Fonts/font12.c Tue May 16 10:50:26 2017 +0200 @@ -0,0 +1,1464 @@ +/** + ****************************************************************************** + * @file Font12.c + * @author MCD Application Team + * @version V1.0.0 + * @date 18-February-2014 + * @brief This file provides text Font12 for STM32xx-EVAL's LCD driver. + ****************************************************************************** + * @attention + * + * <h2><center>© COPYRIGHT(c) 2014 STMicroelectronics</center></h2> + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * 3. Neither the name of STMicroelectronics nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + ****************************************************************************** + */ + +/* Includes ------------------------------------------------------------------*/ +#include "fonts.h" + +/** @addtogroup Utilities + * @{ + */ + +/** @addtogroup STM32_EVAL + * @{ + */ + +/** @addtogroup Common + * @{ + */ + +/** @addtogroup FONTS + * @brief This file provides text Font12 for STM32xx-EVAL's LCD driver. + * @{ + */ + +/** @defgroup FONTS_Private_Types + * @{ + */ +/** + * @} + */ + + +/** @defgroup FONTS_Private_Defines + * @{ + */ +/** + * @} + */ + + +/** @defgroup FONTS_Private_Macros + * @{ + */ +/** + * @} + */ + + +/** @defgroup FONTS_Private_Variables + * @{ + */ +// +// Font data for Courier New 12pt +// + +const uint8_t Font12_Table[] = +{ + // @0 ' ' (7 pixels wide) + 0x00, // + 0x00, // + 0x00, // + 0x00, // + 0x00, // + 0x00, // + 0x00, // + 0x00, // + 0x00, // + 0x00, // + 0x00, // + 0x00, // + + // @12 '!' (7 pixels wide) + 0x00, // + 0x10, // # + 0x10, // # + 0x10, // # + 0x10, // # + 0x10, // # + 0x00, // + 0x00, // + 0x10, // # + 0x00, // + 0x00, // + 0x00, // + + // @24 '"' (7 pixels wide) + 0x00, // + 0x6C, // ## ## + 0x48, // # # + 0x48, // # # + 0x00, // + 0x00, // + 0x00, // + 0x00, // + 0x00, // + 0x00, // + 0x00, // + 0x00, // + + // @36 '#' (7 pixels wide) + 0x00, // + 0x14, // # # + 0x14, // # # + 0x28, // # # + 0x7C, // ##### + 0x28, // # # + 0x7C, // ##### + 0x28, // # # + 0x50, // # # + 0x50, // # # + 0x00, // + 0x00, // + + // @48 '$' (7 pixels wide) + 0x00, // + 0x10, // # + 0x38, // ### + 0x40, // # + 0x40, // # + 0x38, // ### + 0x48, // # # + 0x70, // ### + 0x10, // # + 0x10, // # + 0x00, // + 0x00, // + + // @60 '%' (7 pixels wide) + 0x00, // + 0x20, // # + 0x50, // # # + 0x20, // # + 0x0C, // ## + 0x70, // ### + 0x08, // # + 0x14, // # # + 0x08, // # + 0x00, // + 0x00, // + 0x00, // + + // @72 '&' (7 pixels wide) + 0x00, // + 0x00, // + 0x00, // + 0x18, // ## + 0x20, // # + 0x20, // # + 0x54, // # # # + 0x48, // # # + 0x34, // ## # + 0x00, // + 0x00, // + 0x00, // + + // @84 ''' (7 pixels wide) + 0x00, // + 0x10, // # + 0x10, // # + 0x10, // # + 0x10, // # + 0x00, // + 0x00, // + 0x00, // + 0x00, // + 0x00, // + 0x00, // + 0x00, // + + // @96 '(' (7 pixels wide) + 0x00, // + 0x08, // # + 0x08, // # + 0x10, // # + 0x10, // # + 0x10, // # + 0x10, // # + 0x10, // # + 0x10, // # + 0x08, // # + 0x08, // # + 0x00, // + + // @108 ')' (7 pixels wide) + 0x00, // + 0x20, // # + 0x20, // # + 0x10, // # + 0x10, // # + 0x10, // # + 0x10, // # + 0x10, // # + 0x10, // # + 0x20, // # + 0x20, // # + 0x00, // + + // @120 '*' (7 pixels wide) + 0x00, // + 0x10, // # + 0x7C, // ##### + 0x10, // # + 0x28, // # # + 0x28, // # # + 0x00, // + 0x00, // + 0x00, // + 0x00, // + 0x00, // + 0x00, // + + // @132 '+' (7 pixels wide) + 0x00, // + 0x00, // + 0x10, // # + 0x10, // # + 0x10, // # + 0xFE, // ####### + 0x10, // # + 0x10, // # + 0x10, // # + 0x00, // + 0x00, // + 0x00, // + + // @144 ',' (7 pixels wide) + 0x00, // + 0x00, // + 0x00, // + 0x00, // + 0x00, // + 0x00, // + 0x00, // + 0x18, // ## + 0x10, // # + 0x30, // ## + 0x20, // # + 0x00, // + + // @156 '-' (7 pixels wide) + 0x00, // + 0x00, // + 0x00, // + 0x00, // + 0x00, // + 0x7C, // ##### + 0x00, // + 0x00, // + 0x00, // + 0x00, // + 0x00, // + 0x00, // + + // @168 '.' (7 pixels wide) + 0x00, // + 0x00, // + 0x00, // + 0x00, // + 0x00, // + 0x00, // + 0x00, // + 0x30, // ## + 0x30, // ## + 0x00, // + 0x00, // + 0x00, // + + // @180 '/' (7 pixels wide) + 0x00, // + 0x04, // # + 0x04, // # + 0x08, // # + 0x08, // # + 0x10, // # + 0x10, // # + 0x20, // # + 0x20, // # + 0x40, // # + 0x00, // + 0x00, // + + // @192 '0' (7 pixels wide) + 0x00, // + 0x38, // ### + 0x44, // # # + 0x44, // # # + 0x44, // # # + 0x44, // # # + 0x44, // # # + 0x44, // # # + 0x38, // ### + 0x00, // + 0x00, // + 0x00, // + + // @204 '1' (7 pixels wide) + 0x00, // + 0x30, // ## + 0x10, // # + 0x10, // # + 0x10, // # + 0x10, // # + 0x10, // # + 0x10, // # + 0x7C, // ##### + 0x00, // + 0x00, // + 0x00, // + + // @216 '2' (7 pixels wide) + 0x00, // + 0x38, // ### + 0x44, // # # + 0x04, // # + 0x08, // # + 0x10, // # + 0x20, // # + 0x44, // # # + 0x7C, // ##### + 0x00, // + 0x00, // + 0x00, // + + // @228 '3' (7 pixels wide) + 0x00, // + 0x38, // ### + 0x44, // # # + 0x04, // # + 0x18, // ## + 0x04, // # + 0x04, // # + 0x44, // # # + 0x38, // ### + 0x00, // + 0x00, // + 0x00, // + + // @240 '4' (7 pixels wide) + 0x00, // + 0x0C, // ## + 0x14, // # # + 0x14, // # # + 0x24, // # # + 0x44, // # # + 0x7E, // ###### + 0x04, // # + 0x0E, // ### + 0x00, // + 0x00, // + 0x00, // + + // @252 '5' (7 pixels wide) + 0x00, // + 0x3C, // #### + 0x20, // # + 0x20, // # + 0x38, // ### + 0x04, // # + 0x04, // # + 0x44, // # # + 0x38, // ### + 0x00, // + 0x00, // + 0x00, // + + // @264 '6' (7 pixels wide) + 0x00, // + 0x1C, // ### + 0x20, // # + 0x40, // # + 0x78, // #### + 0x44, // # # + 0x44, // # # + 0x44, // # # + 0x38, // ### + 0x00, // + 0x00, // + 0x00, // + + // @276 '7' (7 pixels wide) + 0x00, // + 0x7C, // ##### + 0x44, // # # + 0x04, // # + 0x08, // # + 0x08, // # + 0x08, // # + 0x10, // # + 0x10, // # + 0x00, // + 0x00, // + 0x00, // + + // @288 '8' (7 pixels wide) + 0x00, // + 0x38, // ### + 0x44, // # # + 0x44, // # # + 0x38, // ### + 0x44, // # # + 0x44, // # # + 0x44, // # # + 0x38, // ### + 0x00, // + 0x00, // + 0x00, // + + // @300 '9' (7 pixels wide) + 0x00, // + 0x38, // ### + 0x44, // # # + 0x44, // # # + 0x44, // # # + 0x3C, // #### + 0x04, // # + 0x08, // # + 0x70, // ### + 0x00, // + 0x00, // + 0x00, // + + // @312 ':' (7 pixels wide) + 0x00, // + 0x00, // + 0x00, // + 0x30, // ## + 0x30, // ## + 0x00, // + 0x00, // + 0x30, // ## + 0x30, // ## + 0x00, // + 0x00, // + 0x00, // + + // @324 ';' (7 pixels wide) + 0x00, // + 0x00, // + 0x00, // + 0x18, // ## + 0x18, // ## + 0x00, // + 0x00, // + 0x18, // ## + 0x30, // ## + 0x20, // # + 0x00, // + 0x00, // + + // @336 '<' (7 pixels wide) + 0x00, // + 0x00, // + 0x0C, // ## + 0x10, // # + 0x60, // ## + 0x80, // # + 0x60, // ## + 0x10, // # + 0x0C, // ## + 0x00, // + 0x00, // + 0x00, // + + // @348 '=' (7 pixels wide) + 0x00, // + 0x00, // + 0x00, // + 0x00, // + 0x7C, // ##### + 0x00, // + 0x7C, // ##### + 0x00, // + 0x00, // + 0x00, // + 0x00, // + 0x00, // + + // @360 '>' (7 pixels wide) + 0x00, // + 0x00, // + 0xC0, // ## + 0x20, // # + 0x18, // ## + 0x04, // # + 0x18, // ## + 0x20, // # + 0xC0, // ## + 0x00, // + 0x00, // + 0x00, // + + // @372 '?' (7 pixels wide) + 0x00, // + 0x00, // + 0x18, // ## + 0x24, // # # + 0x04, // # + 0x08, // # + 0x10, // # + 0x00, // + 0x30, // ## + 0x00, // + 0x00, // + 0x00, // + + // @384 '@' (7 pixels wide) + 0x38, // ### + 0x44, // # # + 0x44, // # # + 0x4C, // # ## + 0x54, // # # # + 0x54, // # # # + 0x4C, // # ## + 0x40, // # + 0x44, // # # + 0x38, // ### + 0x00, // + 0x00, // + + // @396 'A' (7 pixels wide) + 0x00, // + 0x30, // ## + 0x10, // # + 0x28, // # # + 0x28, // # # + 0x28, // # # + 0x7C, // ##### + 0x44, // # # + 0xEE, // ### ### + 0x00, // + 0x00, // + 0x00, // + + // @408 'B' (7 pixels wide) + 0x00, // + 0xF8, // ##### + 0x44, // # # + 0x44, // # # + 0x78, // #### + 0x44, // # # + 0x44, // # # + 0x44, // # # + 0xF8, // ##### + 0x00, // + 0x00, // + 0x00, // + + // @420 'C' (7 pixels wide) + 0x00, // + 0x3C, // #### + 0x44, // # # + 0x40, // # + 0x40, // # + 0x40, // # + 0x40, // # + 0x44, // # # + 0x38, // ### + 0x00, // + 0x00, // + 0x00, // + + // @432 'D' (7 pixels wide) + 0x00, // + 0xF0, // #### + 0x48, // # # + 0x44, // # # + 0x44, // # # + 0x44, // # # + 0x44, // # # + 0x48, // # # + 0xF0, // #### + 0x00, // + 0x00, // + 0x00, // + + // @444 'E' (7 pixels wide) + 0x00, // + 0xFC, // ###### + 0x44, // # # + 0x50, // # # + 0x70, // ### + 0x50, // # # + 0x40, // # + 0x44, // # # + 0xFC, // ###### + 0x00, // + 0x00, // + 0x00, // + + // @456 'F' (7 pixels wide) + 0x00, // + 0x7E, // ###### + 0x22, // # # + 0x28, // # # + 0x38, // ### + 0x28, // # # + 0x20, // # + 0x20, // # + 0x70, // ### + 0x00, // + 0x00, // + 0x00, // + + // @468 'G' (7 pixels wide) + 0x00, // + 0x3C, // #### + 0x44, // # # + 0x40, // # + 0x40, // # + 0x4E, // # ### + 0x44, // # # + 0x44, // # # + 0x38, // ### + 0x00, // + 0x00, // + 0x00, // + + // @480 'H' (7 pixels wide) + 0x00, // + 0xEE, // ### ### + 0x44, // # # + 0x44, // # # + 0x7C, // ##### + 0x44, // # # + 0x44, // # # + 0x44, // # # + 0xEE, // ### ### + 0x00, // + 0x00, // + 0x00, // + + // @492 'I' (7 pixels wide) + 0x00, // + 0x7C, // ##### + 0x10, // # + 0x10, // # + 0x10, // # + 0x10, // # + 0x10, // # + 0x10, // # + 0x7C, // ##### + 0x00, // + 0x00, // + 0x00, // + + // @504 'J' (7 pixels wide) + 0x00, // + 0x3C, // #### + 0x08, // # + 0x08, // # + 0x08, // # + 0x48, // # # + 0x48, // # # + 0x48, // # # + 0x30, // ## + 0x00, // + 0x00, // + 0x00, // + + // @516 'K' (7 pixels wide) + 0x00, // + 0xEE, // ### ### + 0x44, // # # + 0x48, // # # + 0x50, // # # + 0x70, // ### + 0x48, // # # + 0x44, // # # + 0xE6, // ### ## + 0x00, // + 0x00, // + 0x00, // + + // @528 'L' (7 pixels wide) + 0x00, // + 0x70, // ### + 0x20, // # + 0x20, // # + 0x20, // # + 0x20, // # + 0x24, // # # + 0x24, // # # + 0x7C, // ##### + 0x00, // + 0x00, // + 0x00, // + + // @540 'M' (7 pixels wide) + 0x00, // + 0xEE, // ### ### + 0x6C, // ## ## + 0x6C, // ## ## + 0x54, // # # # + 0x54, // # # # + 0x44, // # # + 0x44, // # # + 0xEE, // ### ### + 0x00, // + 0x00, // + 0x00, // + + // @552 'N' (7 pixels wide) + 0x00, // + 0xEE, // ### ### + 0x64, // ## # + 0x64, // ## # + 0x54, // # # # + 0x54, // # # # + 0x54, // # # # + 0x4C, // # ## + 0xEC, // ### ## + 0x00, // + 0x00, // + 0x00, // + + // @564 'O' (7 pixels wide) + 0x00, // + 0x38, // ### + 0x44, // # # + 0x44, // # # + 0x44, // # # + 0x44, // # # + 0x44, // # # + 0x44, // # # + 0x38, // ### + 0x00, // + 0x00, // + 0x00, // + + // @576 'P' (7 pixels wide) + 0x00, // + 0x78, // #### + 0x24, // # # + 0x24, // # # + 0x24, // # # + 0x38, // ### + 0x20, // # + 0x20, // # + 0x70, // ### + 0x00, // + 0x00, // + 0x00, // + + // @588 'Q' (7 pixels wide) + 0x00, // + 0x38, // ### + 0x44, // # # + 0x44, // # # + 0x44, // # # + 0x44, // # # + 0x44, // # # + 0x44, // # # + 0x38, // ### + 0x1C, // ### + 0x00, // + 0x00, // + + // @600 'R' (7 pixels wide) + 0x00, // + 0xF8, // ##### + 0x44, // # # + 0x44, // # # + 0x44, // # # + 0x78, // #### + 0x48, // # # + 0x44, // # # + 0xE2, // ### # + 0x00, // + 0x00, // + 0x00, // + + // @612 'S' (7 pixels wide) + 0x00, // + 0x34, // ## # + 0x4C, // # ## + 0x40, // # + 0x38, // ### + 0x04, // # + 0x04, // # + 0x64, // ## # + 0x58, // # ## + 0x00, // + 0x00, // + 0x00, // + + // @624 'T' (7 pixels wide) + 0x00, // + 0xFE, // ####### + 0x92, // # # # + 0x10, // # + 0x10, // # + 0x10, // # + 0x10, // # + 0x10, // # + 0x38, // ### + 0x00, // + 0x00, // + 0x00, // + + // @636 'U' (7 pixels wide) + 0x00, // + 0xEE, // ### ### + 0x44, // # # + 0x44, // # # + 0x44, // # # + 0x44, // # # + 0x44, // # # + 0x44, // # # + 0x38, // ### + 0x00, // + 0x00, // + 0x00, // + + // @648 'V' (7 pixels wide) + 0x00, // + 0xEE, // ### ### + 0x44, // # # + 0x44, // # # + 0x28, // # # + 0x28, // # # + 0x28, // # # + 0x10, // # + 0x10, // # + 0x00, // + 0x00, // + 0x00, // + + // @660 'W' (7 pixels wide) + 0x00, // + 0xEE, // ### ### + 0x44, // # # + 0x44, // # # + 0x54, // # # # + 0x54, // # # # + 0x54, // # # # + 0x54, // # # # + 0x28, // # # + 0x00, // + 0x00, // + 0x00, // + + // @672 'X' (7 pixels wide) + 0x00, // + 0xC6, // ## ## + 0x44, // # # + 0x28, // # # + 0x10, // # + 0x10, // # + 0x28, // # # + 0x44, // # # + 0xC6, // ## ## + 0x00, // + 0x00, // + 0x00, // + + // @684 'Y' (7 pixels wide) + 0x00, // + 0xEE, // ### ### + 0x44, // # # + 0x28, // # # + 0x28, // # # + 0x10, // # + 0x10, // # + 0x10, // # + 0x38, // ### + 0x00, // + 0x00, // + 0x00, // + + // @696 'Z' (7 pixels wide) + 0x00, // + 0x7C, // ##### + 0x44, // # # + 0x08, // # + 0x10, // # + 0x10, // # + 0x20, // # + 0x44, // # # + 0x7C, // ##### + 0x00, // + 0x00, // + 0x00, // + + // @708 '[' (7 pixels wide) + 0x00, // + 0x38, // ### + 0x20, // # + 0x20, // # + 0x20, // # + 0x20, // # + 0x20, // # + 0x20, // # + 0x20, // # + 0x20, // # + 0x38, // ### + 0x00, // + + // @720 '\' (7 pixels wide) + 0x00, // + 0x40, // # + 0x20, // # + 0x20, // # + 0x20, // # + 0x10, // # + 0x10, // # + 0x08, // # + 0x08, // # + 0x08, // # + 0x00, // + 0x00, // + + // @732 ']' (7 pixels wide) + 0x00, // + 0x38, // ### + 0x08, // # + 0x08, // # + 0x08, // # + 0x08, // # + 0x08, // # + 0x08, // # + 0x08, // # + 0x08, // # + 0x38, // ### + 0x00, // + + // @744 '^' (7 pixels wide) + 0x00, // + 0x10, // # + 0x10, // # + 0x28, // # # + 0x44, // # # + 0x00, // + 0x00, // + 0x00, // + 0x00, // + 0x00, // + 0x00, // + 0x00, // + + // @756 '_' (7 pixels wide) + 0x00, // + 0x00, // + 0x00, // + 0x00, // + 0x00, // + 0x00, // + 0x00, // + 0x00, // + 0x00, // + 0x00, // + 0x00, // + 0xFE, // ####### + + // @768 '`' (7 pixels wide) + 0x00, // + 0x10, // # + 0x08, // # + 0x00, // + 0x00, // + 0x00, // + 0x00, // + 0x00, // + 0x00, // + 0x00, // + 0x00, // + 0x00, // + + // @780 'a' (7 pixels wide) + 0x00, // + 0x00, // + 0x00, // + 0x38, // ### + 0x44, // # # + 0x3C, // #### + 0x44, // # # + 0x44, // # # + 0x3E, // ##### + 0x00, // + 0x00, // + 0x00, // + + // @792 'b' (7 pixels wide) + 0x00, // + 0xC0, // ## + 0x40, // # + 0x58, // # ## + 0x64, // ## # + 0x44, // # # + 0x44, // # # + 0x44, // # # + 0xF8, // ##### + 0x00, // + 0x00, // + 0x00, // + + // @804 'c' (7 pixels wide) + 0x00, // + 0x00, // + 0x00, // + 0x3C, // #### + 0x44, // # # + 0x40, // # + 0x40, // # + 0x44, // # # + 0x38, // ### + 0x00, // + 0x00, // + 0x00, // + + // @816 'd' (7 pixels wide) + 0x00, // + 0x0C, // ## + 0x04, // # + 0x34, // ## # + 0x4C, // # ## + 0x44, // # # + 0x44, // # # + 0x44, // # # + 0x3E, // ##### + 0x00, // + 0x00, // + 0x00, // + + // @828 'e' (7 pixels wide) + 0x00, // + 0x00, // + 0x00, // + 0x38, // ### + 0x44, // # # + 0x7C, // ##### + 0x40, // # + 0x40, // # + 0x3C, // #### + 0x00, // + 0x00, // + 0x00, // + + // @840 'f' (7 pixels wide) + 0x00, // + 0x1C, // ### + 0x20, // # + 0x7C, // ##### + 0x20, // # + 0x20, // # + 0x20, // # + 0x20, // # + 0x7C, // ##### + 0x00, // + 0x00, // + 0x00, // + + // @852 'g' (7 pixels wide) + 0x00, // + 0x00, // + 0x00, // + 0x36, // ## ## + 0x4C, // # ## + 0x44, // # # + 0x44, // # # + 0x44, // # # + 0x3C, // #### + 0x04, // # + 0x38, // ### + 0x00, // + + // @864 'h' (7 pixels wide) + 0x00, // + 0xC0, // ## + 0x40, // # + 0x58, // # ## + 0x64, // ## # + 0x44, // # # + 0x44, // # # + 0x44, // # # + 0xEE, // ### ### + 0x00, // + 0x00, // + 0x00, // + + // @876 'i' (7 pixels wide) + 0x00, // + 0x10, // # + 0x00, // + 0x70, // ### + 0x10, // # + 0x10, // # + 0x10, // # + 0x10, // # + 0x7C, // ##### + 0x00, // + 0x00, // + 0x00, // + + // @888 'j' (7 pixels wide) + 0x00, // + 0x10, // # + 0x00, // + 0x78, // #### + 0x08, // # + 0x08, // # + 0x08, // # + 0x08, // # + 0x08, // # + 0x08, // # + 0x70, // ### + 0x00, // + + // @900 'k' (7 pixels wide) + 0x00, // + 0xC0, // ## + 0x40, // # + 0x5C, // # ### + 0x48, // # # + 0x70, // ### + 0x50, // # # + 0x48, // # # + 0xDC, // ## ### + 0x00, // + 0x00, // + 0x00, // + + // @912 'l' (7 pixels wide) + 0x00, // + 0x30, // ## + 0x10, // # + 0x10, // # + 0x10, // # + 0x10, // # + 0x10, // # + 0x10, // # + 0x7C, // ##### + 0x00, // + 0x00, // + 0x00, // + + // @924 'm' (7 pixels wide) + 0x00, // + 0x00, // + 0x00, // + 0xE8, // ### # + 0x54, // # # # + 0x54, // # # # + 0x54, // # # # + 0x54, // # # # + 0xFE, // ####### + 0x00, // + 0x00, // + 0x00, // + + // @936 'n' (7 pixels wide) + 0x00, // + 0x00, // + 0x00, // + 0xD8, // ## ## + 0x64, // ## # + 0x44, // # # + 0x44, // # # + 0x44, // # # + 0xEE, // ### ### + 0x00, // + 0x00, // + 0x00, // + + // @948 'o' (7 pixels wide) + 0x00, // + 0x00, // + 0x00, // + 0x38, // ### + 0x44, // # # + 0x44, // # # + 0x44, // # # + 0x44, // # # + 0x38, // ### + 0x00, // + 0x00, // + 0x00, // + + // @960 'p' (7 pixels wide) + 0x00, // + 0x00, // + 0x00, // + 0xD8, // ## ## + 0x64, // ## # + 0x44, // # # + 0x44, // # # + 0x44, // # # + 0x78, // #### + 0x40, // # + 0xE0, // ### + 0x00, // + + // @972 'q' (7 pixels wide) + 0x00, // + 0x00, // + 0x00, // + 0x36, // ## ## + 0x4C, // # ## + 0x44, // # # + 0x44, // # # + 0x44, // # # + 0x3C, // #### + 0x04, // # + 0x0E, // ### + 0x00, // + + // @984 'r' (7 pixels wide) + 0x00, // + 0x00, // + 0x00, // + 0x6C, // ## ## + 0x30, // ## + 0x20, // # + 0x20, // # + 0x20, // # + 0x7C, // ##### + 0x00, // + 0x00, // + 0x00, // + + // @996 's' (7 pixels wide) + 0x00, // + 0x00, // + 0x00, // + 0x3C, // #### + 0x44, // # # + 0x38, // ### + 0x04, // # + 0x44, // # # + 0x78, // #### + 0x00, // + 0x00, // + 0x00, // + + // @1008 't' (7 pixels wide) + 0x00, // + 0x00, // + 0x20, // # + 0x7C, // ##### + 0x20, // # + 0x20, // # + 0x20, // # + 0x22, // # # + 0x1C, // ### + 0x00, // + 0x00, // + 0x00, // + + // @1020 'u' (7 pixels wide) + 0x00, // + 0x00, // + 0x00, // + 0xCC, // ## ## + 0x44, // # # + 0x44, // # # + 0x44, // # # + 0x4C, // # ## + 0x36, // ## ## + 0x00, // + 0x00, // + 0x00, // + + // @1032 'v' (7 pixels wide) + 0x00, // + 0x00, // + 0x00, // + 0xEE, // ### ### + 0x44, // # # + 0x44, // # # + 0x28, // # # + 0x28, // # # + 0x10, // # + 0x00, // + 0x00, // + 0x00, // + + // @1044 'w' (7 pixels wide) + 0x00, // + 0x00, // + 0x00, // + 0xEE, // ### ### + 0x44, // # # + 0x54, // # # # + 0x54, // # # # + 0x54, // # # # + 0x28, // # # + 0x00, // + 0x00, // + 0x00, // + + // @1056 'x' (7 pixels wide) + 0x00, // + 0x00, // + 0x00, // + 0xCC, // ## ## + 0x48, // # # + 0x30, // ## + 0x30, // ## + 0x48, // # # + 0xCC, // ## ## + 0x00, // + 0x00, // + 0x00, // + + // @1068 'y' (7 pixels wide) + 0x00, // + 0x00, // + 0x00, // + 0xEE, // ### ### + 0x44, // # # + 0x24, // # # + 0x28, // # # + 0x18, // ## + 0x10, // # + 0x10, // # + 0x78, // #### + 0x00, // + + // @1080 'z' (7 pixels wide) + 0x00, // + 0x00, // + 0x00, // + 0x7C, // ##### + 0x48, // # # + 0x10, // # + 0x20, // # + 0x44, // # # + 0x7C, // ##### + 0x00, // + 0x00, // + 0x00, // + + // @1092 '{' (7 pixels wide) + 0x00, // + 0x08, // # + 0x10, // # + 0x10, // # + 0x10, // # + 0x10, // # + 0x20, // # + 0x10, // # + 0x10, // # + 0x10, // # + 0x08, // # + 0x00, // + + // @1104 '|' (7 pixels wide) + 0x00, // + 0x10, // # + 0x10, // # + 0x10, // # + 0x10, // # + 0x10, // # + 0x10, // # + 0x10, // # + 0x10, // # + 0x10, // # + 0x00, // + 0x00, // + + // @1116 '}' (7 pixels wide) + 0x00, // + 0x20, // # + 0x10, // # + 0x10, // # + 0x10, // # + 0x10, // # + 0x08, // # + 0x10, // # + 0x10, // # + 0x10, // # + 0x20, // # + 0x00, // + + // @1128 '~' (7 pixels wide) + 0x00, // + 0x00, // + 0x00, // + 0x00, // + 0x00, // + 0x24, // # # + 0x58, // # ## + 0x00, // + 0x00, // + 0x00, // + 0x00, // + 0x00, // +}; + +sFONT Font12 = { + Font12_Table, + 7, /* Width */ + 12, /* Height */ +}; + +/** + * @} + */ + + +/** @defgroup FONTS_Private_Function_Prototypes + * @{ + */ +/** + * @} + */ + + +/** @defgroup FONTS_Private_Functions + * @{ + */ + +/** + * @} + */ + +/** + * @} + */ + +/** + * @} + */ + +/** + * @} + */ + +/** + * @} + */ +/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Utilities/Fonts/font16.c Tue May 16 10:50:26 2017 +0200 @@ -0,0 +1,1844 @@ +/** + ****************************************************************************** + * @file font16.c + * @author MCD Application Team + * @version V1.0.0 + * @date 18-February-2014 + * @brief This file provides text font16 for STM32xx-EVAL's LCD driver. + ****************************************************************************** + * @attention + * + * <h2><center>© COPYRIGHT(c) 2014 STMicroelectronics</center></h2> + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * 3. Neither the name of STMicroelectronics nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + ****************************************************************************** + */ + +/* Includes ------------------------------------------------------------------*/ +#include "fonts.h" + +/** @addtogroup Utilities + * @{ + */ + +/** @addtogroup STM32_EVAL + * @{ + */ + +/** @addtogroup Common + * @{ + */ + +/** @addtogroup FONTS + * @brief This file provides text font16 for STM32xx-EVAL's LCD driver. + * @{ + */ + +/** @defgroup FONTS_Private_Types + * @{ + */ +/** + * @} + */ + + +/** @defgroup FONTS_Private_Defines + * @{ + */ +/** + * @} + */ + + +/** @defgroup FONTS_Private_Macros + * @{ + */ +/** + * @} + */ + + +/** @defgroup FONTS_Private_Variables + * @{ + */ +// +// Font data for Courier New 12pt +// + +const uint8_t Font16_Table[] = +{ + // @0 ' ' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @32 '!' (11 pixels wide) + 0x00, 0x00, // + 0x0C, 0x00, // ## + 0x0C, 0x00, // ## + 0x0C, 0x00, // ## + 0x0C, 0x00, // ## + 0x0C, 0x00, // ## + 0x0C, 0x00, // ## + 0x0C, 0x00, // ## + 0x0C, 0x00, // ## + 0x00, 0x00, // + 0x0C, 0x00, // ## + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @64 '"' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x1D, 0xC0, // ### ### + 0x1D, 0xC0, // ### ### + 0x08, 0x80, // # # + 0x08, 0x80, // # # + 0x08, 0x80, // # # + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @96 '#' (11 pixels wide) + 0x00, 0x00, // + 0x0D, 0x80, // ## ## + 0x0D, 0x80, // ## ## + 0x0D, 0x80, // ## ## + 0x0D, 0x80, // ## ## + 0x3F, 0xC0, // ######## + 0x1B, 0x00, // ## ## + 0x3F, 0xC0, // ######## + 0x1B, 0x00, // ## ## + 0x1B, 0x00, // ## ## + 0x1B, 0x00, // ## ## + 0x1B, 0x00, // ## ## + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @128 '$' (11 pixels wide) + 0x04, 0x00, // # + 0x1F, 0x80, // ###### + 0x31, 0x80, // ## ## + 0x31, 0x80, // ## ## + 0x38, 0x00, // ### + 0x1E, 0x00, // #### + 0x0F, 0x00, // #### + 0x03, 0x80, // ### + 0x31, 0x80, // ## ## + 0x31, 0x80, // ## ## + 0x3F, 0x00, // ###### + 0x04, 0x00, // # + 0x04, 0x00, // # + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @160 '%' (11 pixels wide) + 0x00, 0x00, // + 0x18, 0x00, // ## + 0x24, 0x00, // # # + 0x24, 0x00, // # # + 0x18, 0xC0, // ## ## + 0x07, 0x80, // #### + 0x1E, 0x00, // #### + 0x31, 0x80, // ## ## + 0x02, 0x40, // # # + 0x02, 0x40, // # # + 0x01, 0x80, // ## + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @192 '&' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x0F, 0x00, // #### + 0x18, 0x00, // ## + 0x18, 0x00, // ## + 0x18, 0x00, // ## + 0x0C, 0x00, // ## + 0x1D, 0x80, // ### ## + 0x37, 0x00, // ## ### + 0x33, 0x00, // ## ## + 0x1D, 0x80, // ### ## + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @224 ''' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x07, 0x00, // ### + 0x07, 0x00, // ### + 0x02, 0x00, // # + 0x02, 0x00, // # + 0x02, 0x00, // # + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @256 '(' (11 pixels wide) + 0x00, 0x00, // + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x06, 0x00, // ## + 0x0E, 0x00, // ### + 0x0C, 0x00, // ## + 0x0C, 0x00, // ## + 0x0C, 0x00, // ## + 0x0C, 0x00, // ## + 0x0E, 0x00, // ### + 0x06, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @288 ')' (11 pixels wide) + 0x00, 0x00, // + 0x18, 0x00, // ## + 0x18, 0x00, // ## + 0x0C, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x0C, 0x00, // ## + 0x1C, 0x00, // ### + 0x18, 0x00, // ## + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @320 '*' (11 pixels wide) + 0x00, 0x00, // + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x3F, 0xC0, // ######## + 0x3F, 0xC0, // ######## + 0x0F, 0x00, // #### + 0x1F, 0x80, // ###### + 0x19, 0x80, // ## ## + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @352 '+' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x04, 0x00, // # + 0x04, 0x00, // # + 0x04, 0x00, // # + 0x3F, 0x80, // ####### + 0x04, 0x00, // # + 0x04, 0x00, // # + 0x04, 0x00, // # + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @384 ',' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x06, 0x00, // ## + 0x04, 0x00, // # + 0x0C, 0x00, // ## + 0x08, 0x00, // # + 0x08, 0x00, // # + 0x00, 0x00, // + 0x00, 0x00, // + + // @416 '-' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x3F, 0x80, // ####### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @448 '.' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x0C, 0x00, // ## + 0x0C, 0x00, // ## + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @480 '/' (11 pixels wide) + 0x00, 0xC0, // ## + 0x00, 0xC0, // ## + 0x01, 0x80, // ## + 0x01, 0x80, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x06, 0x00, // ## + 0x0C, 0x00, // ## + 0x0C, 0x00, // ## + 0x18, 0x00, // ## + 0x18, 0x00, // ## + 0x30, 0x00, // ## + 0x30, 0x00, // ## + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @512 '0' (11 pixels wide) + 0x00, 0x00, // + 0x0E, 0x00, // ### + 0x1B, 0x00, // ## ## + 0x31, 0x80, // ## ## + 0x31, 0x80, // ## ## + 0x31, 0x80, // ## ## + 0x31, 0x80, // ## ## + 0x31, 0x80, // ## ## + 0x31, 0x80, // ## ## + 0x1B, 0x00, // ## ## + 0x0E, 0x00, // ### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @544 '1' (11 pixels wide) + 0x00, 0x00, // + 0x06, 0x00, // ## + 0x3E, 0x00, // ##### + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x3F, 0xC0, // ######## + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @576 '2' (11 pixels wide) + 0x00, 0x00, // + 0x0F, 0x00, // #### + 0x19, 0x80, // ## ## + 0x31, 0x80, // ## ## + 0x31, 0x80, // ## ## + 0x03, 0x00, // ## + 0x06, 0x00, // ## + 0x0C, 0x00, // ## + 0x18, 0x00, // ## + 0x30, 0x00, // ## + 0x3F, 0x80, // ####### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @608 '3' (11 pixels wide) + 0x00, 0x00, // + 0x3F, 0x00, // ###### + 0x61, 0x80, // ## ## + 0x01, 0x80, // ## + 0x03, 0x00, // ## + 0x1F, 0x00, // ##### + 0x03, 0x80, // ### + 0x01, 0x80, // ## + 0x01, 0x80, // ## + 0x61, 0x80, // ## ## + 0x3F, 0x00, // ###### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @640 '4' (11 pixels wide) + 0x00, 0x00, // + 0x07, 0x00, // ### + 0x07, 0x00, // ### + 0x0F, 0x00, // #### + 0x0B, 0x00, // # ## + 0x1B, 0x00, // ## ## + 0x13, 0x00, // # ## + 0x33, 0x00, // ## ## + 0x3F, 0x80, // ####### + 0x03, 0x00, // ## + 0x0F, 0x80, // ##### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @672 '5' (11 pixels wide) + 0x00, 0x00, // + 0x1F, 0x80, // ###### + 0x18, 0x00, // ## + 0x18, 0x00, // ## + 0x18, 0x00, // ## + 0x1F, 0x00, // ##### + 0x11, 0x80, // # ## + 0x01, 0x80, // ## + 0x01, 0x80, // ## + 0x21, 0x80, // # ## + 0x1F, 0x00, // ##### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @704 '6' (11 pixels wide) + 0x00, 0x00, // + 0x07, 0x80, // #### + 0x1C, 0x00, // ### + 0x18, 0x00, // ## + 0x30, 0x00, // ## + 0x37, 0x00, // ## ### + 0x39, 0x80, // ### ## + 0x31, 0x80, // ## ## + 0x31, 0x80, // ## ## + 0x19, 0x80, // ## ## + 0x0F, 0x00, // #### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @736 '7' (11 pixels wide) + 0x00, 0x00, // + 0x7F, 0x00, // ####### + 0x43, 0x00, // # ## + 0x03, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x0C, 0x00, // ## + 0x0C, 0x00, // ## + 0x0C, 0x00, // ## + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @768 '8' (11 pixels wide) + 0x00, 0x00, // + 0x1F, 0x00, // ##### + 0x31, 0x80, // ## ## + 0x31, 0x80, // ## ## + 0x31, 0x80, // ## ## + 0x1F, 0x00, // ##### + 0x31, 0x80, // ## ## + 0x31, 0x80, // ## ## + 0x31, 0x80, // ## ## + 0x31, 0x80, // ## ## + 0x1F, 0x00, // ##### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @800 '9' (11 pixels wide) + 0x00, 0x00, // + 0x1E, 0x00, // #### + 0x33, 0x00, // ## ## + 0x31, 0x80, // ## ## + 0x31, 0x80, // ## ## + 0x33, 0x80, // ## ### + 0x1D, 0x80, // ### ## + 0x01, 0x80, // ## + 0x03, 0x00, // ## + 0x07, 0x00, // ### + 0x3C, 0x00, // #### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @832 ':' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x0C, 0x00, // ## + 0x0C, 0x00, // ## + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x0C, 0x00, // ## + 0x0C, 0x00, // ## + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @864 ';' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x06, 0x00, // ## + 0x04, 0x00, // # + 0x08, 0x00, // # + 0x08, 0x00, // # + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @896 '<' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0xC0, // ## + 0x03, 0x00, // ## + 0x04, 0x00, // # + 0x18, 0x00, // ## + 0x60, 0x00, // ## + 0x18, 0x00, // ## + 0x04, 0x00, // # + 0x03, 0x00, // ## + 0x00, 0xC0, // ## + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @928 '=' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x7F, 0xC0, // ######### + 0x00, 0x00, // + 0x7F, 0xC0, // ######### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @960 '>' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x60, 0x00, // ## + 0x18, 0x00, // ## + 0x04, 0x00, // # + 0x03, 0x00, // ## + 0x00, 0xC0, // ## + 0x03, 0x00, // ## + 0x04, 0x00, // # + 0x18, 0x00, // ## + 0x60, 0x00, // ## + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @992 '?' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x1F, 0x00, // ##### + 0x31, 0x80, // ## ## + 0x31, 0x80, // ## ## + 0x01, 0x80, // ## + 0x07, 0x00, // ### + 0x0C, 0x00, // ## + 0x0C, 0x00, // ## + 0x00, 0x00, // + 0x0C, 0x00, // ## + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1024 '@' (11 pixels wide) + 0x00, 0x00, // + 0x0E, 0x00, // ### + 0x11, 0x00, // # # + 0x21, 0x00, // # # + 0x21, 0x00, // # # + 0x27, 0x00, // # ### + 0x29, 0x00, // # # # + 0x29, 0x00, // # # # + 0x27, 0x00, // # ### + 0x20, 0x00, // # + 0x11, 0x00, // # # + 0x0E, 0x00, // ### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1056 'A' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x3F, 0x00, // ###### + 0x0F, 0x00, // #### + 0x09, 0x00, // # # + 0x19, 0x80, // ## ## + 0x19, 0x80, // ## ## + 0x1F, 0x80, // ###### + 0x30, 0xC0, // ## ## + 0x30, 0xC0, // ## ## + 0x79, 0xE0, // #### #### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1088 'B' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x7F, 0x00, // ####### + 0x31, 0x80, // ## ## + 0x31, 0x80, // ## ## + 0x31, 0x80, // ## ## + 0x3F, 0x00, // ###### + 0x31, 0x80, // ## ## + 0x31, 0x80, // ## ## + 0x31, 0x80, // ## ## + 0x7F, 0x00, // ####### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1120 'C' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x1F, 0x40, // ##### # + 0x30, 0xC0, // ## ## + 0x60, 0x40, // ## # + 0x60, 0x00, // ## + 0x60, 0x00, // ## + 0x60, 0x00, // ## + 0x60, 0x40, // ## # + 0x30, 0x80, // ## # + 0x1F, 0x00, // ##### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1152 'D' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x7F, 0x00, // ####### + 0x31, 0x80, // ## ## + 0x30, 0xC0, // ## ## + 0x30, 0xC0, // ## ## + 0x30, 0xC0, // ## ## + 0x30, 0xC0, // ## ## + 0x30, 0xC0, // ## ## + 0x31, 0x80, // ## ## + 0x7F, 0x00, // ####### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1184 'E' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x7F, 0x80, // ######## + 0x30, 0x80, // ## # + 0x30, 0x80, // ## # + 0x32, 0x00, // ## # + 0x3E, 0x00, // ##### + 0x32, 0x00, // ## # + 0x30, 0x80, // ## # + 0x30, 0x80, // ## # + 0x7F, 0x80, // ######## + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1216 'F' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x7F, 0xC0, // ######### + 0x30, 0x40, // ## # + 0x30, 0x40, // ## # + 0x32, 0x00, // ## # + 0x3E, 0x00, // ##### + 0x32, 0x00, // ## # + 0x30, 0x00, // ## + 0x30, 0x00, // ## + 0x7C, 0x00, // ##### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1248 'G' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x1E, 0x80, // #### # + 0x31, 0x80, // ## ## + 0x60, 0x80, // ## # + 0x60, 0x00, // ## + 0x60, 0x00, // ## + 0x67, 0xC0, // ## ##### + 0x61, 0x80, // ## ## + 0x31, 0x80, // ## ## + 0x1F, 0x00, // ##### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1280 'H' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x7B, 0xC0, // #### #### + 0x31, 0x80, // ## ## + 0x31, 0x80, // ## ## + 0x31, 0x80, // ## ## + 0x3F, 0x80, // ####### + 0x31, 0x80, // ## ## + 0x31, 0x80, // ## ## + 0x31, 0x80, // ## ## + 0x7B, 0xC0, // #### #### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1312 'I' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x3F, 0xC0, // ######## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x3F, 0xC0, // ######## + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1344 'J' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x1F, 0xC0, // ####### + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x63, 0x00, // ## ## + 0x63, 0x00, // ## ## + 0x63, 0x00, // ## ## + 0x3E, 0x00, // ##### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1376 'K' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x7B, 0xC0, // #### #### + 0x31, 0x80, // ## ## + 0x33, 0x00, // ## ## + 0x36, 0x00, // ## ## + 0x3C, 0x00, // #### + 0x3E, 0x00, // ##### + 0x33, 0x00, // ## ## + 0x31, 0x80, // ## ## + 0x79, 0xC0, // #### ### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1408 'L' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x7E, 0x00, // ###### + 0x18, 0x00, // ## + 0x18, 0x00, // ## + 0x18, 0x00, // ## + 0x18, 0x00, // ## + 0x18, 0x40, // ## # + 0x18, 0x40, // ## # + 0x18, 0x40, // ## # + 0x7F, 0xC0, // ######### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1440 'M' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0xE0, 0xE0, // ### ### + 0x60, 0xC0, // ## ## + 0x71, 0xC0, // ### ### + 0x7B, 0xC0, // #### #### + 0x6A, 0xC0, // ## # # ## + 0x6E, 0xC0, // ## ### ## + 0x64, 0xC0, // ## # ## + 0x60, 0xC0, // ## ## + 0xFB, 0xE0, // ##### ##### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1472 'N' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x73, 0xC0, // ### #### + 0x31, 0x80, // ## ## + 0x39, 0x80, // ### ## + 0x3D, 0x80, // #### ## + 0x35, 0x80, // ## # ## + 0x37, 0x80, // ## #### + 0x33, 0x80, // ## ### + 0x31, 0x80, // ## ## + 0x79, 0x80, // #### ## + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1504 'O' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x1F, 0x00, // ##### + 0x31, 0x80, // ## ## + 0x60, 0xC0, // ## ## + 0x60, 0xC0, // ## ## + 0x60, 0xC0, // ## ## + 0x60, 0xC0, // ## ## + 0x60, 0xC0, // ## ## + 0x31, 0x80, // ## ## + 0x1F, 0x00, // ##### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1536 'P' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x7F, 0x00, // ####### + 0x31, 0x80, // ## ## + 0x31, 0x80, // ## ## + 0x31, 0x80, // ## ## + 0x31, 0x80, // ## ## + 0x3F, 0x00, // ###### + 0x30, 0x00, // ## + 0x30, 0x00, // ## + 0x7E, 0x00, // ###### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1568 'Q' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x1F, 0x00, // ##### + 0x31, 0x80, // ## ## + 0x60, 0xC0, // ## ## + 0x60, 0xC0, // ## ## + 0x60, 0xC0, // ## ## + 0x60, 0xC0, // ## ## + 0x60, 0xC0, // ## ## + 0x31, 0x80, // ## ## + 0x1F, 0x00, // ##### + 0x0C, 0xC0, // ## ## + 0x1F, 0x80, // ###### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1600 'R' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x7F, 0x00, // ####### + 0x31, 0x80, // ## ## + 0x31, 0x80, // ## ## + 0x31, 0x80, // ## ## + 0x3E, 0x00, // ##### + 0x33, 0x00, // ## ## + 0x31, 0x80, // ## ## + 0x31, 0x80, // ## ## + 0x7C, 0xE0, // ##### ### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1632 'S' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x1F, 0x80, // ###### + 0x31, 0x80, // ## ## + 0x31, 0x80, // ## ## + 0x38, 0x00, // ### + 0x1F, 0x00, // ##### + 0x03, 0x80, // ### + 0x31, 0x80, // ## ## + 0x31, 0x80, // ## ## + 0x3F, 0x00, // ###### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1664 'T' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x7F, 0x80, // ######## + 0x4C, 0x80, // # ## # + 0x4C, 0x80, // # ## # + 0x4C, 0x80, // # ## # + 0x0C, 0x00, // ## + 0x0C, 0x00, // ## + 0x0C, 0x00, // ## + 0x0C, 0x00, // ## + 0x3F, 0x00, // ###### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1696 'U' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x7B, 0xC0, // #### #### + 0x31, 0x80, // ## ## + 0x31, 0x80, // ## ## + 0x31, 0x80, // ## ## + 0x31, 0x80, // ## ## + 0x31, 0x80, // ## ## + 0x31, 0x80, // ## ## + 0x31, 0x80, // ## ## + 0x1F, 0x00, // ##### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1728 'V' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x7B, 0xC0, // #### #### + 0x31, 0x80, // ## ## + 0x31, 0x80, // ## ## + 0x1B, 0x00, // ## ## + 0x1B, 0x00, // ## ## + 0x1B, 0x00, // ## ## + 0x0A, 0x00, // # # + 0x0E, 0x00, // ### + 0x0E, 0x00, // ### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1760 'W' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0xFB, 0xE0, // ##### ##### + 0x60, 0xC0, // ## ## + 0x64, 0xC0, // ## # ## + 0x6E, 0xC0, // ## ### ## + 0x6E, 0xC0, // ## ### ## + 0x2A, 0x80, // # # # # + 0x3B, 0x80, // ### ### + 0x3B, 0x80, // ### ### + 0x31, 0x80, // ## ## + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1792 'X' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x7B, 0xC0, // #### #### + 0x31, 0x80, // ## ## + 0x1B, 0x00, // ## ## + 0x0E, 0x00, // ### + 0x0E, 0x00, // ### + 0x0E, 0x00, // ### + 0x1B, 0x00, // ## ## + 0x31, 0x80, // ## ## + 0x7B, 0xC0, // #### #### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1824 'Y' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x79, 0xE0, // #### #### + 0x30, 0xC0, // ## ## + 0x19, 0x80, // ## ## + 0x0F, 0x00, // #### + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x1F, 0x80, // ###### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1856 'Z' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x3F, 0x80, // ####### + 0x21, 0x80, // # ## + 0x23, 0x00, // # ## + 0x06, 0x00, // ## + 0x04, 0x00, // # + 0x0C, 0x00, // ## + 0x18, 0x80, // ## # + 0x30, 0x80, // ## # + 0x3F, 0x80, // ####### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1888 '[' (11 pixels wide) + 0x00, 0x00, // + 0x07, 0x80, // #### + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x07, 0x80, // #### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1920 '\' (11 pixels wide) + 0x30, 0x00, // ## + 0x30, 0x00, // ## + 0x18, 0x00, // ## + 0x18, 0x00, // ## + 0x0C, 0x00, // ## + 0x0C, 0x00, // ## + 0x06, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x01, 0x80, // ## + 0x01, 0x80, // ## + 0x00, 0xC0, // ## + 0x00, 0xC0, // ## + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1952 ']' (11 pixels wide) + 0x00, 0x00, // + 0x1E, 0x00, // #### + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x1E, 0x00, // #### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1984 '^' (11 pixels wide) + 0x04, 0x00, // # + 0x0A, 0x00, // # # + 0x0A, 0x00, // # # + 0x11, 0x00, // # # + 0x20, 0x80, // # # + 0x20, 0x80, // # # + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @2016 '_' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0xFF, 0xE0, // ########### + + // @2048 '`' (11 pixels wide) + 0x08, 0x00, // # + 0x04, 0x00, // # + 0x02, 0x00, // # + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @2080 'a' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x1F, 0x00, // ##### + 0x01, 0x80, // ## + 0x01, 0x80, // ## + 0x1F, 0x80, // ###### + 0x31, 0x80, // ## ## + 0x33, 0x80, // ## ### + 0x1D, 0xC0, // ### ### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @2112 'b' (11 pixels wide) + 0x00, 0x00, // + 0x70, 0x00, // ### + 0x30, 0x00, // ## + 0x30, 0x00, // ## + 0x37, 0x00, // ## ### + 0x39, 0x80, // ### ## + 0x30, 0xC0, // ## ## + 0x30, 0xC0, // ## ## + 0x30, 0xC0, // ## ## + 0x39, 0x80, // ### ## + 0x77, 0x00, // ### ### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @2144 'c' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x1E, 0x80, // #### # + 0x31, 0x80, // ## ## + 0x60, 0x80, // ## # + 0x60, 0x00, // ## + 0x60, 0x80, // ## # + 0x31, 0x80, // ## ## + 0x1F, 0x00, // ##### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @2176 'd' (11 pixels wide) + 0x00, 0x00, // + 0x03, 0x80, // ### + 0x01, 0x80, // ## + 0x01, 0x80, // ## + 0x1D, 0x80, // ### ## + 0x33, 0x80, // ## ### + 0x61, 0x80, // ## ## + 0x61, 0x80, // ## ## + 0x61, 0x80, // ## ## + 0x33, 0x80, // ## ### + 0x1D, 0xC0, // ### ### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @2208 'e' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x1F, 0x00, // ##### + 0x31, 0x80, // ## ## + 0x60, 0xC0, // ## ## + 0x7F, 0xC0, // ######### + 0x60, 0x00, // ## + 0x30, 0xC0, // ## ## + 0x1F, 0x80, // ###### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @2240 'f' (11 pixels wide) + 0x00, 0x00, // + 0x07, 0xE0, // ###### + 0x0C, 0x00, // ## + 0x0C, 0x00, // ## + 0x3F, 0x80, // ####### + 0x0C, 0x00, // ## + 0x0C, 0x00, // ## + 0x0C, 0x00, // ## + 0x0C, 0x00, // ## + 0x0C, 0x00, // ## + 0x3F, 0x80, // ####### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @2272 'g' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x1D, 0xC0, // ### ### + 0x33, 0x80, // ## ### + 0x61, 0x80, // ## ## + 0x61, 0x80, // ## ## + 0x61, 0x80, // ## ## + 0x33, 0x80, // ## ### + 0x1D, 0x80, // ### ## + 0x01, 0x80, // ## + 0x01, 0x80, // ## + 0x1F, 0x00, // ##### + 0x00, 0x00, // + 0x00, 0x00, // + + // @2304 'h' (11 pixels wide) + 0x00, 0x00, // + 0x70, 0x00, // ### + 0x30, 0x00, // ## + 0x30, 0x00, // ## + 0x37, 0x00, // ## ### + 0x39, 0x80, // ### ## + 0x31, 0x80, // ## ## + 0x31, 0x80, // ## ## + 0x31, 0x80, // ## ## + 0x31, 0x80, // ## ## + 0x7B, 0xC0, // #### #### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @2336 'i' (11 pixels wide) + 0x00, 0x00, // + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x00, 0x00, // + 0x1E, 0x00, // #### + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x3F, 0xC0, // ######## + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @2368 'j' (11 pixels wide) + 0x00, 0x00, // + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x00, 0x00, // + 0x3F, 0x00, // ###### + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x3E, 0x00, // ##### + 0x00, 0x00, // + 0x00, 0x00, // + + // @2400 'k' (11 pixels wide) + 0x00, 0x00, // + 0x70, 0x00, // ### + 0x30, 0x00, // ## + 0x30, 0x00, // ## + 0x37, 0x80, // ## #### + 0x36, 0x00, // ## ## + 0x3C, 0x00, // #### + 0x3C, 0x00, // #### + 0x36, 0x00, // ## ## + 0x33, 0x00, // ## ## + 0x77, 0xC0, // ### ##### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @2432 'l' (11 pixels wide) + 0x00, 0x00, // + 0x1E, 0x00, // #### + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x3F, 0xC0, // ######## + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @2464 'm' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x7F, 0x80, // ######## + 0x36, 0xC0, // ## ## ## + 0x36, 0xC0, // ## ## ## + 0x36, 0xC0, // ## ## ## + 0x36, 0xC0, // ## ## ## + 0x36, 0xC0, // ## ## ## + 0x76, 0xE0, // ### ## ### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @2496 'n' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x77, 0x00, // ### ### + 0x39, 0x80, // ### ## + 0x31, 0x80, // ## ## + 0x31, 0x80, // ## ## + 0x31, 0x80, // ## ## + 0x31, 0x80, // ## ## + 0x7B, 0xC0, // #### #### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @2528 'o' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x1F, 0x00, // ##### + 0x31, 0x80, // ## ## + 0x60, 0xC0, // ## ## + 0x60, 0xC0, // ## ## + 0x60, 0xC0, // ## ## + 0x31, 0x80, // ## ## + 0x1F, 0x00, // ##### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @2560 'p' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x77, 0x00, // ### ### + 0x39, 0x80, // ### ## + 0x30, 0xC0, // ## ## + 0x30, 0xC0, // ## ## + 0x30, 0xC0, // ## ## + 0x39, 0x80, // ### ## + 0x37, 0x00, // ## ### + 0x30, 0x00, // ## + 0x30, 0x00, // ## + 0x7C, 0x00, // ##### + 0x00, 0x00, // + 0x00, 0x00, // + + // @2592 'q' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x1D, 0xC0, // ### ### + 0x33, 0x80, // ## ### + 0x61, 0x80, // ## ## + 0x61, 0x80, // ## ## + 0x61, 0x80, // ## ## + 0x33, 0x80, // ## ### + 0x1D, 0x80, // ### ## + 0x01, 0x80, // ## + 0x01, 0x80, // ## + 0x07, 0xC0, // ##### + 0x00, 0x00, // + 0x00, 0x00, // + + // @2624 'r' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x7B, 0x80, // #### ### + 0x1C, 0xC0, // ### ## + 0x18, 0x00, // ## + 0x18, 0x00, // ## + 0x18, 0x00, // ## + 0x18, 0x00, // ## + 0x7F, 0x00, // ####### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @2656 's' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x1F, 0x80, // ###### + 0x31, 0x80, // ## ## + 0x3C, 0x00, // #### + 0x1F, 0x00, // ##### + 0x03, 0x80, // ### + 0x31, 0x80, // ## ## + 0x3F, 0x00, // ###### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @2688 't' (11 pixels wide) + 0x00, 0x00, // + 0x18, 0x00, // ## + 0x18, 0x00, // ## + 0x18, 0x00, // ## + 0x7F, 0x00, // ####### + 0x18, 0x00, // ## + 0x18, 0x00, // ## + 0x18, 0x00, // ## + 0x18, 0x00, // ## + 0x18, 0x80, // ## # + 0x0F, 0x00, // #### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @2720 'u' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x73, 0x80, // ### ### + 0x31, 0x80, // ## ## + 0x31, 0x80, // ## ## + 0x31, 0x80, // ## ## + 0x31, 0x80, // ## ## + 0x33, 0x80, // ## ### + 0x1D, 0xC0, // ### ### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @2752 'v' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x7B, 0xC0, // #### #### + 0x31, 0x80, // ## ## + 0x31, 0x80, // ## ## + 0x1B, 0x00, // ## ## + 0x1B, 0x00, // ## ## + 0x0E, 0x00, // ### + 0x0E, 0x00, // ### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @2784 'w' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0xF1, 0xE0, // #### #### + 0x60, 0xC0, // ## ## + 0x64, 0xC0, // ## # ## + 0x6E, 0xC0, // ## ### ## + 0x3B, 0x80, // ### ### + 0x3B, 0x80, // ### ### + 0x31, 0x80, // ## ## + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @2816 'x' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x7B, 0xC0, // #### #### + 0x1B, 0x00, // ## ## + 0x0E, 0x00, // ### + 0x0E, 0x00, // ### + 0x0E, 0x00, // ### + 0x1B, 0x00, // ## ## + 0x7B, 0xC0, // #### #### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @2848 'y' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x79, 0xE0, // #### #### + 0x30, 0xC0, // ## ## + 0x19, 0x80, // ## ## + 0x19, 0x80, // ## ## + 0x0B, 0x00, // # ## + 0x0F, 0x00, // #### + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x0C, 0x00, // ## + 0x3E, 0x00, // ##### + 0x00, 0x00, // + 0x00, 0x00, // + + // @2880 'z' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x3F, 0x80, // ####### + 0x21, 0x80, // # ## + 0x03, 0x00, // ## + 0x0E, 0x00, // ### + 0x18, 0x00, // ## + 0x30, 0x80, // ## # + 0x3F, 0x80, // ####### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @2912 '{' (11 pixels wide) + 0x00, 0x00, // + 0x06, 0x00, // ## + 0x0C, 0x00, // ## + 0x0C, 0x00, // ## + 0x0C, 0x00, // ## + 0x0C, 0x00, // ## + 0x0C, 0x00, // ## + 0x18, 0x00, // ## + 0x0C, 0x00, // ## + 0x0C, 0x00, // ## + 0x0C, 0x00, // ## + 0x0C, 0x00, // ## + 0x06, 0x00, // ## + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @2944 '|' (11 pixels wide) + 0x00, 0x00, // + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @2976 '}' (11 pixels wide) + 0x00, 0x00, // + 0x0C, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x03, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x0C, 0x00, // ## + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @3008 '~' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x18, 0x00, // ## + 0x24, 0x80, // # # # + 0x03, 0x00, // ## + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // +}; + +sFONT Font16 = { + Font16_Table, + 11, /* Width */ + 16, /* Height */ +}; + +/** + * @} + */ + + +/** @defgroup FONTS_Private_Function_Prototypes + * @{ + */ +/** + * @} + */ + + +/** @defgroup FONTS_Private_Functions + * @{ + */ + +/** + * @} + */ + +/** + * @} + */ + +/** + * @} + */ + +/** + * @} + */ + +/** + * @} + */ +/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Utilities/Fonts/font20.c Tue May 16 10:50:26 2017 +0200 @@ -0,0 +1,2223 @@ +/** + ****************************************************************************** + * @file font20.c + * @author MCD Application Team + * @version V1.0.0 + * @date 18-February-2014 + * @brief This file provides text font20 for STM32xx-EVAL's LCD driver. + ****************************************************************************** + * @attention + * + * <h2><center>© COPYRIGHT(c) 2014 STMicroelectronics</center></h2> + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * 3. Neither the name of STMicroelectronics nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + ****************************************************************************** + */ + +/* Includes ------------------------------------------------------------------*/ +#include "fonts.h" + +/** @addtogroup Utilities + * @{ + */ + +/** @addtogroup STM32_EVAL + * @{ + */ + +/** @addtogroup Common + * @{ + */ + +/** @addtogroup FONTS + * @brief This file provides text font20 for STM32xx-EVAL's LCD driver. + * @{ + */ + +/** @defgroup FONTS_Private_Types + * @{ + */ +/** + * @} + */ + + +/** @defgroup FONTS_Private_Defines + * @{ + */ +/** + * @} + */ + + +/** @defgroup FONTS_Private_Macros + * @{ + */ +/** + * @} + */ + + +/** @defgroup FONTS_Private_Variables + * @{ + */ + +// Character bitmaps for Courier New 15pt +const uint8_t Font20_Table[] = +{ + // @0 ' ' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @40 '!' (14 pixels wide) + 0x00, 0x00, // + 0x07, 0x00, // ### + 0x07, 0x00, // ### + 0x07, 0x00, // ### + 0x07, 0x00, // ### + 0x07, 0x00, // ### + 0x07, 0x00, // ### + 0x07, 0x00, // ### + 0x02, 0x00, // # + 0x02, 0x00, // # + 0x00, 0x00, // + 0x00, 0x00, // + 0x07, 0x00, // ### + 0x07, 0x00, // ### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @80 '"' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x1C, 0xE0, // ### ### + 0x1C, 0xE0, // ### ### + 0x1C, 0xE0, // ### ### + 0x08, 0x40, // # # + 0x08, 0x40, // # # + 0x08, 0x40, // # # + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @120 '#' (14 pixels wide) + 0x0C, 0xC0, // ## ## + 0x0C, 0xC0, // ## ## + 0x0C, 0xC0, // ## ## + 0x0C, 0xC0, // ## ## + 0x0C, 0xC0, // ## ## + 0x3F, 0xF0, // ########## + 0x3F, 0xF0, // ########## + 0x0C, 0xC0, // ## ## + 0x0C, 0xC0, // ## ## + 0x3F, 0xF0, // ########## + 0x3F, 0xF0, // ########## + 0x0C, 0xC0, // ## ## + 0x0C, 0xC0, // ## ## + 0x0C, 0xC0, // ## ## + 0x0C, 0xC0, // ## ## + 0x0C, 0xC0, // ## ## + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @160 '$' (14 pixels wide) + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x07, 0xE0, // ###### + 0x0F, 0xE0, // ####### + 0x18, 0x60, // ## ## + 0x18, 0x00, // ## + 0x1F, 0x00, // ##### + 0x0F, 0xC0, // ###### + 0x00, 0xE0, // ### + 0x18, 0x60, // ## ## + 0x18, 0x60, // ## ## + 0x1F, 0xC0, // ####### + 0x1F, 0x80, // ###### + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @200 '%' (14 pixels wide) + 0x00, 0x00, // + 0x1C, 0x00, // ### + 0x22, 0x00, // # # + 0x22, 0x00, // # # + 0x22, 0x00, // # # + 0x1C, 0x60, // ### ## + 0x01, 0xE0, // #### + 0x0F, 0x80, // ##### + 0x3C, 0x00, // #### + 0x31, 0xC0, // ## ### + 0x02, 0x20, // # # + 0x02, 0x20, // # # + 0x02, 0x20, // # # + 0x01, 0xC0, // ### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @240 '&' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x03, 0xE0, // ##### + 0x0F, 0xE0, // ####### + 0x0C, 0x00, // ## + 0x0C, 0x00, // ## + 0x06, 0x00, // ## + 0x0F, 0x30, // #### ## + 0x1F, 0xF0, // ######### + 0x19, 0xE0, // ## #### + 0x18, 0xC0, // ## ## + 0x1F, 0xF0, // ######### + 0x07, 0xB0, // #### ## + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @280 ''' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x03, 0x80, // ### + 0x03, 0x80, // ### + 0x03, 0x80, // ### + 0x01, 0x00, // # + 0x01, 0x00, // # + 0x01, 0x00, // # + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @320 '(' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0xC0, // ## + 0x00, 0xC0, // ## + 0x01, 0x80, // ## + 0x01, 0x80, // ## + 0x01, 0x80, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x01, 0x80, // ## + 0x01, 0x80, // ## + 0x01, 0x80, // ## + 0x00, 0xC0, // ## + 0x00, 0xC0, // ## + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @360 ')' (14 pixels wide) + 0x00, 0x00, // + 0x0C, 0x00, // ## + 0x0C, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x0C, 0x00, // ## + 0x0C, 0x00, // ## + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @400 '*' (14 pixels wide) + 0x00, 0x00, // + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x1B, 0x60, // ## ## ## + 0x1F, 0xE0, // ######## + 0x07, 0x80, // #### + 0x07, 0x80, // #### + 0x0F, 0xC0, // ###### + 0x0C, 0xC0, // ## ## + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @440 '+' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x3F, 0xF0, // ########## + 0x3F, 0xF0, // ########## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @480 ',' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x03, 0x80, // ### + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x04, 0x00, // # + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @520 '-' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x3F, 0xE0, // ######### + 0x3F, 0xE0, // ######### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @560 '.' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x03, 0x80, // ### + 0x03, 0x80, // ### + 0x03, 0x80, // ### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @600 '/' (14 pixels wide) + 0x00, 0x60, // ## + 0x00, 0x60, // ## + 0x00, 0xC0, // ## + 0x00, 0xC0, // ## + 0x00, 0xC0, // ## + 0x01, 0x80, // ## + 0x01, 0x80, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x0C, 0x00, // ## + 0x0C, 0x00, // ## + 0x0C, 0x00, // ## + 0x18, 0x00, // ## + 0x18, 0x00, // ## + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @640 '0' (14 pixels wide) + 0x00, 0x00, // + 0x0F, 0x80, // ##### + 0x1F, 0xC0, // ####### + 0x18, 0xC0, // ## ## + 0x30, 0x60, // ## ## + 0x30, 0x60, // ## ## + 0x30, 0x60, // ## ## + 0x30, 0x60, // ## ## + 0x30, 0x60, // ## ## + 0x30, 0x60, // ## ## + 0x30, 0x60, // ## ## + 0x18, 0xC0, // ## ## + 0x1F, 0xC0, // ####### + 0x0F, 0x80, // ##### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @680 '1' (14 pixels wide) + 0x00, 0x00, // + 0x03, 0x00, // ## + 0x1F, 0x00, // ##### + 0x1F, 0x00, // ##### + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x1F, 0xE0, // ######## + 0x1F, 0xE0, // ######## + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @720 '2' (14 pixels wide) + 0x00, 0x00, // + 0x0F, 0x80, // ##### + 0x1F, 0xC0, // ####### + 0x38, 0xE0, // ### ### + 0x30, 0x60, // ## ## + 0x00, 0x60, // ## + 0x00, 0xC0, // ## + 0x01, 0x80, // ## + 0x03, 0x00, // ## + 0x06, 0x00, // ## + 0x0C, 0x00, // ## + 0x18, 0x00, // ## + 0x3F, 0xE0, // ######### + 0x3F, 0xE0, // ######### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @760 '3' (14 pixels wide) + 0x00, 0x00, // + 0x0F, 0x80, // ##### + 0x3F, 0xC0, // ######## + 0x30, 0xE0, // ## ### + 0x00, 0x60, // ## + 0x00, 0xE0, // ### + 0x07, 0xC0, // ##### + 0x07, 0xC0, // ##### + 0x00, 0xE0, // ### + 0x00, 0x60, // ## + 0x00, 0x60, // ## + 0x60, 0xE0, // ## ### + 0x7F, 0xC0, // ######### + 0x3F, 0x80, // ####### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @800 '4' (14 pixels wide) + 0x00, 0x00, // + 0x01, 0xC0, // ### + 0x03, 0xC0, // #### + 0x03, 0xC0, // #### + 0x06, 0xC0, // ## ## + 0x0C, 0xC0, // ## ## + 0x0C, 0xC0, // ## ## + 0x18, 0xC0, // ## ## + 0x30, 0xC0, // ## ## + 0x3F, 0xE0, // ######### + 0x3F, 0xE0, // ######### + 0x00, 0xC0, // ## + 0x03, 0xE0, // ##### + 0x03, 0xE0, // ##### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @840 '5' (14 pixels wide) + 0x00, 0x00, // + 0x1F, 0xC0, // ####### + 0x1F, 0xC0, // ####### + 0x18, 0x00, // ## + 0x18, 0x00, // ## + 0x1F, 0x80, // ###### + 0x1F, 0xC0, // ####### + 0x18, 0xE0, // ## ### + 0x00, 0x60, // ## + 0x00, 0x60, // ## + 0x00, 0x60, // ## + 0x30, 0xE0, // ## ### + 0x3F, 0xC0, // ######## + 0x1F, 0x80, // ###### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @880 '6' (14 pixels wide) + 0x00, 0x00, // + 0x03, 0xE0, // ##### + 0x0F, 0xE0, // ####### + 0x1E, 0x00, // #### + 0x18, 0x00, // ## + 0x38, 0x00, // ### + 0x37, 0x80, // ## #### + 0x3F, 0xC0, // ######## + 0x38, 0xE0, // ### ### + 0x30, 0x60, // ## ## + 0x30, 0x60, // ## ## + 0x18, 0xE0, // ## ### + 0x1F, 0xC0, // ####### + 0x07, 0x80, // #### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @920 '7' (14 pixels wide) + 0x00, 0x00, // + 0x3F, 0xE0, // ######### + 0x3F, 0xE0, // ######### + 0x30, 0x60, // ## ## + 0x00, 0x60, // ## + 0x00, 0xC0, // ## + 0x00, 0xC0, // ## + 0x00, 0xC0, // ## + 0x01, 0x80, // ## + 0x01, 0x80, // ## + 0x01, 0x80, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @960 '8' (14 pixels wide) + 0x00, 0x00, // + 0x0F, 0x80, // ##### + 0x1F, 0xC0, // ####### + 0x38, 0xE0, // ### ### + 0x30, 0x60, // ## ## + 0x38, 0xE0, // ### ### + 0x1F, 0xC0, // ####### + 0x1F, 0xC0, // ####### + 0x38, 0xE0, // ### ### + 0x30, 0x60, // ## ## + 0x30, 0x60, // ## ## + 0x38, 0xE0, // ### ### + 0x1F, 0xC0, // ####### + 0x0F, 0x80, // ##### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1000 '9' (14 pixels wide) + 0x00, 0x00, // + 0x0F, 0x00, // #### + 0x1F, 0xC0, // ####### + 0x38, 0xC0, // ### ## + 0x30, 0x60, // ## ## + 0x30, 0x60, // ## ## + 0x38, 0xE0, // ### ### + 0x1F, 0xE0, // ######## + 0x0F, 0x60, // #### ## + 0x00, 0xE0, // ### + 0x00, 0xC0, // ## + 0x03, 0xC0, // #### + 0x3F, 0x80, // ####### + 0x3E, 0x00, // ##### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1040 ':' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x03, 0x80, // ### + 0x03, 0x80, // ### + 0x03, 0x80, // ### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x03, 0x80, // ### + 0x03, 0x80, // ### + 0x03, 0x80, // ### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1080 ';' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x01, 0xC0, // ### + 0x01, 0xC0, // ### + 0x01, 0xC0, // ### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x03, 0x80, // ### + 0x03, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x04, 0x00, // # + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1120 '<' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x30, // ## + 0x00, 0xF0, // #### + 0x03, 0xC0, // #### + 0x07, 0x00, // ### + 0x1C, 0x00, // ### + 0x78, 0x00, // #### + 0x1C, 0x00, // ### + 0x07, 0x00, // ### + 0x03, 0xC0, // #### + 0x00, 0xF0, // #### + 0x00, 0x30, // ## + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1160 '=' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x7F, 0xF0, // ########### + 0x7F, 0xF0, // ########### + 0x00, 0x00, // + 0x00, 0x00, // + 0x7F, 0xF0, // ########### + 0x7F, 0xF0, // ########### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1200 '>' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x30, 0x00, // ## + 0x3C, 0x00, // #### + 0x0F, 0x00, // #### + 0x03, 0x80, // ### + 0x00, 0xE0, // ### + 0x00, 0x78, // #### + 0x00, 0xE0, // ### + 0x03, 0x80, // ### + 0x0F, 0x00, // #### + 0x3C, 0x00, // #### + 0x30, 0x00, // ## + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1240 '?' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x0F, 0x80, // ##### + 0x1F, 0xC0, // ####### + 0x18, 0x60, // ## ## + 0x18, 0x60, // ## ## + 0x00, 0x60, // ## + 0x01, 0xC0, // ### + 0x03, 0x80, // ### + 0x03, 0x00, // ## + 0x00, 0x00, // + 0x00, 0x00, // + 0x07, 0x00, // ### + 0x07, 0x00, // ### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1280 '@' (14 pixels wide) + 0x00, 0x00, // + 0x03, 0x80, // ### + 0x0C, 0x80, // ## # + 0x08, 0x40, // # # + 0x10, 0x40, // # # + 0x10, 0x40, // # # + 0x11, 0xC0, // # ### + 0x12, 0x40, // # # # + 0x12, 0x40, // # # # + 0x12, 0x40, // # # # + 0x11, 0xC0, // # ### + 0x10, 0x00, // # + 0x08, 0x00, // # + 0x08, 0x40, // # # + 0x07, 0x80, // #### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1320 'A' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x1F, 0x80, // ###### + 0x1F, 0x80, // ###### + 0x03, 0x80, // ### + 0x06, 0xC0, // ## ## + 0x06, 0xC0, // ## ## + 0x0C, 0xC0, // ## ## + 0x0C, 0x60, // ## ## + 0x1F, 0xE0, // ######## + 0x1F, 0xE0, // ######## + 0x30, 0x30, // ## ## + 0x78, 0x78, // #### #### + 0x78, 0x78, // #### #### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1360 'B' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x3F, 0x80, // ####### + 0x3F, 0xC0, // ######## + 0x18, 0x60, // ## ## + 0x18, 0x60, // ## ## + 0x18, 0xE0, // ## ### + 0x1F, 0xC0, // ####### + 0x1F, 0xE0, // ######## + 0x18, 0x70, // ## ### + 0x18, 0x30, // ## ## + 0x18, 0x30, // ## ## + 0x3F, 0xF0, // ########## + 0x3F, 0xE0, // ######### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1400 'C' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x07, 0xB0, // #### ## + 0x0F, 0xF0, // ######## + 0x1C, 0x70, // ### ### + 0x38, 0x30, // ### ## + 0x30, 0x00, // ## + 0x30, 0x00, // ## + 0x30, 0x00, // ## + 0x30, 0x00, // ## + 0x38, 0x30, // ### ## + 0x1C, 0x70, // ### ### + 0x0F, 0xE0, // ####### + 0x07, 0xC0, // ##### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1440 'D' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x7F, 0x80, // ######## + 0x7F, 0xC0, // ######### + 0x30, 0xE0, // ## ### + 0x30, 0x70, // ## ### + 0x30, 0x30, // ## ## + 0x30, 0x30, // ## ## + 0x30, 0x30, // ## ## + 0x30, 0x30, // ## ## + 0x30, 0x70, // ## ### + 0x30, 0xE0, // ## ### + 0x7F, 0xC0, // ######### + 0x7F, 0x80, // ######## + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1480 'E' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x3F, 0xF0, // ########## + 0x3F, 0xF0, // ########## + 0x18, 0x30, // ## ## + 0x18, 0x30, // ## ## + 0x19, 0x80, // ## ## + 0x1F, 0x80, // ###### + 0x1F, 0x80, // ###### + 0x19, 0x80, // ## ## + 0x18, 0x30, // ## ## + 0x18, 0x30, // ## ## + 0x3F, 0xF0, // ########## + 0x3F, 0xF0, // ########## + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1520 'F' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x3F, 0xF0, // ########## + 0x3F, 0xF0, // ########## + 0x18, 0x30, // ## ## + 0x18, 0x30, // ## ## + 0x19, 0x80, // ## ## + 0x1F, 0x80, // ###### + 0x1F, 0x80, // ###### + 0x19, 0x80, // ## ## + 0x18, 0x00, // ## + 0x18, 0x00, // ## + 0x3F, 0x00, // ###### + 0x3F, 0x00, // ###### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1560 'G' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x07, 0xB0, // #### ## + 0x1F, 0xF0, // ######### + 0x18, 0x70, // ## ### + 0x30, 0x30, // ## ## + 0x30, 0x00, // ## + 0x30, 0x00, // ## + 0x31, 0xF8, // ## ###### + 0x31, 0xF8, // ## ###### + 0x30, 0x30, // ## ## + 0x18, 0x30, // ## ## + 0x1F, 0xF0, // ######### + 0x07, 0xC0, // ##### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1600 'H' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x3C, 0xF0, // #### #### + 0x3C, 0xF0, // #### #### + 0x18, 0x60, // ## ## + 0x18, 0x60, // ## ## + 0x18, 0x60, // ## ## + 0x1F, 0xE0, // ######## + 0x1F, 0xE0, // ######## + 0x18, 0x60, // ## ## + 0x18, 0x60, // ## ## + 0x18, 0x60, // ## ## + 0x3C, 0xF0, // #### #### + 0x3C, 0xF0, // #### #### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1640 'I' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x1F, 0xE0, // ######## + 0x1F, 0xE0, // ######## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x1F, 0xE0, // ######## + 0x1F, 0xE0, // ######## + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1680 'J' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x03, 0xF8, // ####### + 0x03, 0xF8, // ####### + 0x00, 0x60, // ## + 0x00, 0x60, // ## + 0x00, 0x60, // ## + 0x00, 0x60, // ## + 0x30, 0x60, // ## ## + 0x30, 0x60, // ## ## + 0x30, 0x60, // ## ## + 0x30, 0xE0, // ## ### + 0x3F, 0xC0, // ######## + 0x0F, 0x80, // ##### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1720 'K' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x3E, 0xF8, // ##### ##### + 0x3E, 0xF8, // ##### ##### + 0x18, 0xE0, // ## ### + 0x19, 0x80, // ## ## + 0x1B, 0x00, // ## ## + 0x1F, 0x00, // ##### + 0x1D, 0x80, // ### ## + 0x18, 0xC0, // ## ## + 0x18, 0xC0, // ## ## + 0x18, 0x60, // ## ## + 0x3E, 0x78, // ##### #### + 0x3E, 0x38, // ##### ### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1760 'L' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x3F, 0x00, // ###### + 0x3F, 0x00, // ###### + 0x0C, 0x00, // ## + 0x0C, 0x00, // ## + 0x0C, 0x00, // ## + 0x0C, 0x00, // ## + 0x0C, 0x00, // ## + 0x0C, 0x30, // ## ## + 0x0C, 0x30, // ## ## + 0x0C, 0x30, // ## ## + 0x3F, 0xF0, // ########## + 0x3F, 0xF0, // ########## + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1800 'M' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x78, 0x78, // #### #### + 0x78, 0x78, // #### #### + 0x38, 0x70, // ### ### + 0x3C, 0xF0, // #### #### + 0x34, 0xB0, // ## # # ## + 0x37, 0xB0, // ## #### ## + 0x37, 0xB0, // ## #### ## + 0x33, 0x30, // ## ## ## + 0x33, 0x30, // ## ## ## + 0x30, 0x30, // ## ## + 0x7C, 0xF8, // ##### ##### + 0x7C, 0xF8, // ##### ##### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1840 'N' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x39, 0xF0, // ### ##### + 0x3D, 0xF0, // #### ##### + 0x1C, 0x60, // ### ## + 0x1E, 0x60, // #### ## + 0x1E, 0x60, // #### ## + 0x1B, 0x60, // ## ## ## + 0x1B, 0x60, // ## ## ## + 0x19, 0xE0, // ## #### + 0x19, 0xE0, // ## #### + 0x18, 0xE0, // ## ### + 0x3E, 0xE0, // ##### ### + 0x3E, 0x60, // ##### ## + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1880 'O' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x07, 0x80, // #### + 0x0F, 0xC0, // ###### + 0x1C, 0xE0, // ### ### + 0x38, 0x70, // ### ### + 0x30, 0x30, // ## ## + 0x30, 0x30, // ## ## + 0x30, 0x30, // ## ## + 0x30, 0x30, // ## ## + 0x38, 0x70, // ### ### + 0x1C, 0xE0, // ### ### + 0x0F, 0xC0, // ###### + 0x07, 0x80, // #### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1920 'P' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x3F, 0xC0, // ######## + 0x3F, 0xE0, // ######### + 0x18, 0x70, // ## ### + 0x18, 0x30, // ## ## + 0x18, 0x30, // ## ## + 0x18, 0x70, // ## ### + 0x1F, 0xE0, // ######## + 0x1F, 0xC0, // ####### + 0x18, 0x00, // ## + 0x18, 0x00, // ## + 0x3F, 0x00, // ###### + 0x3F, 0x00, // ###### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1960 'Q' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x07, 0x80, // #### + 0x0F, 0xC0, // ###### + 0x1C, 0xE0, // ### ### + 0x38, 0x70, // ### ### + 0x30, 0x30, // ## ## + 0x30, 0x30, // ## ## + 0x30, 0x30, // ## ## + 0x30, 0x30, // ## ## + 0x38, 0x70, // ### ### + 0x1C, 0xE0, // ### ### + 0x0F, 0xC0, // ###### + 0x07, 0x80, // #### + 0x07, 0xB0, // #### ## + 0x0F, 0xF0, // ######## + 0x0C, 0xE0, // ## ### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @2000 'R' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x3F, 0xC0, // ######## + 0x3F, 0xE0, // ######### + 0x18, 0x70, // ## ### + 0x18, 0x30, // ## ## + 0x18, 0x70, // ## ### + 0x1F, 0xE0, // ######## + 0x1F, 0xC0, // ####### + 0x18, 0xE0, // ## ### + 0x18, 0x60, // ## ## + 0x18, 0x70, // ## ### + 0x3E, 0x38, // ##### ### + 0x3E, 0x18, // ##### ## + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @2040 'S' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x0F, 0xB0, // ##### ## + 0x1F, 0xF0, // ######### + 0x38, 0x70, // ### ### + 0x30, 0x30, // ## ## + 0x38, 0x00, // ### + 0x1F, 0x80, // ###### + 0x07, 0xE0, // ###### + 0x00, 0x70, // ### + 0x30, 0x30, // ## ## + 0x38, 0x70, // ### ### + 0x3F, 0xE0, // ######### + 0x37, 0xC0, // ## ##### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @2080 'T' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x3F, 0xF0, // ########## + 0x3F, 0xF0, // ########## + 0x33, 0x30, // ## ## ## + 0x33, 0x30, // ## ## ## + 0x33, 0x30, // ## ## ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x0F, 0xC0, // ###### + 0x0F, 0xC0, // ###### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @2120 'U' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x3C, 0xF0, // #### #### + 0x3C, 0xF0, // #### #### + 0x18, 0x60, // ## ## + 0x18, 0x60, // ## ## + 0x18, 0x60, // ## ## + 0x18, 0x60, // ## ## + 0x18, 0x60, // ## ## + 0x18, 0x60, // ## ## + 0x18, 0x60, // ## ## + 0x1C, 0xE0, // ### ### + 0x0F, 0xC0, // ###### + 0x07, 0x80, // #### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @2160 'V' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x78, 0xF0, // #### #### + 0x78, 0xF0, // #### #### + 0x30, 0x60, // ## ## + 0x30, 0x60, // ## ## + 0x18, 0xC0, // ## ## + 0x18, 0xC0, // ## ## + 0x0D, 0x80, // ## ## + 0x0D, 0x80, // ## ## + 0x0D, 0x80, // ## ## + 0x07, 0x00, // ### + 0x07, 0x00, // ### + 0x07, 0x00, // ### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @2200 'W' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x7C, 0x7C, // ##### ##### + 0x7C, 0x7C, // ##### ##### + 0x30, 0x18, // ## ## + 0x33, 0x98, // ## ### ## + 0x33, 0x98, // ## ### ## + 0x33, 0x98, // ## ### ## + 0x36, 0xD8, // ## ## ## ## + 0x16, 0xD0, // # ## ## # + 0x1C, 0x70, // ### ### + 0x1C, 0x70, // ### ### + 0x1C, 0x70, // ### ### + 0x18, 0x30, // ## ## + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @2240 'X' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x78, 0xF0, // #### #### + 0x78, 0xF0, // #### #### + 0x30, 0x60, // ## ## + 0x18, 0xC0, // ## ## + 0x0D, 0x80, // ## ## + 0x07, 0x00, // ### + 0x07, 0x00, // ### + 0x0D, 0x80, // ## ## + 0x18, 0xC0, // ## ## + 0x30, 0x60, // ## ## + 0x78, 0xF0, // #### #### + 0x78, 0xF0, // #### #### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @2280 'Y' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x3C, 0xF0, // #### #### + 0x3C, 0xF0, // #### #### + 0x18, 0x60, // ## ## + 0x0C, 0xC0, // ## ## + 0x07, 0x80, // #### + 0x07, 0x80, // #### + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x0F, 0xC0, // ###### + 0x0F, 0xC0, // ###### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @2320 'Z' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x1F, 0xE0, // ######## + 0x1F, 0xE0, // ######## + 0x18, 0x60, // ## ## + 0x18, 0xC0, // ## ## + 0x01, 0x80, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x06, 0x00, // ## + 0x0C, 0x60, // ## ## + 0x18, 0x60, // ## ## + 0x1F, 0xE0, // ######## + 0x1F, 0xE0, // ######## + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @2360 '[' (14 pixels wide) + 0x00, 0x00, // + 0x03, 0xC0, // #### + 0x03, 0xC0, // #### + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0xC0, // #### + 0x03, 0xC0, // #### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @2400 '\' (14 pixels wide) + 0x18, 0x00, // ## + 0x18, 0x00, // ## + 0x0C, 0x00, // ## + 0x0C, 0x00, // ## + 0x0C, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x01, 0x80, // ## + 0x01, 0x80, // ## + 0x00, 0xC0, // ## + 0x00, 0xC0, // ## + 0x00, 0xC0, // ## + 0x00, 0x60, // ## + 0x00, 0x60, // ## + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @2440 ']' (14 pixels wide) + 0x00, 0x00, // + 0x0F, 0x00, // #### + 0x0F, 0x00, // #### + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x0F, 0x00, // #### + 0x0F, 0x00, // #### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @2480 '^' (14 pixels wide) + 0x00, 0x00, // + 0x02, 0x00, // # + 0x07, 0x00, // ### + 0x0D, 0x80, // ## ## + 0x18, 0xC0, // ## ## + 0x30, 0x60, // ## ## + 0x20, 0x20, // # # + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @2520 '_' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0xFF, 0xFC, // ############## + 0xFF, 0xFC, // ############## + + // @2560 '`' (14 pixels wide) + 0x00, 0x00, // + 0x04, 0x00, // # + 0x03, 0x00, // ## + 0x00, 0x80, // # + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @2600 'a' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x0F, 0xC0, // ###### + 0x1F, 0xE0, // ######## + 0x00, 0x60, // ## + 0x0F, 0xE0, // ####### + 0x1F, 0xE0, // ######## + 0x38, 0x60, // ### ## + 0x30, 0xE0, // ## ### + 0x3F, 0xF0, // ########## + 0x1F, 0x70, // ##### ### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @2640 'b' (14 pixels wide) + 0x00, 0x00, // + 0x70, 0x00, // ### + 0x70, 0x00, // ### + 0x30, 0x00, // ## + 0x30, 0x00, // ## + 0x37, 0x80, // ## #### + 0x3F, 0xE0, // ######### + 0x38, 0x60, // ### ## + 0x30, 0x30, // ## ## + 0x30, 0x30, // ## ## + 0x30, 0x30, // ## ## + 0x38, 0x60, // ### ## + 0x7F, 0xE0, // ########## + 0x77, 0x80, // ### #### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @2680 'c' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x07, 0xB0, // #### ## + 0x1F, 0xF0, // ######### + 0x18, 0x30, // ## ## + 0x30, 0x30, // ## ## + 0x30, 0x00, // ## + 0x30, 0x00, // ## + 0x38, 0x30, // ### ## + 0x1F, 0xF0, // ######### + 0x0F, 0xC0, // ###### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @2720 'd' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0x70, // ### + 0x00, 0x70, // ### + 0x00, 0x30, // ## + 0x00, 0x30, // ## + 0x07, 0xB0, // #### ## + 0x1F, 0xF0, // ######### + 0x18, 0x70, // ## ### + 0x30, 0x30, // ## ## + 0x30, 0x30, // ## ## + 0x30, 0x30, // ## ## + 0x38, 0x70, // ### ### + 0x1F, 0xF8, // ########## + 0x07, 0xB8, // #### ### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @2760 'e' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x07, 0x80, // #### + 0x1F, 0xE0, // ######## + 0x18, 0x60, // ## ## + 0x3F, 0xF0, // ########## + 0x3F, 0xF0, // ########## + 0x30, 0x00, // ## + 0x18, 0x30, // ## ## + 0x1F, 0xF0, // ######### + 0x07, 0xC0, // ##### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @2800 'f' (14 pixels wide) + 0x00, 0x00, // + 0x03, 0xF0, // ###### + 0x07, 0xF0, // ####### + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x1F, 0xE0, // ######## + 0x1F, 0xE0, // ######## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x1F, 0xE0, // ######## + 0x1F, 0xE0, // ######## + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @2840 'g' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x07, 0xB8, // #### ### + 0x1F, 0xF8, // ########## + 0x18, 0x70, // ## ### + 0x30, 0x30, // ## ## + 0x30, 0x30, // ## ## + 0x30, 0x30, // ## ## + 0x18, 0x70, // ## ### + 0x1F, 0xF0, // ######### + 0x07, 0xB0, // #### ## + 0x00, 0x30, // ## + 0x00, 0x70, // ### + 0x0F, 0xE0, // ####### + 0x0F, 0xC0, // ###### + 0x00, 0x00, // + 0x00, 0x00, // + + // @2880 'h' (14 pixels wide) + 0x00, 0x00, // + 0x38, 0x00, // ### + 0x38, 0x00, // ### + 0x18, 0x00, // ## + 0x18, 0x00, // ## + 0x1B, 0xC0, // ## #### + 0x1F, 0xE0, // ######## + 0x1C, 0x60, // ### ## + 0x18, 0x60, // ## ## + 0x18, 0x60, // ## ## + 0x18, 0x60, // ## ## + 0x18, 0x60, // ## ## + 0x3C, 0xF0, // #### #### + 0x3C, 0xF0, // #### #### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @2920 'i' (14 pixels wide) + 0x00, 0x00, // + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x00, 0x00, // + 0x00, 0x00, // + 0x1F, 0x00, // ##### + 0x1F, 0x00, // ##### + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x1F, 0xE0, // ######## + 0x1F, 0xE0, // ######## + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @2960 'j' (14 pixels wide) + 0x00, 0x00, // + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x00, 0x00, // + 0x00, 0x00, // + 0x1F, 0xC0, // ####### + 0x1F, 0xC0, // ####### + 0x00, 0xC0, // ## + 0x00, 0xC0, // ## + 0x00, 0xC0, // ## + 0x00, 0xC0, // ## + 0x00, 0xC0, // ## + 0x00, 0xC0, // ## + 0x00, 0xC0, // ## + 0x00, 0xC0, // ## + 0x01, 0xC0, // ### + 0x3F, 0x80, // ####### + 0x3F, 0x00, // ###### + 0x00, 0x00, // + 0x00, 0x00, // + + // @3000 'k' (14 pixels wide) + 0x00, 0x00, // + 0x38, 0x00, // ### + 0x38, 0x00, // ### + 0x18, 0x00, // ## + 0x18, 0x00, // ## + 0x1B, 0xE0, // ## ##### + 0x1B, 0xE0, // ## ##### + 0x1B, 0x00, // ## ## + 0x1E, 0x00, // #### + 0x1E, 0x00, // #### + 0x1B, 0x00, // ## ## + 0x19, 0x80, // ## ## + 0x39, 0xF0, // ### ##### + 0x39, 0xF0, // ### ##### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @3040 'l' (14 pixels wide) + 0x00, 0x00, // + 0x1F, 0x00, // ##### + 0x1F, 0x00, // ##### + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x1F, 0xE0, // ######## + 0x1F, 0xE0, // ######## + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @3080 'm' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x7E, 0xE0, // ###### ### + 0x7F, 0xF0, // ########### + 0x33, 0x30, // ## ## ## + 0x33, 0x30, // ## ## ## + 0x33, 0x30, // ## ## ## + 0x33, 0x30, // ## ## ## + 0x33, 0x30, // ## ## ## + 0x7B, 0xB8, // #### ### ### + 0x7B, 0xB8, // #### ### ### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @3120 'n' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x3B, 0xC0, // ### #### + 0x3F, 0xE0, // ######### + 0x1C, 0x60, // ### ## + 0x18, 0x60, // ## ## + 0x18, 0x60, // ## ## + 0x18, 0x60, // ## ## + 0x18, 0x60, // ## ## + 0x3C, 0xF0, // #### #### + 0x3C, 0xF0, // #### #### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @3160 'o' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x07, 0x80, // #### + 0x1F, 0xE0, // ######## + 0x18, 0x60, // ## ## + 0x30, 0x30, // ## ## + 0x30, 0x30, // ## ## + 0x30, 0x30, // ## ## + 0x18, 0x60, // ## ## + 0x1F, 0xE0, // ######## + 0x07, 0x80, // #### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @3200 'p' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x77, 0x80, // ### #### + 0x7F, 0xE0, // ########## + 0x38, 0x60, // ### ## + 0x30, 0x30, // ## ## + 0x30, 0x30, // ## ## + 0x30, 0x30, // ## ## + 0x38, 0x60, // ### ## + 0x3F, 0xE0, // ######### + 0x37, 0x80, // ## #### + 0x30, 0x00, // ## + 0x30, 0x00, // ## + 0x7C, 0x00, // ##### + 0x7C, 0x00, // ##### + 0x00, 0x00, // + 0x00, 0x00, // + + // @3240 'q' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x07, 0xB8, // #### ### + 0x1F, 0xF8, // ########## + 0x18, 0x70, // ## ### + 0x30, 0x30, // ## ## + 0x30, 0x30, // ## ## + 0x30, 0x30, // ## ## + 0x18, 0x70, // ## ### + 0x1F, 0xF0, // ######### + 0x07, 0xB0, // #### ## + 0x00, 0x30, // ## + 0x00, 0x30, // ## + 0x00, 0xF8, // ##### + 0x00, 0xF8, // ##### + 0x00, 0x00, // + 0x00, 0x00, // + + // @3280 'r' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x3C, 0xE0, // #### ### + 0x3D, 0xF0, // #### ##### + 0x0F, 0x30, // #### ## + 0x0E, 0x00, // ### + 0x0C, 0x00, // ## + 0x0C, 0x00, // ## + 0x0C, 0x00, // ## + 0x3F, 0xC0, // ######## + 0x3F, 0xC0, // ######## + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @3320 's' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x07, 0xE0, // ###### + 0x1F, 0xE0, // ######## + 0x18, 0x60, // ## ## + 0x1E, 0x00, // #### + 0x0F, 0xC0, // ###### + 0x01, 0xE0, // #### + 0x18, 0x60, // ## ## + 0x1F, 0xE0, // ######## + 0x1F, 0x80, // ###### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @3360 't' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x0C, 0x00, // ## + 0x0C, 0x00, // ## + 0x0C, 0x00, // ## + 0x3F, 0xE0, // ######### + 0x3F, 0xE0, // ######### + 0x0C, 0x00, // ## + 0x0C, 0x00, // ## + 0x0C, 0x00, // ## + 0x0C, 0x00, // ## + 0x0C, 0x30, // ## ## + 0x0F, 0xF0, // ######## + 0x07, 0xC0, // ##### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @3400 'u' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x38, 0xE0, // ### ### + 0x38, 0xE0, // ### ### + 0x18, 0x60, // ## ## + 0x18, 0x60, // ## ## + 0x18, 0x60, // ## ## + 0x18, 0x60, // ## ## + 0x18, 0xE0, // ## ### + 0x1F, 0xF0, // ######### + 0x0F, 0x70, // #### ### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @3440 'v' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x78, 0xF0, // #### #### + 0x78, 0xF0, // #### #### + 0x30, 0x60, // ## ## + 0x18, 0xC0, // ## ## + 0x18, 0xC0, // ## ## + 0x0D, 0x80, // ## ## + 0x0D, 0x80, // ## ## + 0x07, 0x00, // ### + 0x07, 0x00, // ### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @3480 'w' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x78, 0xF0, // #### #### + 0x78, 0xF0, // #### #### + 0x32, 0x60, // ## # ## + 0x32, 0x60, // ## # ## + 0x37, 0xE0, // ## ###### + 0x1D, 0xC0, // ### ### + 0x1D, 0xC0, // ### ### + 0x18, 0xC0, // ## ## + 0x18, 0xC0, // ## ## + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @3520 'x' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x3C, 0xF0, // #### #### + 0x3C, 0xF0, // #### #### + 0x0C, 0xC0, // ## ## + 0x07, 0x80, // #### + 0x03, 0x00, // ## + 0x07, 0x80, // #### + 0x0C, 0xC0, // ## ## + 0x3C, 0xF0, // #### #### + 0x3C, 0xF0, // #### #### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @3560 'y' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x78, 0xF0, // #### #### + 0x78, 0xF0, // #### #### + 0x30, 0x60, // ## ## + 0x18, 0xC0, // ## ## + 0x18, 0xC0, // ## ## + 0x0D, 0x80, // ## ## + 0x0F, 0x80, // ##### + 0x07, 0x00, // ### + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x0C, 0x00, // ## + 0x7F, 0x00, // ####### + 0x7F, 0x00, // ####### + 0x00, 0x00, // + 0x00, 0x00, // + + // @3600 'z' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x1F, 0xE0, // ######## + 0x1F, 0xE0, // ######## + 0x18, 0xC0, // ## ## + 0x01, 0x80, // ## + 0x03, 0x00, // ## + 0x06, 0x00, // ## + 0x0C, 0x60, // ## ## + 0x1F, 0xE0, // ######## + 0x1F, 0xE0, // ######## + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @3640 '{' (14 pixels wide) + 0x00, 0x00, // + 0x01, 0xC0, // ### + 0x03, 0xC0, // #### + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x07, 0x00, // ### + 0x0E, 0x00, // ### + 0x07, 0x00, // ### + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0xC0, // #### + 0x01, 0xC0, // ### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @3680 '|' (14 pixels wide) + 0x00, 0x00, // + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @3720 '}' (14 pixels wide) + 0x00, 0x00, // + 0x1C, 0x00, // ### + 0x1E, 0x00, // #### + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x07, 0x00, // ### + 0x03, 0x80, // ### + 0x07, 0x00, // ### + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x1E, 0x00, // #### + 0x1C, 0x00, // ### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @3760 '~' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x0E, 0x00, // ### + 0x3F, 0x30, // ###### ## + 0x33, 0xF0, // ## ###### + 0x01, 0xE0, // #### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // +}; + + +sFONT Font20 = { + Font20_Table, + 14, /* Width */ + 20, /* Height */ +}; + +/** + * @} + */ + + +/** @defgroup FONTS_Private_Function_Prototypes + * @{ + */ +/** + * @} + */ + + +/** @defgroup FONTS_Private_Functions + * @{ + */ + +/** + * @} + */ + +/** + * @} + */ + +/** + * @} + */ + +/** + * @} + */ + +/** + * @} + */ +/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Utilities/Fonts/font24.c Tue May 16 10:50:26 2017 +0200 @@ -0,0 +1,2600 @@ +/** + ****************************************************************************** + * @file font24.c + * @author MCD Application Team + * @version V1.0.0 + * @date 18-February-2014 + * @brief This file provides text font24 for STM32xx-EVAL's LCD driver. + ****************************************************************************** + * @attention + * + * <h2><center>© COPYRIGHT(c) 2014 STMicroelectronics</center></h2> + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * 3. Neither the name of STMicroelectronics nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + ****************************************************************************** + */ + +/* Includes ------------------------------------------------------------------*/ +#include "fonts.h" + +/** @addtogroup Utilities + * @{ + */ + +/** @addtogroup STM32_EVAL + * @{ + */ + +/** @addtogroup Common + * @{ + */ + +/** @addtogroup FONTS + * @brief This file provides text font24 for STM32xx-EVAL's LCD driver. + * @{ + */ + +/** @defgroup FONTS_Private_Types + * @{ + */ +/** + * @} + */ + + +/** @defgroup FONTS_Private_Defines + * @{ + */ +/** + * @} + */ + + +/** @defgroup FONTS_Private_Macros + * @{ + */ +/** + * @} + */ + + +/** @defgroup FONTS_Private_Variables + * @{ + */ +const uint8_t Font24_Table [] = +{ + // @0 ' ' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @72 '!' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x03, 0x80, 0x00, // ### + 0x03, 0x80, 0x00, // ### + 0x03, 0x80, 0x00, // ### + 0x03, 0x80, 0x00, // ### + 0x03, 0x80, 0x00, // ### + 0x03, 0x80, 0x00, // ### + 0x03, 0x80, 0x00, // ### + 0x03, 0x80, 0x00, // ### + 0x03, 0x80, 0x00, // ### + 0x01, 0x00, 0x00, // # + 0x01, 0x00, 0x00, // # + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x03, 0x80, 0x00, // ### + 0x03, 0x80, 0x00, // ### + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @144 '"' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x0E, 0x70, 0x00, // ### ### + 0x0E, 0x70, 0x00, // ### ### + 0x0E, 0x70, 0x00, // ### ### + 0x04, 0x20, 0x00, // # # + 0x04, 0x20, 0x00, // # # + 0x04, 0x20, 0x00, // # # + 0x04, 0x20, 0x00, // # # + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @216 '#' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x06, 0x60, 0x00, // ## ## + 0x06, 0x60, 0x00, // ## ## + 0x06, 0x60, 0x00, // ## ## + 0x06, 0x60, 0x00, // ## ## + 0x06, 0x60, 0x00, // ## ## + 0x3F, 0xF8, 0x00, // ########### + 0x3F, 0xF8, 0x00, // ########### + 0x06, 0x60, 0x00, // ## ## + 0x0C, 0xC0, 0x00, // ## ## + 0x3F, 0xF8, 0x00, // ########### + 0x3F, 0xF8, 0x00, // ########### + 0x0C, 0xC0, 0x00, // ## ## + 0x0C, 0xC0, 0x00, // ## ## + 0x0C, 0xC0, 0x00, // ## ## + 0x0C, 0xC0, 0x00, // ## ## + 0x0C, 0xC0, 0x00, // ## ## + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @288 '$' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x07, 0xB0, 0x00, // #### ## + 0x0F, 0xF0, 0x00, // ######## + 0x18, 0x70, 0x00, // ## ### + 0x18, 0x70, 0x00, // ## ### + 0x1C, 0x00, 0x00, // ### + 0x0F, 0x80, 0x00, // ##### + 0x07, 0xE0, 0x00, // ###### + 0x00, 0xF0, 0x00, // #### + 0x18, 0x30, 0x00, // ## ## + 0x1C, 0x30, 0x00, // ### ## + 0x1C, 0x70, 0x00, // ### ### + 0x1F, 0xE0, 0x00, // ######## + 0x1B, 0xC0, 0x00, // ## #### + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @360 '%' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x07, 0x80, 0x00, // #### + 0x0F, 0xC0, 0x00, // ###### + 0x1C, 0xE0, 0x00, // ### ### + 0x18, 0x60, 0x00, // ## ## + 0x18, 0x60, 0x00, // ## ## + 0x1C, 0xE0, 0x00, // ### ### + 0x0F, 0xF8, 0x00, // ######### + 0x07, 0xE0, 0x00, // ###### + 0x1F, 0xF0, 0x00, // ######### + 0x07, 0x38, 0x00, // ### ### + 0x06, 0x18, 0x00, // ## ## + 0x06, 0x18, 0x00, // ## ## + 0x07, 0x38, 0x00, // ### ### + 0x03, 0xF0, 0x00, // ###### + 0x01, 0xE0, 0x00, // #### + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @432 '&' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x03, 0xF0, 0x00, // ###### + 0x07, 0xF0, 0x00, // ####### + 0x0C, 0x60, 0x00, // ## ## + 0x0C, 0x00, 0x00, // ## + 0x0C, 0x00, 0x00, // ## + 0x06, 0x00, 0x00, // ## + 0x07, 0x00, 0x00, // ### + 0x0F, 0x9C, 0x00, // ##### ### + 0x1D, 0xFC, 0x00, // ### ####### + 0x18, 0xF0, 0x00, // ## #### + 0x18, 0x70, 0x00, // ## ### + 0x0F, 0xFC, 0x00, // ########## + 0x07, 0xDC, 0x00, // ##### ### + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @504 ''' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x03, 0x80, 0x00, // ### + 0x03, 0x80, 0x00, // ### + 0x03, 0x80, 0x00, // ### + 0x01, 0x00, 0x00, // # + 0x01, 0x00, 0x00, // # + 0x01, 0x00, 0x00, // # + 0x01, 0x00, 0x00, // # + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @576 '(' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x18, 0x00, // ## + 0x00, 0x38, 0x00, // ### + 0x00, 0x70, 0x00, // ### + 0x00, 0xF0, 0x00, // #### + 0x00, 0xE0, 0x00, // ### + 0x00, 0xE0, 0x00, // ### + 0x01, 0xC0, 0x00, // ### + 0x01, 0xC0, 0x00, // ### + 0x01, 0xC0, 0x00, // ### + 0x01, 0xC0, 0x00, // ### + 0x01, 0xC0, 0x00, // ### + 0x01, 0xC0, 0x00, // ### + 0x00, 0xE0, 0x00, // ### + 0x00, 0xE0, 0x00, // ### + 0x00, 0x70, 0x00, // ### + 0x00, 0x70, 0x00, // ### + 0x00, 0x38, 0x00, // ### + 0x00, 0x18, 0x00, // ## + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @648 ')' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x18, 0x00, 0x00, // ## + 0x1C, 0x00, 0x00, // ### + 0x0E, 0x00, 0x00, // ### + 0x0E, 0x00, 0x00, // ### + 0x07, 0x00, 0x00, // ### + 0x07, 0x00, 0x00, // ### + 0x03, 0x80, 0x00, // ### + 0x03, 0x80, 0x00, // ### + 0x03, 0x80, 0x00, // ### + 0x03, 0x80, 0x00, // ### + 0x03, 0x80, 0x00, // ### + 0x03, 0x80, 0x00, // ### + 0x07, 0x00, 0x00, // ### + 0x07, 0x00, 0x00, // ### + 0x0F, 0x00, 0x00, // #### + 0x0E, 0x00, 0x00, // ### + 0x1C, 0x00, 0x00, // ### + 0x18, 0x00, 0x00, // ## + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @720 '*' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x1D, 0xB8, 0x00, // ### ## ### + 0x1F, 0xF8, 0x00, // ########## + 0x07, 0xE0, 0x00, // ###### + 0x03, 0xC0, 0x00, // #### + 0x03, 0xC0, 0x00, // #### + 0x06, 0x60, 0x00, // ## ## + 0x06, 0x60, 0x00, // ## ## + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @792 '+' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x3F, 0xFC, 0x00, // ############ + 0x3F, 0xFC, 0x00, // ############ + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @864 ',' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0xE0, 0x00, // ### + 0x00, 0xC0, 0x00, // ## + 0x01, 0xC0, 0x00, // ### + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x03, 0x00, 0x00, // ## + 0x03, 0x00, 0x00, // ## + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @936 '-' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x1F, 0xF8, 0x00, // ########## + 0x1F, 0xF8, 0x00, // ########## + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @1008 '.' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x03, 0xC0, 0x00, // #### + 0x03, 0xC0, 0x00, // #### + 0x03, 0xC0, 0x00, // #### + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @1080 '/' (17 pixels wide) + 0x00, 0x18, 0x00, // ## + 0x00, 0x18, 0x00, // ## + 0x00, 0x38, 0x00, // ### + 0x00, 0x30, 0x00, // ## + 0x00, 0x70, 0x00, // ### + 0x00, 0x60, 0x00, // ## + 0x00, 0x60, 0x00, // ## + 0x00, 0xC0, 0x00, // ## + 0x00, 0xC0, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x03, 0x00, 0x00, // ## + 0x03, 0x00, 0x00, // ## + 0x06, 0x00, 0x00, // ## + 0x06, 0x00, 0x00, // ## + 0x0E, 0x00, 0x00, // ### + 0x0C, 0x00, 0x00, // ## + 0x1C, 0x00, 0x00, // ### + 0x18, 0x00, 0x00, // ## + 0x18, 0x00, 0x00, // ## + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @1152 '0' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x03, 0xC0, 0x00, // #### + 0x07, 0xE0, 0x00, // ###### + 0x0C, 0x30, 0x00, // ## ## + 0x0C, 0x30, 0x00, // ## ## + 0x18, 0x18, 0x00, // ## ## + 0x18, 0x18, 0x00, // ## ## + 0x18, 0x18, 0x00, // ## ## + 0x18, 0x18, 0x00, // ## ## + 0x18, 0x18, 0x00, // ## ## + 0x18, 0x18, 0x00, // ## ## + 0x18, 0x18, 0x00, // ## ## + 0x0C, 0x30, 0x00, // ## ## + 0x0C, 0x30, 0x00, // ## ## + 0x07, 0xE0, 0x00, // ###### + 0x03, 0xC0, 0x00, // #### + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @1224 '1' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x80, 0x00, // # + 0x07, 0x80, 0x00, // #### + 0x1F, 0x80, 0x00, // ###### + 0x1D, 0x80, 0x00, // ### ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x1F, 0xF8, 0x00, // ########## + 0x1F, 0xF8, 0x00, // ########## + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @1296 '2' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x07, 0xC0, 0x00, // ##### + 0x1F, 0xF0, 0x00, // ######### + 0x38, 0x30, 0x00, // ### ## + 0x30, 0x18, 0x00, // ## ## + 0x30, 0x18, 0x00, // ## ## + 0x00, 0x18, 0x00, // ## + 0x00, 0x30, 0x00, // ## + 0x00, 0x60, 0x00, // ## + 0x01, 0xC0, 0x00, // ### + 0x03, 0x80, 0x00, // ### + 0x06, 0x00, 0x00, // ## + 0x0C, 0x00, 0x00, // ## + 0x18, 0x00, 0x00, // ## + 0x3F, 0xF8, 0x00, // ########### + 0x3F, 0xF8, 0x00, // ########### + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @1368 '3' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x03, 0xC0, 0x00, // #### + 0x0F, 0xE0, 0x00, // ####### + 0x0C, 0x70, 0x00, // ## ### + 0x00, 0x30, 0x00, // ## + 0x00, 0x30, 0x00, // ## + 0x00, 0x60, 0x00, // ## + 0x03, 0xC0, 0x00, // #### + 0x03, 0xE0, 0x00, // ##### + 0x00, 0x70, 0x00, // ### + 0x00, 0x18, 0x00, // ## + 0x00, 0x18, 0x00, // ## + 0x00, 0x18, 0x00, // ## + 0x18, 0x38, 0x00, // ## ### + 0x1F, 0xF0, 0x00, // ######### + 0x0F, 0xC0, 0x00, // ###### + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @1440 '4' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0xE0, 0x00, // ### + 0x01, 0xE0, 0x00, // #### + 0x01, 0xE0, 0x00, // #### + 0x03, 0x60, 0x00, // ## ## + 0x06, 0x60, 0x00, // ## ## + 0x06, 0x60, 0x00, // ## ## + 0x0C, 0x60, 0x00, // ## ## + 0x0C, 0x60, 0x00, // ## ## + 0x18, 0x60, 0x00, // ## ## + 0x30, 0x60, 0x00, // ## ## + 0x3F, 0xF8, 0x00, // ########### + 0x3F, 0xF8, 0x00, // ########### + 0x00, 0x60, 0x00, // ## + 0x03, 0xF8, 0x00, // ####### + 0x03, 0xF8, 0x00, // ####### + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @1512 '5' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x1F, 0xF0, 0x00, // ######### + 0x1F, 0xF0, 0x00, // ######### + 0x18, 0x00, 0x00, // ## + 0x18, 0x00, 0x00, // ## + 0x18, 0x00, 0x00, // ## + 0x1B, 0xC0, 0x00, // ## #### + 0x1F, 0xF0, 0x00, // ######### + 0x1C, 0x30, 0x00, // ### ## + 0x00, 0x18, 0x00, // ## + 0x00, 0x18, 0x00, // ## + 0x00, 0x18, 0x00, // ## + 0x00, 0x18, 0x00, // ## + 0x30, 0x30, 0x00, // ## ## + 0x3F, 0xF0, 0x00, // ########## + 0x0F, 0xC0, 0x00, // ###### + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @1584 '6' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0xF8, 0x00, // ##### + 0x03, 0xF8, 0x00, // ####### + 0x07, 0x00, 0x00, // ### + 0x0E, 0x00, 0x00, // ### + 0x0C, 0x00, 0x00, // ## + 0x18, 0x00, 0x00, // ## + 0x1B, 0xC0, 0x00, // ## #### + 0x1F, 0xF0, 0x00, // ######### + 0x1C, 0x30, 0x00, // ### ## + 0x18, 0x18, 0x00, // ## ## + 0x18, 0x18, 0x00, // ## ## + 0x18, 0x18, 0x00, // ## ## + 0x0C, 0x38, 0x00, // ## ### + 0x0F, 0xF0, 0x00, // ######## + 0x03, 0xE0, 0x00, // ##### + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @1656 '7' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x1F, 0xF8, 0x00, // ########## + 0x1F, 0xF8, 0x00, // ########## + 0x18, 0x18, 0x00, // ## ## + 0x18, 0x38, 0x00, // ## ### + 0x00, 0x30, 0x00, // ## + 0x00, 0x30, 0x00, // ## + 0x00, 0x70, 0x00, // ### + 0x00, 0x60, 0x00, // ## + 0x00, 0x60, 0x00, // ## + 0x00, 0xE0, 0x00, // ### + 0x00, 0xC0, 0x00, // ## + 0x00, 0xC0, 0x00, // ## + 0x01, 0xC0, 0x00, // ### + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @1728 '8' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x07, 0xE0, 0x00, // ###### + 0x0F, 0xF0, 0x00, // ######## + 0x1C, 0x38, 0x00, // ### ### + 0x18, 0x18, 0x00, // ## ## + 0x18, 0x18, 0x00, // ## ## + 0x0C, 0x30, 0x00, // ## ## + 0x07, 0xE0, 0x00, // ###### + 0x07, 0xE0, 0x00, // ###### + 0x0C, 0x30, 0x00, // ## ## + 0x18, 0x18, 0x00, // ## ## + 0x18, 0x18, 0x00, // ## ## + 0x18, 0x18, 0x00, // ## ## + 0x1C, 0x38, 0x00, // ### ### + 0x0F, 0xF0, 0x00, // ######## + 0x07, 0xE0, 0x00, // ###### + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @1800 '9' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x07, 0xC0, 0x00, // ##### + 0x0F, 0xF0, 0x00, // ######## + 0x1C, 0x30, 0x00, // ### ## + 0x18, 0x18, 0x00, // ## ## + 0x18, 0x18, 0x00, // ## ## + 0x18, 0x18, 0x00, // ## ## + 0x0C, 0x38, 0x00, // ## ### + 0x0F, 0xF8, 0x00, // ######### + 0x03, 0xD8, 0x00, // #### ## + 0x00, 0x18, 0x00, // ## + 0x00, 0x30, 0x00, // ## + 0x00, 0x70, 0x00, // ### + 0x00, 0xE0, 0x00, // ### + 0x1F, 0xC0, 0x00, // ####### + 0x1F, 0x00, 0x00, // ##### + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @1872 ':' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x03, 0xC0, 0x00, // #### + 0x03, 0xC0, 0x00, // #### + 0x03, 0xC0, 0x00, // #### + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x03, 0xC0, 0x00, // #### + 0x03, 0xC0, 0x00, // #### + 0x03, 0xC0, 0x00, // #### + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @1944 ';' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0xF0, 0x00, // #### + 0x00, 0xF0, 0x00, // #### + 0x00, 0xF0, 0x00, // #### + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0xE0, 0x00, // ### + 0x01, 0xC0, 0x00, // ### + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x03, 0x00, 0x00, // ## + 0x02, 0x00, 0x00, // # + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @2016 '<' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x1C, 0x00, // ### + 0x00, 0x3C, 0x00, // #### + 0x00, 0xF0, 0x00, // #### + 0x03, 0xC0, 0x00, // #### + 0x0F, 0x00, 0x00, // #### + 0x3C, 0x00, 0x00, // #### + 0xF0, 0x00, 0x00, // #### + 0x3C, 0x00, 0x00, // #### + 0x0F, 0x00, 0x00, // #### + 0x03, 0xC0, 0x00, // #### + 0x00, 0xF0, 0x00, // #### + 0x00, 0x3C, 0x00, // #### + 0x00, 0x1C, 0x00, // ### + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @2088 '=' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x7F, 0xFC, 0x00, // ############# + 0x7F, 0xFC, 0x00, // ############# + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x7F, 0xFC, 0x00, // ############# + 0x7F, 0xFC, 0x00, // ############# + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @2160 '>' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x70, 0x00, 0x00, // ### + 0x78, 0x00, 0x00, // #### + 0x1E, 0x00, 0x00, // #### + 0x07, 0x80, 0x00, // #### + 0x01, 0xE0, 0x00, // #### + 0x00, 0x78, 0x00, // #### + 0x00, 0x1E, 0x00, // #### + 0x00, 0x78, 0x00, // #### + 0x01, 0xE0, 0x00, // #### + 0x07, 0x80, 0x00, // #### + 0x1E, 0x00, 0x00, // #### + 0x78, 0x00, 0x00, // #### + 0x70, 0x00, 0x00, // ### + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @2232 '?' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x07, 0xC0, 0x00, // ##### + 0x0F, 0xE0, 0x00, // ####### + 0x18, 0x70, 0x00, // ## ### + 0x18, 0x30, 0x00, // ## ## + 0x18, 0x30, 0x00, // ## ## + 0x00, 0x70, 0x00, // ### + 0x00, 0xE0, 0x00, // ### + 0x03, 0xC0, 0x00, // #### + 0x03, 0x80, 0x00, // ### + 0x03, 0x00, 0x00, // ## + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x07, 0x00, 0x00, // ### + 0x07, 0x00, 0x00, // ### + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @2304 '@' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x03, 0xE0, 0x00, // ##### + 0x07, 0xF0, 0x00, // ####### + 0x0E, 0x38, 0x00, // ### ### + 0x0C, 0x18, 0x00, // ## ## + 0x18, 0x78, 0x00, // ## #### + 0x18, 0xF8, 0x00, // ## ##### + 0x19, 0xD8, 0x00, // ## ### ## + 0x19, 0x98, 0x00, // ## ## ## + 0x19, 0x98, 0x00, // ## ## ## + 0x19, 0x98, 0x00, // ## ## ## + 0x18, 0xF8, 0x00, // ## ##### + 0x18, 0x78, 0x00, // ## #### + 0x18, 0x00, 0x00, // ## + 0x0C, 0x00, 0x00, // ## + 0x0E, 0x18, 0x00, // ### ## + 0x07, 0xF8, 0x00, // ######## + 0x03, 0xE0, 0x00, // ##### + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @2376 'A' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x1F, 0x80, 0x00, // ###### + 0x1F, 0xC0, 0x00, // ####### + 0x01, 0xC0, 0x00, // ### + 0x03, 0x60, 0x00, // ## ## + 0x03, 0x60, 0x00, // ## ## + 0x06, 0x30, 0x00, // ## ## + 0x06, 0x30, 0x00, // ## ## + 0x0C, 0x30, 0x00, // ## ## + 0x0F, 0xF8, 0x00, // ######### + 0x1F, 0xF8, 0x00, // ########## + 0x18, 0x0C, 0x00, // ## ## + 0x30, 0x0C, 0x00, // ## ## + 0xFC, 0x7F, 0x00, // ###### ####### + 0xFC, 0x7F, 0x00, // ###### ####### + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @2448 'B' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x7F, 0xE0, 0x00, // ########## + 0x7F, 0xF0, 0x00, // ########### + 0x18, 0x38, 0x00, // ## ### + 0x18, 0x18, 0x00, // ## ## + 0x18, 0x18, 0x00, // ## ## + 0x18, 0x38, 0x00, // ## ### + 0x1F, 0xF0, 0x00, // ######### + 0x1F, 0xF8, 0x00, // ########## + 0x18, 0x1C, 0x00, // ## ### + 0x18, 0x0C, 0x00, // ## ## + 0x18, 0x0C, 0x00, // ## ## + 0x18, 0x0C, 0x00, // ## ## + 0x7F, 0xF8, 0x00, // ############ + 0x7F, 0xF0, 0x00, // ########### + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @2520 'C' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x03, 0xEC, 0x00, // ##### ## + 0x0F, 0xFC, 0x00, // ########## + 0x1C, 0x1C, 0x00, // ### ### + 0x18, 0x0C, 0x00, // ## ## + 0x30, 0x0C, 0x00, // ## ## + 0x30, 0x00, 0x00, // ## + 0x30, 0x00, 0x00, // ## + 0x30, 0x00, 0x00, // ## + 0x30, 0x00, 0x00, // ## + 0x30, 0x00, 0x00, // ## + 0x18, 0x0C, 0x00, // ## ## + 0x1C, 0x1C, 0x00, // ### ### + 0x0F, 0xF8, 0x00, // ######### + 0x03, 0xF0, 0x00, // ###### + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @2592 'D' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x7F, 0xC0, 0x00, // ######### + 0x7F, 0xF0, 0x00, // ########### + 0x18, 0x38, 0x00, // ## ### + 0x18, 0x18, 0x00, // ## ## + 0x18, 0x0C, 0x00, // ## ## + 0x18, 0x0C, 0x00, // ## ## + 0x18, 0x0C, 0x00, // ## ## + 0x18, 0x0C, 0x00, // ## ## + 0x18, 0x0C, 0x00, // ## ## + 0x18, 0x0C, 0x00, // ## ## + 0x18, 0x18, 0x00, // ## ## + 0x18, 0x38, 0x00, // ## ### + 0x7F, 0xF0, 0x00, // ########### + 0x7F, 0xE0, 0x00, // ########## + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @2664 'E' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x7F, 0xF8, 0x00, // ############ + 0x7F, 0xF8, 0x00, // ############ + 0x18, 0x18, 0x00, // ## ## + 0x18, 0x18, 0x00, // ## ## + 0x19, 0x98, 0x00, // ## ## ## + 0x19, 0x80, 0x00, // ## ## + 0x1F, 0x80, 0x00, // ###### + 0x1F, 0x80, 0x00, // ###### + 0x19, 0x80, 0x00, // ## ## + 0x19, 0x98, 0x00, // ## ## ## + 0x18, 0x18, 0x00, // ## ## + 0x18, 0x18, 0x00, // ## ## + 0x7F, 0xF8, 0x00, // ############ + 0x7F, 0xF8, 0x00, // ############ + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @2736 'F' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x3F, 0xFC, 0x00, // ############ + 0x3F, 0xFC, 0x00, // ############ + 0x0C, 0x0C, 0x00, // ## ## + 0x0C, 0x0C, 0x00, // ## ## + 0x0C, 0xCC, 0x00, // ## ## ## + 0x0C, 0xC0, 0x00, // ## ## + 0x0F, 0xC0, 0x00, // ###### + 0x0F, 0xC0, 0x00, // ###### + 0x0C, 0xC0, 0x00, // ## ## + 0x0C, 0xC0, 0x00, // ## ## + 0x0C, 0x00, 0x00, // ## + 0x0C, 0x00, 0x00, // ## + 0x3F, 0xC0, 0x00, // ######## + 0x3F, 0xC0, 0x00, // ######## + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @2808 'G' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x03, 0xEC, 0x00, // ##### ## + 0x0F, 0xFC, 0x00, // ########## + 0x1C, 0x1C, 0x00, // ### ### + 0x18, 0x0C, 0x00, // ## ## + 0x30, 0x0C, 0x00, // ## ## + 0x30, 0x00, 0x00, // ## + 0x30, 0x00, 0x00, // ## + 0x30, 0xFE, 0x00, // ## ####### + 0x30, 0xFE, 0x00, // ## ####### + 0x30, 0x0C, 0x00, // ## ## + 0x38, 0x0C, 0x00, // ### ## + 0x1C, 0x1C, 0x00, // ### ### + 0x0F, 0xFC, 0x00, // ########## + 0x03, 0xF0, 0x00, // ###### + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @2880 'H' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x7E, 0x7E, 0x00, // ###### ###### + 0x7E, 0x7E, 0x00, // ###### ###### + 0x18, 0x18, 0x00, // ## ## + 0x18, 0x18, 0x00, // ## ## + 0x18, 0x18, 0x00, // ## ## + 0x18, 0x18, 0x00, // ## ## + 0x1F, 0xF8, 0x00, // ########## + 0x1F, 0xF8, 0x00, // ########## + 0x18, 0x18, 0x00, // ## ## + 0x18, 0x18, 0x00, // ## ## + 0x18, 0x18, 0x00, // ## ## + 0x18, 0x18, 0x00, // ## ## + 0x7E, 0x7E, 0x00, // ###### ###### + 0x7E, 0x7E, 0x00, // ###### ###### + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @2952 'I' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x1F, 0xF8, 0x00, // ########## + 0x1F, 0xF8, 0x00, // ########## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x1F, 0xF8, 0x00, // ########## + 0x1F, 0xF8, 0x00, // ########## + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @3024 'J' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x07, 0xFE, 0x00, // ########## + 0x07, 0xFE, 0x00, // ########## + 0x00, 0x30, 0x00, // ## + 0x00, 0x30, 0x00, // ## + 0x00, 0x30, 0x00, // ## + 0x00, 0x30, 0x00, // ## + 0x00, 0x30, 0x00, // ## + 0x30, 0x30, 0x00, // ## ## + 0x30, 0x30, 0x00, // ## ## + 0x30, 0x30, 0x00, // ## ## + 0x30, 0x30, 0x00, // ## ## + 0x30, 0x60, 0x00, // ## ## + 0x3F, 0xE0, 0x00, // ######### + 0x0F, 0x80, 0x00, // ##### + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @3096 'K' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x7F, 0x3E, 0x00, // ####### ##### + 0x7F, 0x3E, 0x00, // ####### ##### + 0x18, 0x30, 0x00, // ## ## + 0x18, 0x60, 0x00, // ## ## + 0x18, 0xC0, 0x00, // ## ## + 0x19, 0x80, 0x00, // ## ## + 0x1B, 0x80, 0x00, // ## ### + 0x1F, 0xC0, 0x00, // ####### + 0x1C, 0xE0, 0x00, // ### ### + 0x18, 0x70, 0x00, // ## ### + 0x18, 0x30, 0x00, // ## ## + 0x18, 0x38, 0x00, // ## ### + 0x7F, 0x1F, 0x00, // ####### ##### + 0x7F, 0x1F, 0x00, // ####### ##### + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @3168 'L' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x7F, 0x80, 0x00, // ######## + 0x7F, 0x80, 0x00, // ######## + 0x0C, 0x00, 0x00, // ## + 0x0C, 0x00, 0x00, // ## + 0x0C, 0x00, 0x00, // ## + 0x0C, 0x00, 0x00, // ## + 0x0C, 0x00, 0x00, // ## + 0x0C, 0x00, 0x00, // ## + 0x0C, 0x0C, 0x00, // ## ## + 0x0C, 0x0C, 0x00, // ## ## + 0x0C, 0x0C, 0x00, // ## ## + 0x0C, 0x0C, 0x00, // ## ## + 0x7F, 0xFC, 0x00, // ############# + 0x7F, 0xFC, 0x00, // ############# + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @3240 'M' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0xF0, 0x0F, 0x00, // #### #### + 0xF8, 0x1F, 0x00, // ##### ##### + 0x38, 0x1C, 0x00, // ### ### + 0x3C, 0x3C, 0x00, // #### #### + 0x3C, 0x3C, 0x00, // #### #### + 0x36, 0x6C, 0x00, // ## ## ## ## + 0x36, 0x6C, 0x00, // ## ## ## ## + 0x33, 0xCC, 0x00, // ## #### ## + 0x33, 0xCC, 0x00, // ## #### ## + 0x31, 0x8C, 0x00, // ## ## ## + 0x30, 0x0C, 0x00, // ## ## + 0x30, 0x0C, 0x00, // ## ## + 0xFE, 0x7F, 0x00, // ####### ####### + 0xFE, 0x7F, 0x00, // ####### ####### + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @3312 'N' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x78, 0xFE, 0x00, // #### ####### + 0x78, 0xFE, 0x00, // #### ####### + 0x1C, 0x18, 0x00, // ### ## + 0x1E, 0x18, 0x00, // #### ## + 0x1F, 0x18, 0x00, // ##### ## + 0x1B, 0x18, 0x00, // ## ## ## + 0x1B, 0x98, 0x00, // ## ### ## + 0x19, 0xD8, 0x00, // ## ### ## + 0x18, 0xD8, 0x00, // ## ## ## + 0x18, 0xF8, 0x00, // ## ##### + 0x18, 0x78, 0x00, // ## #### + 0x18, 0x38, 0x00, // ## ### + 0x7F, 0x18, 0x00, // ####### ## + 0x7F, 0x18, 0x00, // ####### ## + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @3384 'O' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x03, 0xC0, 0x00, // #### + 0x0F, 0xF0, 0x00, // ######## + 0x1C, 0x38, 0x00, // ### ### + 0x18, 0x18, 0x00, // ## ## + 0x38, 0x1C, 0x00, // ### ### + 0x30, 0x0C, 0x00, // ## ## + 0x30, 0x0C, 0x00, // ## ## + 0x30, 0x0C, 0x00, // ## ## + 0x30, 0x0C, 0x00, // ## ## + 0x38, 0x1C, 0x00, // ### ### + 0x18, 0x18, 0x00, // ## ## + 0x1C, 0x38, 0x00, // ### ### + 0x0F, 0xF0, 0x00, // ######## + 0x03, 0xC0, 0x00, // #### + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @3456 'P' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x3F, 0xF0, 0x00, // ########## + 0x3F, 0xF8, 0x00, // ########### + 0x0C, 0x1C, 0x00, // ## ### + 0x0C, 0x0C, 0x00, // ## ## + 0x0C, 0x0C, 0x00, // ## ## + 0x0C, 0x0C, 0x00, // ## ## + 0x0C, 0x18, 0x00, // ## ## + 0x0F, 0xF8, 0x00, // ######### + 0x0F, 0xE0, 0x00, // ####### + 0x0C, 0x00, 0x00, // ## + 0x0C, 0x00, 0x00, // ## + 0x0C, 0x00, 0x00, // ## + 0x3F, 0xC0, 0x00, // ######## + 0x3F, 0xC0, 0x00, // ######## + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @3528 'Q' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x03, 0xC0, 0x00, // #### + 0x0F, 0xF0, 0x00, // ######## + 0x1C, 0x38, 0x00, // ### ### + 0x18, 0x18, 0x00, // ## ## + 0x38, 0x1C, 0x00, // ### ### + 0x30, 0x0C, 0x00, // ## ## + 0x30, 0x0C, 0x00, // ## ## + 0x30, 0x0C, 0x00, // ## ## + 0x30, 0x0C, 0x00, // ## ## + 0x38, 0x1C, 0x00, // ### ### + 0x18, 0x18, 0x00, // ## ## + 0x1C, 0x38, 0x00, // ### ### + 0x0F, 0xF0, 0x00, // ######## + 0x07, 0xC0, 0x00, // ##### + 0x07, 0xCC, 0x00, // ##### ## + 0x0F, 0xFC, 0x00, // ########## + 0x0C, 0x38, 0x00, // ## ### + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @3600 'R' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x7F, 0xE0, 0x00, // ########## + 0x7F, 0xF0, 0x00, // ########### + 0x18, 0x38, 0x00, // ## ### + 0x18, 0x18, 0x00, // ## ## + 0x18, 0x18, 0x00, // ## ## + 0x18, 0x38, 0x00, // ## ### + 0x1F, 0xF0, 0x00, // ######### + 0x1F, 0xC0, 0x00, // ####### + 0x18, 0xE0, 0x00, // ## ### + 0x18, 0x70, 0x00, // ## ### + 0x18, 0x30, 0x00, // ## ## + 0x18, 0x38, 0x00, // ## ### + 0x7F, 0x1E, 0x00, // ####### #### + 0x7F, 0x0E, 0x00, // ####### ### + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @3672 'S' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x07, 0xD8, 0x00, // ##### ## + 0x0F, 0xF8, 0x00, // ######### + 0x1C, 0x38, 0x00, // ### ### + 0x18, 0x18, 0x00, // ## ## + 0x18, 0x18, 0x00, // ## ## + 0x1E, 0x00, 0x00, // #### + 0x0F, 0xC0, 0x00, // ###### + 0x03, 0xF0, 0x00, // ###### + 0x00, 0x78, 0x00, // #### + 0x18, 0x18, 0x00, // ## ## + 0x18, 0x18, 0x00, // ## ## + 0x1C, 0x38, 0x00, // ### ### + 0x1F, 0xF0, 0x00, // ######### + 0x1B, 0xE0, 0x00, // ## ##### + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @3744 'T' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x3F, 0xFC, 0x00, // ############ + 0x3F, 0xFC, 0x00, // ############ + 0x31, 0x8C, 0x00, // ## ## ## + 0x31, 0x8C, 0x00, // ## ## ## + 0x31, 0x8C, 0x00, // ## ## ## + 0x31, 0x8C, 0x00, // ## ## ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x0F, 0xF0, 0x00, // ######## + 0x0F, 0xF0, 0x00, // ######## + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @3816 'U' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x7E, 0x7E, 0x00, // ###### ###### + 0x7E, 0x7E, 0x00, // ###### ###### + 0x18, 0x18, 0x00, // ## ## + 0x18, 0x18, 0x00, // ## ## + 0x18, 0x18, 0x00, // ## ## + 0x18, 0x18, 0x00, // ## ## + 0x18, 0x18, 0x00, // ## ## + 0x18, 0x18, 0x00, // ## ## + 0x18, 0x18, 0x00, // ## ## + 0x18, 0x18, 0x00, // ## ## + 0x18, 0x18, 0x00, // ## ## + 0x0C, 0x30, 0x00, // ## ## + 0x0F, 0xF0, 0x00, // ######## + 0x03, 0xC0, 0x00, // #### + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @3888 'V' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x7F, 0x7F, 0x00, // ####### ####### + 0x7F, 0x7F, 0x00, // ####### ####### + 0x18, 0x0C, 0x00, // ## ## + 0x0C, 0x18, 0x00, // ## ## + 0x0C, 0x18, 0x00, // ## ## + 0x0C, 0x18, 0x00, // ## ## + 0x06, 0x30, 0x00, // ## ## + 0x06, 0x30, 0x00, // ## ## + 0x03, 0x60, 0x00, // ## ## + 0x03, 0x60, 0x00, // ## ## + 0x03, 0x60, 0x00, // ## ## + 0x01, 0xC0, 0x00, // ### + 0x01, 0xC0, 0x00, // ### + 0x00, 0x80, 0x00, // # + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @3960 'W' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0xFE, 0x3F, 0x80, // ####### ####### + 0xFE, 0x3F, 0x80, // ####### ####### + 0x30, 0x06, 0x00, // ## ## + 0x30, 0x06, 0x00, // ## ## + 0x30, 0x86, 0x00, // ## # ## + 0x19, 0xCC, 0x00, // ## ### ## + 0x19, 0xCC, 0x00, // ## ### ## + 0x1B, 0x6C, 0x00, // ## ## ## ## + 0x1B, 0x6C, 0x00, // ## ## ## ## + 0x1E, 0x7C, 0x00, // #### ##### + 0x0E, 0x38, 0x00, // ### ### + 0x0E, 0x38, 0x00, // ### ### + 0x0C, 0x18, 0x00, // ## ## + 0x0C, 0x18, 0x00, // ## ## + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @4032 'X' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x7E, 0x7E, 0x00, // ###### ###### + 0x7E, 0x7E, 0x00, // ###### ###### + 0x18, 0x18, 0x00, // ## ## + 0x0C, 0x30, 0x00, // ## ## + 0x06, 0x60, 0x00, // ## ## + 0x03, 0xC0, 0x00, // #### + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x03, 0xC0, 0x00, // #### + 0x06, 0x60, 0x00, // ## ## + 0x0C, 0x30, 0x00, // ## ## + 0x18, 0x18, 0x00, // ## ## + 0x7E, 0x7E, 0x00, // ###### ###### + 0x7E, 0x7E, 0x00, // ###### ###### + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @4104 'Y' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x7C, 0x7E, 0x00, // ##### ###### + 0x7C, 0x7E, 0x00, // ##### ###### + 0x18, 0x18, 0x00, // ## ## + 0x0C, 0x30, 0x00, // ## ## + 0x06, 0x60, 0x00, // ## ## + 0x06, 0x60, 0x00, // ## ## + 0x03, 0xC0, 0x00, // #### + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x0F, 0xF0, 0x00, // ######## + 0x0F, 0xF0, 0x00, // ######## + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @4176 'Z' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x1F, 0xF8, 0x00, // ########## + 0x1F, 0xF8, 0x00, // ########## + 0x18, 0x18, 0x00, // ## ## + 0x18, 0x30, 0x00, // ## ## + 0x18, 0x60, 0x00, // ## ## + 0x18, 0xC0, 0x00, // ## ## + 0x01, 0x80, 0x00, // ## + 0x03, 0x00, 0x00, // ## + 0x06, 0x18, 0x00, // ## ## + 0x0C, 0x18, 0x00, // ## ## + 0x18, 0x18, 0x00, // ## ## + 0x30, 0x18, 0x00, // ## ## + 0x3F, 0xF8, 0x00, // ########### + 0x3F, 0xF8, 0x00, // ########### + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @4248 '[' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x01, 0xF0, 0x00, // ##### + 0x01, 0xF0, 0x00, // ##### + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0xF0, 0x00, // ##### + 0x01, 0xF0, 0x00, // ##### + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @4320 '\' (17 pixels wide) + 0x18, 0x00, 0x00, // ## + 0x18, 0x00, 0x00, // ## + 0x1C, 0x00, 0x00, // ### + 0x0C, 0x00, 0x00, // ## + 0x0E, 0x00, 0x00, // ### + 0x06, 0x00, 0x00, // ## + 0x06, 0x00, 0x00, // ## + 0x03, 0x00, 0x00, // ## + 0x03, 0x00, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x00, 0xC0, 0x00, // ## + 0x00, 0xC0, 0x00, // ## + 0x00, 0x60, 0x00, // ## + 0x00, 0x60, 0x00, // ## + 0x00, 0x70, 0x00, // ### + 0x00, 0x30, 0x00, // ## + 0x00, 0x38, 0x00, // ### + 0x00, 0x18, 0x00, // ## + 0x00, 0x18, 0x00, // ## + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @4392 ']' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x0F, 0x80, 0x00, // ##### + 0x0F, 0x80, 0x00, // ##### + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x0F, 0x80, 0x00, // ##### + 0x0F, 0x80, 0x00, // ##### + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @4464 '^' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x80, 0x00, // # + 0x01, 0xC0, 0x00, // ### + 0x03, 0xE0, 0x00, // ##### + 0x07, 0x70, 0x00, // ### ### + 0x06, 0x30, 0x00, // ## ## + 0x0C, 0x18, 0x00, // ## ## + 0x18, 0x0C, 0x00, // ## ## + 0x10, 0x04, 0x00, // # # + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @4536 '_' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0xFF, 0xFF, 0x00, // ################ + 0xFF, 0xFF, 0x00, // ################ + + // @4608 '`' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x03, 0x00, 0x00, // ## + 0x03, 0x80, 0x00, // ### + 0x00, 0xE0, 0x00, // ### + 0x00, 0x60, 0x00, // ## + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @4680 'a' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x0F, 0xC0, 0x00, // ###### + 0x1F, 0xE0, 0x00, // ######## + 0x00, 0x30, 0x00, // ## + 0x00, 0x30, 0x00, // ## + 0x07, 0xF0, 0x00, // ####### + 0x1F, 0xF0, 0x00, // ######### + 0x38, 0x30, 0x00, // ### ## + 0x30, 0x30, 0x00, // ## ## + 0x30, 0x70, 0x00, // ## ### + 0x1F, 0xFC, 0x00, // ########### + 0x0F, 0xBC, 0x00, // ##### #### + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @4752 'b' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x78, 0x00, 0x00, // #### + 0x78, 0x00, 0x00, // #### + 0x18, 0x00, 0x00, // ## + 0x18, 0x00, 0x00, // ## + 0x1B, 0xE0, 0x00, // ## ##### + 0x1F, 0xF8, 0x00, // ########## + 0x1C, 0x18, 0x00, // ### ## + 0x18, 0x0C, 0x00, // ## ## + 0x18, 0x0C, 0x00, // ## ## + 0x18, 0x0C, 0x00, // ## ## + 0x18, 0x0C, 0x00, // ## ## + 0x18, 0x0C, 0x00, // ## ## + 0x1C, 0x18, 0x00, // ### ## + 0x7F, 0xF8, 0x00, // ############ + 0x7B, 0xE0, 0x00, // #### ##### + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @4824 'c' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x03, 0xEC, 0x00, // ##### ## + 0x0F, 0xFC, 0x00, // ########## + 0x1C, 0x1C, 0x00, // ### ### + 0x38, 0x0C, 0x00, // ### ## + 0x30, 0x0C, 0x00, // ## ## + 0x30, 0x00, 0x00, // ## + 0x30, 0x00, 0x00, // ## + 0x38, 0x0C, 0x00, // ### ## + 0x1C, 0x1C, 0x00, // ### ### + 0x0F, 0xF8, 0x00, // ######### + 0x03, 0xF0, 0x00, // ###### + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @4896 'd' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x78, 0x00, // #### + 0x00, 0x78, 0x00, // #### + 0x00, 0x18, 0x00, // ## + 0x00, 0x18, 0x00, // ## + 0x07, 0xD8, 0x00, // ##### ## + 0x1F, 0xF8, 0x00, // ########## + 0x18, 0x38, 0x00, // ## ### + 0x30, 0x18, 0x00, // ## ## + 0x30, 0x18, 0x00, // ## ## + 0x30, 0x18, 0x00, // ## ## + 0x30, 0x18, 0x00, // ## ## + 0x30, 0x18, 0x00, // ## ## + 0x18, 0x38, 0x00, // ## ### + 0x1F, 0xFE, 0x00, // ############ + 0x07, 0xDE, 0x00, // ##### #### + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @4968 'e' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x07, 0xE0, 0x00, // ###### + 0x1F, 0xF8, 0x00, // ########## + 0x18, 0x18, 0x00, // ## ## + 0x30, 0x0C, 0x00, // ## ## + 0x3F, 0xFC, 0x00, // ############ + 0x3F, 0xFC, 0x00, // ############ + 0x30, 0x00, 0x00, // ## + 0x30, 0x00, 0x00, // ## + 0x18, 0x0C, 0x00, // ## ## + 0x1F, 0xFC, 0x00, // ########### + 0x07, 0xF0, 0x00, // ####### + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @5040 'f' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x01, 0xFC, 0x00, // ####### + 0x03, 0xFC, 0x00, // ######## + 0x06, 0x00, 0x00, // ## + 0x06, 0x00, 0x00, // ## + 0x3F, 0xF8, 0x00, // ########### + 0x3F, 0xF8, 0x00, // ########### + 0x06, 0x00, 0x00, // ## + 0x06, 0x00, 0x00, // ## + 0x06, 0x00, 0x00, // ## + 0x06, 0x00, 0x00, // ## + 0x06, 0x00, 0x00, // ## + 0x06, 0x00, 0x00, // ## + 0x06, 0x00, 0x00, // ## + 0x3F, 0xF0, 0x00, // ########## + 0x3F, 0xF0, 0x00, // ########## + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @5112 'g' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x07, 0xDE, 0x00, // ##### #### + 0x1F, 0xFE, 0x00, // ############ + 0x18, 0x38, 0x00, // ## ### + 0x30, 0x18, 0x00, // ## ## + 0x30, 0x18, 0x00, // ## ## + 0x30, 0x18, 0x00, // ## ## + 0x30, 0x18, 0x00, // ## ## + 0x30, 0x18, 0x00, // ## ## + 0x18, 0x38, 0x00, // ## ### + 0x1F, 0xF8, 0x00, // ########## + 0x07, 0xD8, 0x00, // ##### ## + 0x00, 0x18, 0x00, // ## + 0x00, 0x18, 0x00, // ## + 0x00, 0x38, 0x00, // ### + 0x0F, 0xF0, 0x00, // ######## + 0x0F, 0xC0, 0x00, // ###### + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @5184 'h' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x78, 0x00, 0x00, // #### + 0x78, 0x00, 0x00, // #### + 0x18, 0x00, 0x00, // ## + 0x18, 0x00, 0x00, // ## + 0x1B, 0xE0, 0x00, // ## ##### + 0x1F, 0xF0, 0x00, // ######### + 0x1C, 0x38, 0x00, // ### ### + 0x18, 0x18, 0x00, // ## ## + 0x18, 0x18, 0x00, // ## ## + 0x18, 0x18, 0x00, // ## ## + 0x18, 0x18, 0x00, // ## ## + 0x18, 0x18, 0x00, // ## ## + 0x18, 0x18, 0x00, // ## ## + 0x7E, 0x7E, 0x00, // ###### ###### + 0x7E, 0x7E, 0x00, // ###### ###### + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @5256 'i' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x1F, 0x80, 0x00, // ###### + 0x1F, 0x80, 0x00, // ###### + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x3F, 0xFC, 0x00, // ############ + 0x3F, 0xFC, 0x00, // ############ + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @5328 'j' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0xC0, 0x00, // ## + 0x00, 0xC0, 0x00, // ## + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x1F, 0xF0, 0x00, // ######### + 0x1F, 0xF0, 0x00, // ######### + 0x00, 0x30, 0x00, // ## + 0x00, 0x30, 0x00, // ## + 0x00, 0x30, 0x00, // ## + 0x00, 0x30, 0x00, // ## + 0x00, 0x30, 0x00, // ## + 0x00, 0x30, 0x00, // ## + 0x00, 0x30, 0x00, // ## + 0x00, 0x30, 0x00, // ## + 0x00, 0x30, 0x00, // ## + 0x00, 0x30, 0x00, // ## + 0x00, 0x30, 0x00, // ## + 0x00, 0x70, 0x00, // ### + 0x1F, 0xE0, 0x00, // ######## + 0x1F, 0x80, 0x00, // ###### + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @5400 'k' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x3C, 0x00, 0x00, // #### + 0x3C, 0x00, 0x00, // #### + 0x0C, 0x00, 0x00, // ## + 0x0C, 0x00, 0x00, // ## + 0x0C, 0xF8, 0x00, // ## ##### + 0x0C, 0xF8, 0x00, // ## ##### + 0x0C, 0xC0, 0x00, // ## ## + 0x0D, 0x80, 0x00, // ## ## + 0x0F, 0x80, 0x00, // ##### + 0x0F, 0x00, 0x00, // #### + 0x0F, 0x80, 0x00, // ##### + 0x0D, 0xC0, 0x00, // ## ### + 0x0C, 0xE0, 0x00, // ## ### + 0x3C, 0x7C, 0x00, // #### ##### + 0x3C, 0x7C, 0x00, // #### ##### + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @5472 'l' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x1F, 0x80, 0x00, // ###### + 0x1F, 0x80, 0x00, // ###### + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x3F, 0xFC, 0x00, // ############ + 0x3F, 0xFC, 0x00, // ############ + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @5544 'm' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0xF7, 0x78, 0x00, // #### ### #### + 0xFF, 0xFC, 0x00, // ############## + 0x39, 0xCC, 0x00, // ### ### ## + 0x31, 0x8C, 0x00, // ## ## ## + 0x31, 0x8C, 0x00, // ## ## ## + 0x31, 0x8C, 0x00, // ## ## ## + 0x31, 0x8C, 0x00, // ## ## ## + 0x31, 0x8C, 0x00, // ## ## ## + 0x31, 0x8C, 0x00, // ## ## ## + 0xFD, 0xEF, 0x00, // ###### #### #### + 0xFD, 0xEF, 0x00, // ###### #### #### + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @5616 'n' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x7B, 0xE0, 0x00, // #### ##### + 0x7F, 0xF0, 0x00, // ########### + 0x1C, 0x38, 0x00, // ### ### + 0x18, 0x18, 0x00, // ## ## + 0x18, 0x18, 0x00, // ## ## + 0x18, 0x18, 0x00, // ## ## + 0x18, 0x18, 0x00, // ## ## + 0x18, 0x18, 0x00, // ## ## + 0x18, 0x18, 0x00, // ## ## + 0x7E, 0x7E, 0x00, // ###### ###### + 0x7E, 0x7E, 0x00, // ###### ###### + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @5688 'o' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x03, 0xC0, 0x00, // #### + 0x0F, 0xF0, 0x00, // ######## + 0x1C, 0x38, 0x00, // ### ### + 0x38, 0x1C, 0x00, // ### ### + 0x30, 0x0C, 0x00, // ## ## + 0x30, 0x0C, 0x00, // ## ## + 0x30, 0x0C, 0x00, // ## ## + 0x38, 0x1C, 0x00, // ### ### + 0x1C, 0x38, 0x00, // ### ### + 0x0F, 0xF0, 0x00, // ######## + 0x03, 0xC0, 0x00, // #### + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @5760 'p' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x7B, 0xE0, 0x00, // #### ##### + 0x7F, 0xF8, 0x00, // ############ + 0x1C, 0x18, 0x00, // ### ## + 0x18, 0x0C, 0x00, // ## ## + 0x18, 0x0C, 0x00, // ## ## + 0x18, 0x0C, 0x00, // ## ## + 0x18, 0x0C, 0x00, // ## ## + 0x18, 0x0C, 0x00, // ## ## + 0x1C, 0x18, 0x00, // ### ## + 0x1F, 0xF8, 0x00, // ########## + 0x1B, 0xE0, 0x00, // ## ##### + 0x18, 0x00, 0x00, // ## + 0x18, 0x00, 0x00, // ## + 0x18, 0x00, 0x00, // ## + 0x7F, 0x00, 0x00, // ####### + 0x7F, 0x00, 0x00, // ####### + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @5832 'q' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x07, 0xDE, 0x00, // ##### #### + 0x1F, 0xFE, 0x00, // ############ + 0x18, 0x38, 0x00, // ## ### + 0x30, 0x18, 0x00, // ## ## + 0x30, 0x18, 0x00, // ## ## + 0x30, 0x18, 0x00, // ## ## + 0x30, 0x18, 0x00, // ## ## + 0x30, 0x18, 0x00, // ## ## + 0x18, 0x38, 0x00, // ## ### + 0x1F, 0xF8, 0x00, // ########## + 0x07, 0xD8, 0x00, // ##### ## + 0x00, 0x18, 0x00, // ## + 0x00, 0x18, 0x00, // ## + 0x00, 0x18, 0x00, // ## + 0x00, 0xFE, 0x00, // ####### + 0x00, 0xFE, 0x00, // ####### + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @5904 'r' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x3E, 0x78, 0x00, // ##### #### + 0x3E, 0xFC, 0x00, // ##### ###### + 0x07, 0xCC, 0x00, // ##### ## + 0x07, 0x00, 0x00, // ### + 0x06, 0x00, 0x00, // ## + 0x06, 0x00, 0x00, // ## + 0x06, 0x00, 0x00, // ## + 0x06, 0x00, 0x00, // ## + 0x06, 0x00, 0x00, // ## + 0x3F, 0xF0, 0x00, // ########## + 0x3F, 0xF0, 0x00, // ########## + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @5976 's' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x07, 0xF8, 0x00, // ######## + 0x0F, 0xF8, 0x00, // ######### + 0x18, 0x18, 0x00, // ## ## + 0x18, 0x18, 0x00, // ## ## + 0x1F, 0x80, 0x00, // ###### + 0x0F, 0xF0, 0x00, // ######## + 0x00, 0xF8, 0x00, // ##### + 0x18, 0x18, 0x00, // ## ## + 0x18, 0x38, 0x00, // ## ### + 0x1F, 0xF0, 0x00, // ######### + 0x1F, 0xE0, 0x00, // ######## + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @6048 't' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x0C, 0x00, 0x00, // ## + 0x0C, 0x00, 0x00, // ## + 0x0C, 0x00, 0x00, // ## + 0x0C, 0x00, 0x00, // ## + 0x3F, 0xF0, 0x00, // ########## + 0x3F, 0xF0, 0x00, // ########## + 0x0C, 0x00, 0x00, // ## + 0x0C, 0x00, 0x00, // ## + 0x0C, 0x00, 0x00, // ## + 0x0C, 0x00, 0x00, // ## + 0x0C, 0x00, 0x00, // ## + 0x0C, 0x00, 0x00, // ## + 0x0C, 0x1C, 0x00, // ## ### + 0x07, 0xFC, 0x00, // ######### + 0x03, 0xF0, 0x00, // ###### + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @6120 'u' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x78, 0x78, 0x00, // #### #### + 0x78, 0x78, 0x00, // #### #### + 0x18, 0x18, 0x00, // ## ## + 0x18, 0x18, 0x00, // ## ## + 0x18, 0x18, 0x00, // ## ## + 0x18, 0x18, 0x00, // ## ## + 0x18, 0x18, 0x00, // ## ## + 0x18, 0x18, 0x00, // ## ## + 0x18, 0x38, 0x00, // ## ### + 0x0F, 0xFE, 0x00, // ########### + 0x07, 0xDE, 0x00, // ##### #### + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @6192 'v' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x7C, 0x3E, 0x00, // ##### ##### + 0x7C, 0x3E, 0x00, // ##### ##### + 0x18, 0x18, 0x00, // ## ## + 0x18, 0x18, 0x00, // ## ## + 0x0C, 0x30, 0x00, // ## ## + 0x0C, 0x30, 0x00, // ## ## + 0x06, 0x60, 0x00, // ## ## + 0x06, 0x60, 0x00, // ## ## + 0x07, 0xE0, 0x00, // ###### + 0x03, 0xC0, 0x00, // #### + 0x03, 0xC0, 0x00, // #### + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @6264 'w' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x78, 0x3C, 0x00, // #### #### + 0x78, 0x3C, 0x00, // #### #### + 0x31, 0x18, 0x00, // ## # ## + 0x33, 0x98, 0x00, // ## ### ## + 0x33, 0x98, 0x00, // ## ### ## + 0x1A, 0xB0, 0x00, // ## # # ## + 0x1E, 0xF0, 0x00, // #### #### + 0x1E, 0xF0, 0x00, // #### #### + 0x1C, 0x60, 0x00, // ### ## + 0x0C, 0x60, 0x00, // ## ## + 0x0C, 0x60, 0x00, // ## ## + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @6336 'x' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x3E, 0x7C, 0x00, // ##### ##### + 0x3E, 0x7C, 0x00, // ##### ##### + 0x0C, 0x30, 0x00, // ## ## + 0x06, 0x60, 0x00, // ## ## + 0x03, 0xC0, 0x00, // #### + 0x01, 0x80, 0x00, // ## + 0x03, 0xC0, 0x00, // #### + 0x06, 0x60, 0x00, // ## ## + 0x0C, 0x30, 0x00, // ## ## + 0x3E, 0x7C, 0x00, // ##### ##### + 0x3E, 0x7C, 0x00, // ##### ##### + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @6408 'y' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x7E, 0x1F, 0x00, // ###### ##### + 0x7E, 0x1F, 0x00, // ###### ##### + 0x18, 0x0C, 0x00, // ## ## + 0x0C, 0x18, 0x00, // ## ## + 0x0C, 0x18, 0x00, // ## ## + 0x06, 0x30, 0x00, // ## ## + 0x06, 0x30, 0x00, // ## ## + 0x03, 0x60, 0x00, // ## ## + 0x03, 0xE0, 0x00, // ##### + 0x01, 0xC0, 0x00, // ### + 0x00, 0xC0, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x03, 0x00, 0x00, // ## + 0x3F, 0xC0, 0x00, // ######## + 0x3F, 0xC0, 0x00, // ######## + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @6480 'z' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x1F, 0xF8, 0x00, // ########## + 0x1F, 0xF8, 0x00, // ########## + 0x18, 0x30, 0x00, // ## ## + 0x18, 0x60, 0x00, // ## ## + 0x00, 0xC0, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x03, 0x00, 0x00, // ## + 0x06, 0x18, 0x00, // ## ## + 0x0C, 0x18, 0x00, // ## ## + 0x1F, 0xF8, 0x00, // ########## + 0x1F, 0xF8, 0x00, // ########## + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @6552 '{' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0xE0, 0x00, // ### + 0x01, 0xE0, 0x00, // #### + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x03, 0x80, 0x00, // ### + 0x07, 0x00, 0x00, // ### + 0x03, 0x80, 0x00, // ### + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0xE0, 0x00, // #### + 0x00, 0xE0, 0x00, // ### + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @6624 '|' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @6696 '}' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x07, 0x00, 0x00, // ### + 0x07, 0x80, 0x00, // #### + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0xC0, 0x00, // ### + 0x00, 0xE0, 0x00, // ### + 0x01, 0xC0, 0x00, // ### + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x07, 0x80, 0x00, // #### + 0x07, 0x00, 0x00, // ### + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @6768 '~' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x0E, 0x00, 0x00, // ### + 0x1F, 0x18, 0x00, // ##### ## + 0x3B, 0xB8, 0x00, // ### ### ### + 0x31, 0xF0, 0x00, // ## ##### + 0x00, 0xE0, 0x00, // ### + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // +}; + +sFONT Font24 = { + Font24_Table, + 17, /* Width */ + 24, /* Height */ +}; + +/** + * @} + */ + + +/** @defgroup FONTS_Private_Function_Prototypes + * @{ + */ +/** + * @} + */ + + +/** @defgroup FONTS_Private_Functions + * @{ + */ + +/** + * @} + */ + +/** + * @} + */ + +/** + * @} + */ + +/** + * @} + */ + +/** + * @} + */ +/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Utilities/Fonts/font8.c Tue May 16 10:50:26 2017 +0200 @@ -0,0 +1,1084 @@ +/** + ****************************************************************************** + * @file Font8.c + * @author MCD Application Team + * @version V1.0.0 + * @date 18-February-2014 + * @brief This file provides text Font8 for STM32xx-EVAL's LCD driver. + ****************************************************************************** + * @attention + * + * <h2><center>© COPYRIGHT(c) 2014 STMicroelectronics</center></h2> + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * 3. Neither the name of STMicroelectronics nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + ****************************************************************************** + */ + +/* Includes ------------------------------------------------------------------*/ +#include "fonts.h" + +/** @addtogroup Utilities + * @{ + */ + +/** @addtogroup STM32_EVAL + * @{ + */ + +/** @addtogroup Common + * @{ + */ + +/** @addtogroup FONTS + * @brief This file provides text Font8 for STM32xx-EVAL's LCD driver. + * @{ + */ + +/** @defgroup FONTS_Private_Types + * @{ + */ +/** + * @} + */ + + +/** @defgroup FONTS_Private_Defines + * @{ + */ +/** + * @} + */ + + +/** @defgroup FONTS_Private_Macros + * @{ + */ +/** + * @} + */ + + +/** @defgroup FONTS_Private_Variables + * @{ + */ +// +// Font data for Courier New 12pt +// + +const uint8_t Font8_Table[] = +{ + // @0 ' ' (5 pixels wide) + 0x00, // + 0x00, // + 0x00, // + 0x00, // + 0x00, // + 0x00, // + 0x00, // + 0x00, // + + // @8 '!' (5 pixels wide) + 0x20, // # + 0x20, // # + 0x20, // # + 0x20, // # + 0x00, // + 0x20, // # + 0x00, // + 0x00, // + + // @16 '"' (5 pixels wide) + 0x50, // # # + 0x50, // # # + 0x00, // + 0x00, // + 0x00, // + 0x00, // + 0x00, // + 0x00, // + + // @24 '#' (5 pixels wide) + 0x28, // # # + 0x50, // # # + 0xF8, // ##### + 0x50, // # # + 0xF8, // ##### + 0x50, // # # + 0xA0, // # # + 0x00, // + + // @32 '$' (5 pixels wide) + 0x20, // # + 0x30, // ## + 0x60, // ## + 0x30, // ## + 0x10, // # + 0x60, // ## + 0x20, // # + 0x00, // + + // @40 '%' (5 pixels wide) + 0x20, // # + 0x20, // # + 0x18, // ## + 0x60, // ## + 0x10, // # + 0x10, // # + 0x00, // + 0x00, // + + // @48 '&' (5 pixels wide) + 0x00, // + 0x38, // ### + 0x20, // # + 0x60, // ## + 0x50, // # # + 0x78, // #### + 0x00, // + 0x00, // + + // @56 ''' (5 pixels wide) + 0x20, // # + 0x20, // # + 0x20, // # + 0x00, // + 0x00, // + 0x00, // + 0x00, // + 0x00, // + + // @64 '(' (5 pixels wide) + 0x10, // # + 0x20, // # + 0x20, // # + 0x20, // # + 0x20, // # + 0x20, // # + 0x10, // # + 0x00, // + + // @72 ')' (5 pixels wide) + 0x40, // # + 0x20, // # + 0x20, // # + 0x20, // # + 0x20, // # + 0x20, // # + 0x40, // # + 0x00, // + + // @80 '*' (5 pixels wide) + 0x20, // # + 0x70, // ### + 0x20, // # + 0x50, // # # + 0x00, // + 0x00, // + 0x00, // + 0x00, // + + // @88 '+' (5 pixels wide) + 0x00, // + 0x20, // # + 0x20, // # + 0xF8, // ##### + 0x20, // # + 0x20, // # + 0x00, // + 0x00, // + + // @96 ',' (5 pixels wide) + 0x00, // + 0x00, // + 0x00, // + 0x00, // + 0x10, // # + 0x20, // # + 0x20, // # + 0x00, // + + // @104 '-' (5 pixels wide) + 0x00, // + 0x00, // + 0x00, // + 0x70, // ### + 0x00, // + 0x00, // + 0x00, // + 0x00, // + + // @112 '.' (5 pixels wide) + 0x00, // + 0x00, // + 0x00, // + 0x00, // + 0x00, // + 0x20, // # + 0x00, // + 0x00, // + + // @120 '/' (5 pixels wide) + 0x10, // # + 0x20, // # + 0x20, // # + 0x20, // # + 0x40, // # + 0x40, // # + 0x80, // # + 0x00, // + + // @128 '0' (5 pixels wide) + 0x20, // # + 0x50, // # # + 0x50, // # # + 0x50, // # # + 0x50, // # # + 0x20, // # + 0x00, // + 0x00, // + + // @136 '1' (5 pixels wide) + 0x60, // ## + 0x20, // # + 0x20, // # + 0x20, // # + 0x20, // # + 0xF8, // ##### + 0x00, // + 0x00, // + + // @144 '2' (5 pixels wide) + 0x20, // # + 0x50, // # # + 0x20, // # + 0x20, // # + 0x40, // # + 0x70, // ### + 0x00, // + 0x00, // + + // @152 '3' (5 pixels wide) + 0x20, // # + 0x50, // # # + 0x10, // # + 0x20, // # + 0x10, // # + 0x60, // ## + 0x00, // + 0x00, // + + // @160 '4' (5 pixels wide) + 0x10, // # + 0x30, // ## + 0x50, // # # + 0x78, // #### + 0x10, // # + 0x38, // ### + 0x00, // + 0x00, // + + // @168 '5' (5 pixels wide) + 0x70, // ### + 0x40, // # + 0x60, // ## + 0x10, // # + 0x50, // # # + 0x20, // # + 0x00, // + 0x00, // + + // @176 '6' (5 pixels wide) + 0x30, // ## + 0x40, // # + 0x60, // ## + 0x50, // # # + 0x50, // # # + 0x60, // ## + 0x00, // + 0x00, // + + // @184 '7' (5 pixels wide) + 0x70, // ### + 0x50, // # # + 0x10, // # + 0x20, // # + 0x20, // # + 0x20, // # + 0x00, // + 0x00, // + + // @192 '8' (5 pixels wide) + 0x20, // # + 0x50, // # # + 0x20, // # + 0x50, // # # + 0x50, // # # + 0x20, // # + 0x00, // + 0x00, // + + // @200 '9' (5 pixels wide) + 0x30, // ## + 0x50, // # # + 0x50, // # # + 0x30, // ## + 0x10, // # + 0x60, // ## + 0x00, // + 0x00, // + + // @208 ':' (5 pixels wide) + 0x00, // + 0x00, // + 0x20, // # + 0x00, // + 0x00, // + 0x20, // # + 0x00, // + 0x00, // + + // @216 ';' (5 pixels wide) + 0x00, // + 0x00, // + 0x10, // # + 0x00, // + 0x10, // # + 0x20, // # + 0x00, // + 0x00, // + + // @224 '<' (5 pixels wide) + 0x00, // + 0x10, // # + 0x20, // # + 0xC0, // ## + 0x20, // # + 0x10, // # + 0x00, // + 0x00, // + + // @232 '=' (5 pixels wide) + 0x00, // + 0x70, // ### + 0x00, // + 0x70, // ### + 0x00, // + 0x00, // + 0x00, // + 0x00, // + + // @240 '>' (5 pixels wide) + 0x00, // + 0x40, // # + 0x20, // # + 0x18, // ## + 0x20, // # + 0x40, // # + 0x00, // + 0x00, // + + // @248 '?' (5 pixels wide) + 0x20, // # + 0x50, // # # + 0x10, // # + 0x20, // # + 0x00, // + 0x20, // # + 0x00, // + 0x00, // + + // @256 '@' (5 pixels wide) + 0x30, // ## + 0x48, // # # + 0x48, // # # + 0x58, // # ## + 0x48, // # # + 0x40, // # + 0x38, // ### + 0x00, // + + // @264 'A' (5 pixels wide) + 0x60, // ## + 0x20, // # + 0x50, // # # + 0x70, // ### + 0x88, // # # + 0xD8, // ## ## + 0x00, // + 0x00, // + + // @272 'B' (5 pixels wide) + 0xF0, // #### + 0x48, // # # + 0x70, // ### + 0x48, // # # + 0x48, // # # + 0xF0, // #### + 0x00, // + 0x00, // + + // @280 'C' (5 pixels wide) + 0x70, // ### + 0x50, // # # + 0x40, // # + 0x40, // # + 0x40, // # + 0x30, // ## + 0x00, // + 0x00, // + + // @288 'D' (5 pixels wide) + 0xF0, // #### + 0x48, // # # + 0x48, // # # + 0x48, // # # + 0x48, // # # + 0xF0, // #### + 0x00, // + 0x00, // + + // @296 'E' (5 pixels wide) + 0xF8, // ##### + 0x48, // # # + 0x60, // ## + 0x40, // # + 0x48, // # # + 0xF8, // ##### + 0x00, // + 0x00, // + + // @304 'F' (5 pixels wide) + 0xF8, // ##### + 0x48, // # # + 0x60, // ## + 0x40, // # + 0x40, // # + 0xE0, // ### + 0x00, // + 0x00, // + + // @312 'G' (5 pixels wide) + 0x70, // ### + 0x40, // # + 0x40, // # + 0x58, // # ## + 0x50, // # # + 0x30, // ## + 0x00, // + 0x00, // + + // @320 'H' (5 pixels wide) + 0xE8, // ### # + 0x48, // # # + 0x78, // #### + 0x48, // # # + 0x48, // # # + 0xE8, // ### # + 0x00, // + 0x00, // + + // @328 'I' (5 pixels wide) + 0x70, // ### + 0x20, // # + 0x20, // # + 0x20, // # + 0x20, // # + 0x70, // ### + 0x00, // + 0x00, // + + // @336 'J' (5 pixels wide) + 0x38, // ### + 0x10, // # + 0x10, // # + 0x50, // # # + 0x50, // # # + 0x20, // # + 0x00, // + 0x00, // + + // @344 'K' (5 pixels wide) + 0xD8, // ## ## + 0x50, // # # + 0x60, // ## + 0x70, // ### + 0x50, // # # + 0xD8, // ## ## + 0x00, // + 0x00, // + + // @352 'L' (5 pixels wide) + 0xE0, // ### + 0x40, // # + 0x40, // # + 0x40, // # + 0x48, // # # + 0xF8, // ##### + 0x00, // + 0x00, // + + // @360 'M' (5 pixels wide) + 0xD8, // ## ## + 0xD8, // ## ## + 0xD8, // ## ## + 0xA8, // # # # + 0x88, // # # + 0xD8, // ## ## + 0x00, // + 0x00, // + + // @368 'N' (5 pixels wide) + 0xD8, // ## ## + 0x68, // ## # + 0x68, // ## # + 0x58, // # ## + 0x58, // # ## + 0xE8, // ### # + 0x00, // + 0x00, // + + // @376 'O' (5 pixels wide) + 0x30, // ## + 0x48, // # # + 0x48, // # # + 0x48, // # # + 0x48, // # # + 0x30, // ## + 0x00, // + 0x00, // + + // @384 'P' (5 pixels wide) + 0xF0, // #### + 0x48, // # # + 0x48, // # # + 0x70, // ### + 0x40, // # + 0xE0, // ### + 0x00, // + 0x00, // + + // @392 'Q' (5 pixels wide) + 0x30, // ## + 0x48, // # # + 0x48, // # # + 0x48, // # # + 0x48, // # # + 0x30, // ## + 0x18, // ## + 0x00, // + + // @400 'R' (5 pixels wide) + 0xF0, // #### + 0x48, // # # + 0x48, // # # + 0x70, // ### + 0x48, // # # + 0xE8, // ### # + 0x00, // + 0x00, // + + // @408 'S' (5 pixels wide) + 0x70, // ### + 0x50, // # # + 0x20, // # + 0x10, // # + 0x50, // # # + 0x70, // ### + 0x00, // + 0x00, // + + // @416 'T' (5 pixels wide) + 0xF8, // ##### + 0xA8, // # # # + 0x20, // # + 0x20, // # + 0x20, // # + 0x70, // ### + 0x00, // + 0x00, // + + // @424 'U' (5 pixels wide) + 0xD8, // ## ## + 0x48, // # # + 0x48, // # # + 0x48, // # # + 0x48, // # # + 0x30, // ## + 0x00, // + 0x00, // + + // @432 'V' (5 pixels wide) + 0xD8, // ## ## + 0x88, // # # + 0x48, // # # + 0x50, // # # + 0x50, // # # + 0x30, // ## + 0x00, // + 0x00, // + + // @440 'W' (5 pixels wide) + 0xD8, // ## ## + 0x88, // # # + 0xA8, // # # # + 0xA8, // # # # + 0xA8, // # # # + 0x50, // # # + 0x00, // + 0x00, // + + // @448 'X' (5 pixels wide) + 0xD8, // ## ## + 0x50, // # # + 0x20, // # + 0x20, // # + 0x50, // # # + 0xD8, // ## ## + 0x00, // + 0x00, // + + // @456 'Y' (5 pixels wide) + 0xD8, // ## ## + 0x88, // # # + 0x50, // # # + 0x20, // # + 0x20, // # + 0x70, // ### + 0x00, // + 0x00, // + + // @464 'Z' (5 pixels wide) + 0x78, // #### + 0x48, // # # + 0x10, // # + 0x20, // # + 0x48, // # # + 0x78, // #### + 0x00, // + 0x00, // + + // @472 '[' (5 pixels wide) + 0x30, // ## + 0x20, // # + 0x20, // # + 0x20, // # + 0x20, // # + 0x20, // # + 0x30, // ## + 0x00, // + + // @480 '\' (5 pixels wide) + 0x80, // # + 0x40, // # + 0x40, // # + 0x20, // # + 0x20, // # + 0x20, // # + 0x10, // # + 0x00, // + + // @488 ']' (5 pixels wide) + 0x60, // ## + 0x20, // # + 0x20, // # + 0x20, // # + 0x20, // # + 0x20, // # + 0x60, // ## + 0x00, // + + // @496 '^' (5 pixels wide) + 0x20, // # + 0x20, // # + 0x50, // # # + 0x00, // + 0x00, // + 0x00, // + 0x00, // + 0x00, // + + // @504 '_' (5 pixels wide) + 0x00, // + 0x00, // + 0x00, // + 0x00, // + 0x00, // + 0x00, // + 0x00, // + 0xF8, // ##### + + // @512 '`' (5 pixels wide) + 0x20, // # + 0x10, // # + 0x00, // + 0x00, // + 0x00, // + 0x00, // + 0x00, // + 0x00, // + + // @520 'a' (5 pixels wide) + 0x00, // + 0x00, // + 0x30, // ## + 0x10, // # + 0x70, // ### + 0x78, // #### + 0x00, // + 0x00, // + + // @528 'b' (5 pixels wide) + 0xC0, // ## + 0x40, // # + 0x70, // ### + 0x48, // # # + 0x48, // # # + 0xF0, // #### + 0x00, // + 0x00, // + + // @536 'c' (5 pixels wide) + 0x00, // + 0x00, // + 0x70, // ### + 0x40, // # + 0x40, // # + 0x70, // ### + 0x00, // + 0x00, // + + // @544 'd' (5 pixels wide) + 0x18, // ## + 0x08, // # + 0x38, // ### + 0x48, // # # + 0x48, // # # + 0x38, // ### + 0x00, // + 0x00, // + + // @552 'e' (5 pixels wide) + 0x00, // + 0x00, // + 0x70, // ### + 0x70, // ### + 0x40, // # + 0x30, // ## + 0x00, // + 0x00, // + + // @560 'f' (5 pixels wide) + 0x10, // # + 0x20, // # + 0x70, // ### + 0x20, // # + 0x20, // # + 0x70, // ### + 0x00, // + 0x00, // + + // @568 'g' (5 pixels wide) + 0x00, // + 0x00, // + 0x38, // ### + 0x48, // # # + 0x48, // # # + 0x38, // ### + 0x08, // # + 0x30, // ## + + // @576 'h' (5 pixels wide) + 0xC0, // ## + 0x40, // # + 0x70, // ### + 0x48, // # # + 0x48, // # # + 0xE8, // ### # + 0x00, // + 0x00, // + + // @584 'i' (5 pixels wide) + 0x20, // # + 0x00, // + 0x60, // ## + 0x20, // # + 0x20, // # + 0x70, // ### + 0x00, // + 0x00, // + + // @592 'j' (5 pixels wide) + 0x20, // # + 0x00, // + 0x70, // ### + 0x10, // # + 0x10, // # + 0x10, // # + 0x10, // # + 0x70, // ### + + // @600 'k' (5 pixels wide) + 0xC0, // ## + 0x40, // # + 0x58, // # ## + 0x70, // ### + 0x50, // # # + 0xD8, // ## ## + 0x00, // + 0x00, // + + // @608 'l' (5 pixels wide) + 0x60, // ## + 0x20, // # + 0x20, // # + 0x20, // # + 0x20, // # + 0x70, // ### + 0x00, // + 0x00, // + + // @616 'm' (5 pixels wide) + 0x00, // + 0x00, // + 0xD0, // ## # + 0xA8, // # # # + 0xA8, // # # # + 0xA8, // # # # + 0x00, // + 0x00, // + + // @624 'n' (5 pixels wide) + 0x00, // + 0x00, // + 0xF0, // #### + 0x48, // # # + 0x48, // # # + 0xC8, // ## # + 0x00, // + 0x00, // + + // @632 'o' (5 pixels wide) + 0x00, // + 0x00, // + 0x30, // ## + 0x48, // # # + 0x48, // # # + 0x30, // ## + 0x00, // + 0x00, // + + // @640 'p' (5 pixels wide) + 0x00, // + 0x00, // + 0xF0, // #### + 0x48, // # # + 0x48, // # # + 0x70, // ### + 0x40, // # + 0xE0, // ### + + // @648 'q' (5 pixels wide) + 0x00, // + 0x00, // + 0x38, // ### + 0x48, // # # + 0x48, // # # + 0x38, // ### + 0x08, // # + 0x18, // ## + + // @656 'r' (5 pixels wide) + 0x00, // + 0x00, // + 0x78, // #### + 0x20, // # + 0x20, // # + 0x70, // ### + 0x00, // + 0x00, // + + // @664 's' (5 pixels wide) + 0x00, // + 0x00, // + 0x30, // ## + 0x20, // # + 0x10, // # + 0x60, // ## + 0x00, // + 0x00, // + + // @672 't' (5 pixels wide) + 0x00, // + 0x40, // # + 0xF0, // #### + 0x40, // # + 0x48, // # # + 0x30, // ## + 0x00, // + 0x00, // + + // @680 'u' (5 pixels wide) + 0x00, // + 0x00, // + 0xD8, // ## ## + 0x48, // # # + 0x48, // # # + 0x38, // ### + 0x00, // + 0x00, // + + // @688 'v' (5 pixels wide) + 0x00, // + 0x00, // + 0xC8, // ## # + 0x48, // # # + 0x30, // ## + 0x30, // ## + 0x00, // + 0x00, // + + // @696 'w' (5 pixels wide) + 0x00, // + 0x00, // + 0xD8, // ## ## + 0xA8, // # # # + 0xA8, // # # # + 0x50, // # # + 0x00, // + 0x00, // + + // @704 'x' (5 pixels wide) + 0x00, // + 0x00, // + 0x48, // # # + 0x30, // ## + 0x30, // ## + 0x48, // # # + 0x00, // + 0x00, // + + // @712 'y' (5 pixels wide) + 0x00, // + 0x00, // + 0xD8, // ## ## + 0x50, // # # + 0x50, // # # + 0x20, // # + 0x20, // # + 0x60, // ## + + // @720 'z' (5 pixels wide) + 0x00, // + 0x00, // + 0x78, // #### + 0x50, // # # + 0x28, // # # + 0x78, // #### + 0x00, // + 0x00, // + + // @728 '{' (5 pixels wide) + 0x10, // # + 0x20, // # + 0x20, // # + 0x60, // ## + 0x20, // # + 0x20, // # + 0x10, // # + 0x00, // + + // @736 '|' (5 pixels wide) + 0x20, // # + 0x20, // # + 0x20, // # + 0x20, // # + 0x20, // # + 0x20, // # + 0x20, // # + 0x00, // + + // @744 '}' (5 pixels wide) + 0x40, // # + 0x20, // # + 0x20, // # + 0x30, // ## + 0x20, // # + 0x20, // # + 0x40, // # + 0x00, // + + // @752 '~' (5 pixels wide) + 0x00, // + 0x00, // + 0x00, // + 0x28, // # # + 0x50, // # # + 0x00, // + 0x00, // + 0x00, // +}; + +sFONT Font8 = { + Font8_Table, + 5, /* Width */ + 8, /* Height */ +}; + +/** + * @} + */ + + +/** @defgroup FONTS_Private_Function_Prototypes + * @{ + */ +/** + * @} + */ + + +/** @defgroup FONTS_Private_Functions + * @{ + */ + +/** + * @} + */ + +/** + * @} + */ + +/** + * @} + */ + +/** + * @} + */ + +/** + * @} + */ +/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Utilities/Fonts/fonts.h Tue May 16 10:50:26 2017 +0200 @@ -0,0 +1,134 @@ +/** + ****************************************************************************** + * @file fonts.h + * @author MCD Application Team + * @version V1.0.0 + * @date 18-February-2014 + * @brief Header for fonts.c file + ****************************************************************************** + * @attention + * + * <h2><center>© COPYRIGHT(c) 2014 STMicroelectronics</center></h2> + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * 3. Neither the name of STMicroelectronics nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + ****************************************************************************** + */ + +/* Define to prevent recursive inclusion -------------------------------------*/ +#ifndef __FONTS_H +#define __FONTS_H + +#ifdef __cplusplus + extern "C" { +#endif + +/* Includes ------------------------------------------------------------------*/ +#include <stdint.h> + +/** @addtogroup Utilities + * @{ + */ + +/** @addtogroup STM32_EVAL + * @{ + */ + +/** @addtogroup Common + * @{ + */ + +/** @addtogroup FONTS + * @{ + */ + +/** @defgroup FONTS_Exported_Types + * @{ + */ +typedef struct _tFont +{ + const uint8_t *table; + uint16_t Width; + uint16_t Height; + +} sFONT; + +extern sFONT Font24; +extern sFONT Font20; +extern sFONT Font16; +extern sFONT Font12; +extern sFONT Font8; +/** + * @} + */ + +/** @defgroup FONTS_Exported_Constants + * @{ + */ +#define LINE(x) ((x) * (((sFONT *)BSP_LCD_GetFont())->Height)) + +/** + * @} + */ + +/** @defgroup FONTS_Exported_Macros + * @{ + */ +/** + * @} + */ + +/** @defgroup FONTS_Exported_Functions + * @{ + */ +/** + * @} + */ + +#ifdef __cplusplus +} +#endif + +#endif /* __FONTS_H */ + +/** + * @} + */ + +/** + * @} + */ + +/** + * @} + */ + +/** + * @} + */ + +/** + * @} + */ + +/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
--- a/stm32469i_discovery/stm32469i_discovery.c Mon May 30 11:09:05 2016 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,948 +0,0 @@ -/** - ****************************************************************************** - * @file stm32469i_discovery.c - * @author MCD Application Team - * @version V1.0.1 - * @date 29-September-2015 - * @brief This file provides a set of firmware functions to manage LEDs, - * push-buttons, external SDRAM, external QSPI Flash, RF EEPROM, - * available on STM32469I-Discovery - * board (MB1189) RevA/B from STMicroelectronics. - ****************************************************************************** - * @attention - * - * <h2><center>© COPYRIGHT(c) 2015 STMicroelectronics</center></h2> - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. Neither the name of STMicroelectronics nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - ****************************************************************************** - */ - -/* Includes ------------------------------------------------------------------*/ -#include "stm32469i_discovery.h" - -/** @addtogroup BSP - * @{ - */ - -/** @addtogroup STM32469I_Discovery - * @{ - */ - -/** @defgroup STM32469I_Discovery_LOW_LEVEL STM32469I-Discovery LOW LEVEL - * @{ - */ - -/** @defgroup STM32469I_Discovery_LOW_LEVEL_Private_TypesDefinitions STM32469I Discovery Low Level Private Typedef - * @{ - */ -/** - * @} - */ - -/** @defgroup STM32469I_Discovery_LOW_LEVEL_Private_Defines LOW_LEVEL Private Defines - * @{ - */ -/** - * @brief STM32469I Discovery BSP Driver version number V1.0.1 - */ -#define __STM32469I_DISCOVERY_BSP_VERSION_MAIN (0x01) /*!< [31:24] main version */ -#define __STM32469I_DISCOVERY_BSP_VERSION_SUB1 (0x00) /*!< [23:16] sub1 version */ -#define __STM32469I_DISCOVERY_BSP_VERSION_SUB2 (0x01) /*!< [15:8] sub2 version */ -#define __STM32469I_DISCOVERY_BSP_VERSION_RC (0x00) /*!< [7:0] release candidate */ -#define __STM32469I_DISCOVERY_BSP_VERSION ((__STM32469I_DISCOVERY_BSP_VERSION_MAIN << 24)\ - |(__STM32469I_DISCOVERY_BSP_VERSION_SUB1 << 16)\ - |(__STM32469I_DISCOVERY_BSP_VERSION_SUB2 << 8 )\ - |(__STM32469I_DISCOVERY_BSP_VERSION_RC)) -/** - * @} - */ - -/** @defgroup STM32469I_Discovery_LOW_LEVEL_Private_Macros LOW_LEVEL Private Macros - * @{ - */ -/** - * @} - */ - -/** @defgroup STM32469I_Discovery_LOW_LEVEL_Private_Variables LOW_LEVEL Private Variables - * @{ - */ -uint32_t GPIO_PIN[LEDn] = {LED1_PIN, - LED2_PIN, - LED3_PIN, - LED4_PIN}; - -GPIO_TypeDef* GPIO_PORT[LEDn] = {LED1_GPIO_PORT, - LED2_GPIO_PORT, - LED3_GPIO_PORT, - LED4_GPIO_PORT}; - -GPIO_TypeDef* BUTTON_PORT[BUTTONn] = {WAKEUP_BUTTON_GPIO_PORT }; - -const uint16_t BUTTON_PIN[BUTTONn] = {WAKEUP_BUTTON_PIN }; - -const uint16_t BUTTON_IRQn[BUTTONn] = {WAKEUP_BUTTON_EXTI_IRQn }; - - -static I2C_HandleTypeDef heval_I2c1; -static I2C_HandleTypeDef heval_I2c2; - -/** - * @} - */ - -/** @defgroup STM32469I_Discovery_LOW_LEVEL_Private_FunctionPrototypes LOW_LEVEL Private FunctionPrototypes - * @{ - */ -static void I2C1_MspInit(void); -static void I2C2_MspInit(void); -static void I2C1_Init(void); -static void I2C2_Init(void); - -#if defined(USE_IOEXPANDER) -static void I2C1_Write(uint8_t Addr, uint8_t Reg, uint8_t Value); -static uint8_t I2C1_Read(uint8_t Addr, uint8_t Reg); -#endif /* USE_IOEXPANDER */ -static HAL_StatusTypeDef I2C1_ReadMultiple(uint8_t Addr, uint16_t Reg, uint16_t MemAddSize, uint8_t *Buffer, uint16_t Length); -static HAL_StatusTypeDef I2C2_ReadMultiple(uint8_t Addr, uint16_t Reg, uint16_t MemAddSize, uint8_t *Buffer, uint16_t Length); -static HAL_StatusTypeDef I2C1_WriteMultiple(uint8_t Addr, uint16_t Reg, uint16_t MemAddSize, uint8_t *Buffer, uint16_t Length); -static HAL_StatusTypeDef I2C2_WriteMultiple(uint8_t Addr, uint16_t Reg, uint16_t MemAddSize, uint8_t *Buffer, uint16_t Length); -static HAL_StatusTypeDef I2C1_IsDeviceReady(uint16_t DevAddress, uint32_t Trials); -static void I2C1_Error(uint8_t Addr); -static void I2C2_Error(uint8_t Addr); - -/* AUDIO IO functions */ -void AUDIO_IO_Init(void); -void AUDIO_IO_DeInit(void); -void AUDIO_IO_Write(uint8_t Addr, uint8_t Reg, uint8_t Value); -uint8_t AUDIO_IO_Read(uint8_t Addr, uint8_t Reg); -void AUDIO_IO_Delay(uint32_t Delay); - - -/* I2C EEPROM IO function */ -void EEPROM_IO_Init(void); -HAL_StatusTypeDef EEPROM_IO_WriteData(uint16_t DevAddress, uint16_t MemAddress, uint8_t* pBuffer, uint32_t BufferSize); -HAL_StatusTypeDef EEPROM_IO_ReadData(uint16_t DevAddress, uint16_t MemAddress, uint8_t* pBuffer, uint32_t BufferSize); -HAL_StatusTypeDef EEPROM_IO_IsDeviceReady(uint16_t DevAddress, uint32_t Trials); - -/* TouchScreen (TS) IO functions */ -void TS_IO_Init(void); -void TS_IO_Write(uint8_t Addr, uint8_t Reg, uint8_t Value); -uint8_t TS_IO_Read(uint8_t Addr, uint8_t Reg); -uint16_t TS_IO_ReadMultiple(uint8_t Addr, uint8_t Reg, uint8_t *Buffer, uint16_t Length); -void TS_IO_WriteMultiple(uint8_t Addr, uint8_t Reg, uint8_t *Buffer, uint16_t Length); -void TS_IO_Delay(uint32_t Delay); -void OTM8009A_IO_Delay(uint32_t Delay); -/** - * @} - */ - -/** @defgroup STM32469I_Discovery_BSP_Public_Functions BSP Public Functions - * @{ - */ - - /** - * @brief This method returns the STM32469I Discovery BSP Driver revision - * @retval version: 0xXYZR (8bits for each decimal, R for RC) - */ -uint32_t BSP_GetVersion(void) -{ - return __STM32469I_DISCOVERY_BSP_VERSION; -} - -/** - * @brief Configures LED GPIO. - * @param Led: LED to be configured. - * This parameter can be one of the following values: - * @arg LED1 - * @arg LED2 - * @arg LED3 - * @arg LED4 - * @retval None - */ -void BSP_LED_Init(Led_TypeDef Led) -{ - GPIO_InitTypeDef gpio_init_structure; - - if (Led <= DISCO_LED4) - { - /* Configure the GPIO_LED pin */ - gpio_init_structure.Pin = GPIO_PIN[Led]; - gpio_init_structure.Mode = GPIO_MODE_OUTPUT_PP; - gpio_init_structure.Pull = GPIO_PULLUP; - gpio_init_structure.Speed = GPIO_SPEED_HIGH; - - switch(Led) - { - case DISCO_LED1 : - LED1_GPIO_CLK_ENABLE(); - break; - case DISCO_LED2 : - LED2_GPIO_CLK_ENABLE(); - break; - case DISCO_LED3 : - LED3_GPIO_CLK_ENABLE(); - break; - case DISCO_LED4 : - LED4_GPIO_CLK_ENABLE(); - break; - default : - break; - - } /* end switch */ - - HAL_GPIO_Init(GPIO_PORT[Led], &gpio_init_structure); - - /* By default, turn off LED by setting a high level on corresponding GPIO */ - HAL_GPIO_WritePin(GPIO_PORT[Led], GPIO_PIN[Led], GPIO_PIN_SET); - - } /* of if (Led <= LED4) */ - -} - - -/** - * @brief DeInit LEDs. - * @param Led: LED to be configured. - * This parameter can be one of the following values: - * @arg LED1 - * @arg LED2 - * @arg LED3 - * @arg LED4 - * @note Led DeInit does not disable the GPIO clock nor disable the Mfx - * @retval None - */ -void BSP_LED_DeInit(Led_TypeDef Led) -{ - GPIO_InitTypeDef gpio_init_structure; - - if (Led <= DISCO_LED4) - { - /* DeInit the GPIO_LED pin */ - gpio_init_structure.Pin = GPIO_PIN[Led]; - - /* Turn off LED */ - HAL_GPIO_WritePin(GPIO_PORT[Led], GPIO_PIN[Led], GPIO_PIN_SET); - HAL_GPIO_DeInit(GPIO_PORT[Led], gpio_init_structure.Pin); - } - -} - -/** - * @brief Turns selected LED On. - * @param Led: LED to be set on - * This parameter can be one of the following values: - * @arg LED1 - * @arg LED2 - * @arg LED3 - * @arg LED4 - * @retval None - */ -void BSP_LED_On(Led_TypeDef Led) -{ - if (Led <= DISCO_LED4) - { - HAL_GPIO_WritePin(GPIO_PORT[Led], GPIO_PIN[Led], GPIO_PIN_RESET); - } - -} - -/** - * @brief Turns selected LED Off. - * @param Led: LED to be set off - * This parameter can be one of the following values: - * @arg LED1 - * @arg LED2 - * @arg LED3 - * @arg LED4 - * @retval None - */ -void BSP_LED_Off(Led_TypeDef Led) -{ - if (Led <= DISCO_LED4) - { - HAL_GPIO_WritePin(GPIO_PORT[Led], GPIO_PIN[Led], GPIO_PIN_SET); - } -} - -/** - * @brief Toggles the selected LED. - * @param Led: LED to be toggled - * This parameter can be one of the following values: - * @arg LED1 - * @arg LED2 - * @arg LED3 - * @arg LED4 - * @retval None - */ -void BSP_LED_Toggle(Led_TypeDef Led) -{ - if (Led <= DISCO_LED4) - { - HAL_GPIO_TogglePin(GPIO_PORT[Led], GPIO_PIN[Led]); - } -} - -/** - * @brief Configures button GPIO and EXTI Line. - * @param Button: Button to be configured - * This parameter can be one of the following values: - * @arg BUTTON_WAKEUP: Wakeup Push Button - * @arg BUTTON_USER: User Push Button - * @param Button_Mode: Button mode - * This parameter can be one of the following values: - * @arg BUTTON_MODE_GPIO: Button will be used as simple IO - * @arg BUTTON_MODE_EXTI: Button will be connected to EXTI line - * with interrupt generation capability - * @retval None - */ -void BSP_PB_Init(Button_TypeDef Button, ButtonMode_TypeDef Button_Mode) -{ - GPIO_InitTypeDef gpio_init_structure; - - /* Enable the BUTTON clock */ - BUTTON_GPIO_CLK_ENABLE(); - - if(Button_Mode == BUTTON_MODE_GPIO) - { - /* Configure Button pin as input */ - gpio_init_structure.Pin = BUTTON_PIN[Button]; - gpio_init_structure.Mode = GPIO_MODE_INPUT; - gpio_init_structure.Pull = GPIO_NOPULL; - gpio_init_structure.Speed = GPIO_SPEED_FAST; - HAL_GPIO_Init(BUTTON_PORT[Button], &gpio_init_structure); - } - - if(Button_Mode == BUTTON_MODE_EXTI) - { - /* Configure Button pin as input with External interrupt */ - gpio_init_structure.Pin = BUTTON_PIN[Button]; - gpio_init_structure.Pull = GPIO_NOPULL; - gpio_init_structure.Speed = GPIO_SPEED_FAST; - - gpio_init_structure.Mode = GPIO_MODE_IT_RISING; - - HAL_GPIO_Init(BUTTON_PORT[Button], &gpio_init_structure); - - /* Enable and set Button EXTI Interrupt to the lowest priority */ - HAL_NVIC_SetPriority((IRQn_Type)(BUTTON_IRQn[Button]), 0x0F, 0x00); - HAL_NVIC_EnableIRQ((IRQn_Type)(BUTTON_IRQn[Button])); - } -} - -/** - * @brief Push Button DeInit. - * @param Button: Button to be configured - * This parameter can be one of the following values: - * @arg BUTTON_WAKEUP: Wakeup Push Button - * @arg BUTTON_USER: User Push Button - * @note PB DeInit does not disable the GPIO clock - * @retval None - */ -void BSP_PB_DeInit(Button_TypeDef Button) -{ - GPIO_InitTypeDef gpio_init_structure; - - gpio_init_structure.Pin = BUTTON_PIN[Button]; - HAL_NVIC_DisableIRQ((IRQn_Type)(BUTTON_IRQn[Button])); - HAL_GPIO_DeInit(BUTTON_PORT[Button], gpio_init_structure.Pin); -} - - -/** - * @brief Returns the selected button state. - * @param Button: Button to be checked - * This parameter can be one of the following values: - * @arg BUTTON_WAKEUP: Wakeup Push Button - * @arg BUTTON_USER: User Push Button - * @retval The Button GPIO pin value - */ -uint32_t BSP_PB_GetState(Button_TypeDef Button) -{ - return HAL_GPIO_ReadPin(BUTTON_PORT[Button], BUTTON_PIN[Button]); -} - -/** - * @} - */ - -/** @defgroup STM32469I_Discovery_LOW_LEVEL_Private_Functions STM32469I_Discovery_LOW_LEVEL Private Functions - * @{ - */ - - -/******************************************************************************* - BUS OPERATIONS -*******************************************************************************/ - -/******************************* I2C Routines *********************************/ -/** - * @brief Initializes I2C MSP. - */ -static void I2C1_MspInit(void) -{ - GPIO_InitTypeDef gpio_init_structure; - - /*** Configure the GPIOs ***/ - /* Enable GPIO clock */ - DISCO_I2C1_SCL_SDA_GPIO_CLK_ENABLE(); - - /* Configure I2C Tx as alternate function */ - gpio_init_structure.Pin = DISCO_I2C1_SCL_PIN; - gpio_init_structure.Mode = GPIO_MODE_AF_OD; - gpio_init_structure.Pull = GPIO_NOPULL; - gpio_init_structure.Speed = GPIO_SPEED_FAST; - gpio_init_structure.Alternate = DISCO_I2C1_SCL_SDA_AF; - HAL_GPIO_Init(DISCO_I2C1_SCL_SDA_GPIO_PORT, &gpio_init_structure); - - /* Configure I2C Rx as alternate function */ - gpio_init_structure.Pin = DISCO_I2C1_SDA_PIN; - HAL_GPIO_Init(DISCO_I2C1_SCL_SDA_GPIO_PORT, &gpio_init_structure); - - /*** Configure the I2C peripheral ***/ - /* Enable I2C clock */ - DISCO_I2C1_CLK_ENABLE(); - - /* Force the I2C peripheral clock reset */ - DISCO_I2C1_FORCE_RESET(); - - /* Release the I2C peripheral clock reset */ - DISCO_I2C1_RELEASE_RESET(); - - /* Enable and set I2C1 Interrupt to a lower priority */ - HAL_NVIC_SetPriority(DISCO_I2C1_EV_IRQn, 0x05, 0); - HAL_NVIC_EnableIRQ(DISCO_I2C1_EV_IRQn); - - /* Enable and set I2C1 Interrupt to a lower priority */ - HAL_NVIC_SetPriority(DISCO_I2C1_ER_IRQn, 0x05, 0); - HAL_NVIC_EnableIRQ(DISCO_I2C1_ER_IRQn); -} - -/** - * @brief Initializes I2C MSP. - */ -static void I2C2_MspInit(void) -{ - GPIO_InitTypeDef gpio_init_structure; - - /*** Configure the GPIOs ***/ - /* Enable GPIO clock */ - DISCO_I2C2_SCL_SDA_GPIO_CLK_ENABLE(); - - /* Configure I2C Tx as alternate function */ - gpio_init_structure.Pin = DISCO_I2C2_SCL_PIN; - gpio_init_structure.Mode = GPIO_MODE_AF_OD; - gpio_init_structure.Pull = GPIO_NOPULL; - gpio_init_structure.Speed = GPIO_SPEED_FAST; - gpio_init_structure.Alternate = DISCO_I2C2_SCL_SDA_AF; - HAL_GPIO_Init(DISCO_I2C2_SCL_SDA_GPIO_PORT, &gpio_init_structure); - - /* Configure I2C Rx as alternate function */ - gpio_init_structure.Pin = DISCO_I2C2_SDA_PIN; - HAL_GPIO_Init(DISCO_I2C2_SCL_SDA_GPIO_PORT, &gpio_init_structure); - - /*** Configure the I2C peripheral ***/ - /* Enable I2C clock */ - DISCO_I2C2_CLK_ENABLE(); - - /* Force the I2C peripheral clock reset */ - DISCO_I2C2_FORCE_RESET(); - - /* Release the I2C peripheral clock reset */ - DISCO_I2C2_RELEASE_RESET(); - - /* Enable and set I2C1 Interrupt to a lower priority */ - HAL_NVIC_SetPriority(DISCO_I2C2_EV_IRQn, 0x05, 0); - HAL_NVIC_EnableIRQ(DISCO_I2C2_EV_IRQn); - - /* Enable and set I2C1 Interrupt to a lower priority */ - HAL_NVIC_SetPriority(DISCO_I2C2_ER_IRQn, 0x05, 0); - HAL_NVIC_EnableIRQ(DISCO_I2C2_ER_IRQn); -} - -/** - * @brief Initializes I2C HAL. - */ -static void I2C1_Init(void) -{ - if(HAL_I2C_GetState(&heval_I2c1) == HAL_I2C_STATE_RESET) - { - heval_I2c1.Instance = I2C1; - heval_I2c1.Init.ClockSpeed = I2C1_SCL_FREQ_KHZ; - heval_I2c1.Init.DutyCycle = I2C_DUTYCYCLE_2; - heval_I2c1.Init.OwnAddress1 = 0; - heval_I2c1.Init.AddressingMode = I2C_ADDRESSINGMODE_7BIT; - heval_I2c1.Init.DualAddressMode = I2C_DUALADDRESS_DISABLE; - heval_I2c1.Init.OwnAddress2 = 0; - heval_I2c1.Init.GeneralCallMode = I2C_GENERALCALL_DISABLE; - heval_I2c1.Init.NoStretchMode = I2C_NOSTRETCH_DISABLE; - - /* Init the I2C */ - I2C1_MspInit(); - HAL_I2C_Init(&heval_I2c1); - } -} - -/** - * @brief Initializes I2C HAL. - */ -static void I2C2_Init(void) -{ - if(HAL_I2C_GetState(&heval_I2c2) == HAL_I2C_STATE_RESET) - { - heval_I2c2.Instance = I2C2; - heval_I2c2.Init.ClockSpeed = I2C2_SCL_FREQ_KHZ; - heval_I2c2.Init.DutyCycle = I2C_DUTYCYCLE_2; - heval_I2c2.Init.OwnAddress1 = 0; - heval_I2c2.Init.AddressingMode = I2C_ADDRESSINGMODE_7BIT; - heval_I2c2.Init.DualAddressMode = I2C_DUALADDRESS_DISABLE; - heval_I2c2.Init.OwnAddress2 = 0; - heval_I2c2.Init.GeneralCallMode = I2C_GENERALCALL_DISABLE; - heval_I2c2.Init.NoStretchMode = I2C_NOSTRETCH_DISABLE; - - /* Init the I2C */ - I2C2_MspInit(); - HAL_I2C_Init(&heval_I2c2); - } -} - -/** - * @brief Writes a single data. - * @param Addr: I2C address - * @param Reg: Register address - * @param Value: Data to be written - */ -static void I2C1_Write(uint8_t Addr, uint8_t Reg, uint8_t Value) -{ - HAL_StatusTypeDef status = HAL_OK; - - status = HAL_I2C_Mem_Write(&heval_I2c1, - Addr, - (uint16_t)Reg, - I2C_MEMADD_SIZE_8BIT, - &Value, - 1, - 100); - - /* Check the communication status */ - if(status != HAL_OK) - { - /* Execute user timeout callback */ - I2C1_Error(Addr); - } -} - -/** - * @brief Reads a single data. - * @param Addr: I2C address - * @param Reg: Register address - * @retval Read data - */ -static uint8_t I2C1_Read(uint8_t Addr, uint8_t Reg) -{ - HAL_StatusTypeDef status = HAL_OK; - uint8_t Value = 0; - - status = HAL_I2C_Mem_Read(&heval_I2c1, - Addr, - Reg, - I2C_MEMADD_SIZE_8BIT, - &Value, - 1, - 1000); - - /* Check the communication status */ - if(status != HAL_OK) - { - /* Execute user timeout callback */ - I2C1_Error(Addr); - } - return Value; -} - -/** - * @brief Reads multiple data. - * @param Addr: I2C address - * @param Reg: Reg address - * @param MemAddress: memory address - * @param Buffer: Pointer to data buffer - * @param Length: Length of the data - * @retval HAL status - */ -static HAL_StatusTypeDef I2C1_ReadMultiple(uint8_t Addr, - uint16_t Reg, - uint16_t MemAddress, - uint8_t *Buffer, - uint16_t Length) -{ - HAL_StatusTypeDef status = HAL_OK; - - status = HAL_I2C_Mem_Read(&heval_I2c1, - Addr, - (uint16_t)Reg, - MemAddress, - Buffer, - Length, - 1000); - - /* Check the communication status */ - if(status != HAL_OK) - { - /* I2C error occured */ - I2C1_Error(Addr); - } - return status; -} - -static HAL_StatusTypeDef I2C2_ReadMultiple(uint8_t Addr, - uint16_t Reg, - uint16_t MemAddress, - uint8_t *Buffer, - uint16_t Length) -{ - HAL_StatusTypeDef status = HAL_OK; - - status = HAL_I2C_Mem_Read(&heval_I2c2, - Addr, - (uint16_t)Reg, - MemAddress, - Buffer, - Length, - 1000); - - /* Check the communication status */ - if(status != HAL_OK) - { - /* I2C2 error occured */ - I2C2_Error(Addr); - } - return status; -} - -/** - * @brief Writes a value in a register of the device through BUS in using DMA mode. - * @param Addr: Device address on BUS Bus. - * @param Reg: The target register address to write - * @param MemAddress: memory address - * @param Buffer: The target register value to be written - * @param Length: buffer size to be written - * @retval HAL status - */ -static HAL_StatusTypeDef I2C1_WriteMultiple(uint8_t Addr, - uint16_t Reg, - uint16_t MemAddress, - uint8_t *Buffer, - uint16_t Length) -{ - HAL_StatusTypeDef status = HAL_OK; - - status = HAL_I2C_Mem_Write(&heval_I2c1, - Addr, - (uint16_t)Reg, - MemAddress, - Buffer, - Length, - 1000); - - /* Check the communication status */ - if(status != HAL_OK) - { - /* Re-Initiaize the I2C Bus */ - I2C1_Error(Addr); - } - return status; -} - -static HAL_StatusTypeDef I2C2_WriteMultiple(uint8_t Addr, - uint16_t Reg, - uint16_t MemAddress, - uint8_t *Buffer, - uint16_t Length) -{ - HAL_StatusTypeDef status = HAL_OK; - - status = HAL_I2C_Mem_Write(&heval_I2c2, - Addr, - (uint16_t)Reg, - MemAddress, - Buffer, - Length, - 1000); - - /* Check the communication status */ - if(status != HAL_OK) - { - /* Re-Initiaize the I2C2 Bus */ - I2C2_Error(Addr); - } - return status; -} - -/** - * @brief Checks if target device is ready for communication. - * @note This function is used with Memory devices - * @param DevAddress: Target device address - * @param Trials: Number of trials - * @retval HAL status - */ -static HAL_StatusTypeDef I2C1_IsDeviceReady(uint16_t DevAddress, uint32_t Trials) -{ - return (HAL_I2C_IsDeviceReady(&heval_I2c1, DevAddress, Trials, 1000)); -} - -/** - * @brief Manages error callback by re-initializing I2C. - * @param Addr: I2C Address - * @retval None - */ -static void I2C1_Error(uint8_t Addr) -{ - /* De-initialize the I2C comunication bus */ - HAL_I2C_DeInit(&heval_I2c1); - - /* Re-Initiaize the I2C comunication bus */ - I2C1_Init(); -} - -static void I2C2_Error(uint8_t Addr) -{ - /* De-initialize the I2C2 comunication bus */ - HAL_I2C_DeInit(&heval_I2c2); - - /* Re-Initiaize the I2C2 comunication bus */ - I2C2_Init(); -} - -/** - * @} - */ - -/******************************************************************************* - LINK OPERATIONS -*******************************************************************************/ - -/********************************* LINK AUDIO *********************************/ - -/** - * @brief Initializes Audio low level. - */ -void AUDIO_IO_Init(void) -{ - I2C2_Init(); -} - -/** - * @brief DeInitializes Audio low level. - */ -void AUDIO_IO_DeInit(void) -{ - -} - -/** - * @brief Writes a single data. - * @param Addr: I2C address - * @param Reg: Reg address - * @param Value: Data to be written - */ -void AUDIO_IO_Write(uint8_t Addr, uint8_t Reg, uint8_t Value) -{ - I2C2_WriteMultiple(Addr, (uint16_t) Reg, I2C_MEMADD_SIZE_8BIT, (uint8_t*)&Value, 1); -} - -/** - * @brief Reads a single data. - * @param Addr: I2C address - * @param Reg: Reg address - * @retval Data to be read - */ -uint8_t AUDIO_IO_Read(uint8_t Addr, uint8_t Reg) -{ - uint8_t read_value = 0; - - I2C2_ReadMultiple(Addr, (uint16_t) Reg, I2C_MEMADD_SIZE_8BIT, (uint8_t*)&read_value, 1); - - return read_value; -} - -/** - * @brief AUDIO Codec delay - * @param Delay: Delay in ms - */ -void AUDIO_IO_Delay(uint32_t Delay) -{ - //HAL_Delay(Delay); - wait_ms(Delay); -} - -/******************************** LINK I2C EEPROM *****************************/ - -/** - * @brief Initializes peripherals used by the I2C EEPROM driver. - */ -void EEPROM_IO_Init(void) -{ - I2C1_Init(); -} - -/** - * @brief Write data to I2C EEPROM driver in using DMA channel. - * @param DevAddress: Target device address - * @param MemAddress: Internal memory address - * @param pBuffer: Pointer to data buffer - * @param BufferSize: Amount of data to be sent - * @retval HAL status - */ -HAL_StatusTypeDef EEPROM_IO_WriteData(uint16_t DevAddress, uint16_t MemAddress, uint8_t* pBuffer, uint32_t BufferSize) -{ - return (I2C1_WriteMultiple(DevAddress, MemAddress, I2C_MEMADD_SIZE_16BIT, pBuffer, BufferSize)); -} - -/** - * @brief Read data from I2C EEPROM driver in using DMA channel. - * @param DevAddress: Target device address - * @param MemAddress: Internal memory address - * @param pBuffer: Pointer to data buffer - * @param BufferSize: Amount of data to be read - * @retval HAL status - */ -HAL_StatusTypeDef EEPROM_IO_ReadData(uint16_t DevAddress, uint16_t MemAddress, uint8_t* pBuffer, uint32_t BufferSize) -{ - return (I2C1_ReadMultiple(DevAddress, MemAddress, I2C_MEMADD_SIZE_16BIT, pBuffer, BufferSize)); -} - -/** - * @brief Checks if target device is ready for communication. - * @note This function is used with Memory devices - * @param DevAddress: Target device address - * @param Trials: Number of trials - * @retval HAL status - */ -HAL_StatusTypeDef EEPROM_IO_IsDeviceReady(uint16_t DevAddress, uint32_t Trials) -{ - return (I2C1_IsDeviceReady(DevAddress, Trials)); -} - -/******************************** LINK TS (TouchScreen) ***********************/ - -/** - * @brief Initialize I2C communication - * channel from MCU to TouchScreen (TS). - */ -void TS_IO_Init(void) -{ - I2C1_Init(); -} - -/** - * @brief Writes single data with I2C communication - * channel from MCU to TouchScreen. - * @param Addr: I2C address - * @param Reg: Register address - * @param Value: Data to be written - */ -void TS_IO_Write(uint8_t Addr, uint8_t Reg, uint8_t Value) -{ - I2C1_Write(Addr, Reg, Value); -} - -/** - * @brief Reads single data with I2C communication - * channel from TouchScreen. - * @param Addr: I2C address - * @param Reg: Register address - * @retval Read data - */ -uint8_t TS_IO_Read(uint8_t Addr, uint8_t Reg) -{ - return I2C1_Read(Addr, Reg); -} - -/** - * @brief Reads multiple data with I2C communication - * channel from TouchScreen. - * @param Addr: I2C address - * @param Reg: Register address - * @param Buffer: Pointer to data buffer - * @param Length: Length of the data - * @retval Number of read data - */ -uint16_t TS_IO_ReadMultiple(uint8_t Addr, uint8_t Reg, uint8_t *Buffer, uint16_t Length) -{ - return I2C1_ReadMultiple(Addr, (uint16_t)Reg, I2C_MEMADD_SIZE_8BIT, Buffer, Length); -} - -/** - * @brief Writes multiple data with I2C communication - * channel from MCU to TouchScreen. - * @param Addr: I2C address - * @param Reg: Register address - * @param Buffer: Pointer to data buffer - * @param Length: Length of the data - * @retval None - */ -void TS_IO_WriteMultiple(uint8_t Addr, uint8_t Reg, uint8_t *Buffer, uint16_t Length) -{ - I2C1_WriteMultiple(Addr, (uint16_t)Reg, I2C_MEMADD_SIZE_8BIT, Buffer, Length); -} - -/** - * @brief Delay function used in TouchScreen low level driver. - * @param Delay: Delay in ms - * @retval None - */ -void TS_IO_Delay(uint32_t Delay) -{ - //HAL_Delay(Delay); - wait_ms(Delay); -} - -/**************************** LINK OTM8009A (Display driver) ******************/ -/** - * @brief OTM8009A delay - * @param Delay: Delay in ms - */ -void OTM8009A_IO_Delay(uint32_t Delay) -{ - //HAL_Delay(Delay); - wait_ms(Delay); -} - -/** - * @} - */ - -/** - * @} - */ - -/** - * @} - */ - -/** - * @} - */ - -/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
--- a/stm32469i_discovery/stm32469i_discovery.h Mon May 30 11:09:05 2016 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,371 +0,0 @@ -/** - ****************************************************************************** - * @file stm32469i_discovery.h - * @author MCD Application Team - * @version V1.0.1 - * @date 29-September-2015 - * @brief This file contains definitions for STM32469I-Discovery LEDs, - * push-buttons hardware resources. - ****************************************************************************** - * @attention - * - * <h2><center>© COPYRIGHT(c) 2015 STMicroelectronics</center></h2> - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. Neither the name of STMicroelectronics nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - ****************************************************************************** - */ - -/* Define to prevent recursive inclusion -------------------------------------*/ -#ifndef __STM32469I_DISCOVERY_H -#define __STM32469I_DISCOVERY_H - -#ifdef __cplusplus - extern "C" { -#endif - - /* Includes ------------------------------------------------------------------*/ -#include "stm32f4xx_hal.h" - -// mbed -void wait_ms(int ms); - -/** @addtogroup BSP - * @{ - */ - -/** @addtogroup STM32469I_Discovery - * @{ - */ - -/** @defgroup STM32469I_Discovery_LOW_LEVEL STM32469I-Discovery LOW LEVEL - * @{ - */ - -/** @defgroup STM32469I_Discovery_LOW_LEVEL_Exported_Types STM32469I Discovery Low Level Exported Types - * @{ - */ - -/** @brief Led_TypeDef - * STM32469I_Discovery board leds definitions. - */ -typedef enum -{ - DISCO_LED1 = 0, - DISCO_LED_GREEN = DISCO_LED1, - DISCO_LED2 = 1, - DISCO_LED_ORANGE = DISCO_LED2, - DISCO_LED3 = 2, - DISCO_LED_RED = DISCO_LED3, - DISCO_LED4 = 3, - DISCO_LED_BLUE = DISCO_LED4 - -} Led_TypeDef; - -/** @brief Button_TypeDef - * STM32469I_Discovery board Buttons definitions. - */ -typedef enum -{ - BUTTON_WAKEUP = 0 -} Button_TypeDef; - -#define BUTTON_USER BUTTON_WAKEUP - -/** @brief ButtonMode_TypeDef - * STM32469I_Discovery board Buttons Modes definitions. - */ -typedef enum -{ - BUTTON_MODE_GPIO = 0, - BUTTON_MODE_EXTI = 1 - -} ButtonMode_TypeDef; - -/** @addtogroup Exported_types - * @{ - */ -typedef enum -{ - PB_SET = 0, - PB_RESET = !PB_SET -} ButtonValue_TypeDef; - - -/** @brief DISCO_Status_TypeDef - * STM32469I_DISCO board Status return possible values. - */ -typedef enum -{ - DISCO_OK = 0, - DISCO_ERROR = 1 - -} DISCO_Status_TypeDef; - -/** - * @} - */ - -/** @defgroup STM32469I_Discovery_LOW_LEVEL_Exported_Constants STM32469I Discovery Low Level Exported Constants - * @{ - */ - - -/** @addtogroup STM32469I_Discovery_LOW_LEVEL_LED STM32469I Discovery Low Level Led - * @{ - */ -/* Always four leds for all revisions of Discovery boards */ -#define LEDn ((uint8_t)4) - - -/* 4 Leds are connected to MCU directly on PG6, PD4, PD5, PK3 */ -#define LED1_GPIO_PORT ((GPIO_TypeDef*)GPIOG) -#define LED2_GPIO_PORT ((GPIO_TypeDef*)GPIOD) -#define LED3_GPIO_PORT ((GPIO_TypeDef*)GPIOD) -#define LED4_GPIO_PORT ((GPIO_TypeDef*)GPIOK) - -#define LED1_GPIO_CLK_ENABLE() __HAL_RCC_GPIOG_CLK_ENABLE() -#define LED1_GPIO_CLK_DISABLE() __HAL_RCC_GPIOG_CLK_DISABLE() -#define LED2_GPIO_CLK_ENABLE() __HAL_RCC_GPIOD_CLK_ENABLE() -#define LED2_GPIO_CLK_DISABLE() __HAL_RCC_GPIOD_CLK_DISABLE() -#define LED3_GPIO_CLK_ENABLE() __HAL_RCC_GPIOD_CLK_ENABLE() -#define LED3_GPIO_CLK_DISABLE() __HAL_RCC_GPIOD_CLK_DISABLE() -#define LED4_GPIO_CLK_ENABLE() __HAL_RCC_GPIOK_CLK_ENABLE() -#define LED4_GPIO_CLK_DISABLE() __HAL_RCC_GPIOK_CLK_DISABLE() - -#define LED1_PIN ((uint32_t)GPIO_PIN_6) -#define LED2_PIN ((uint32_t)GPIO_PIN_4) -#define LED3_PIN ((uint32_t)GPIO_PIN_5) -#define LED4_PIN ((uint32_t)GPIO_PIN_3) -/** - * @} - */ - -/** @addtogroup STM32469I_Discovery_LOW_LEVEL_BUTTON STM32469I Discovery Low Level Button - * @{ - */ -/* Only one User/Wakeup button */ -#define BUTTONn ((uint8_t)1) - -/** - * @brief Wakeup push-button - */ -#define WAKEUP_BUTTON_PIN GPIO_PIN_0 -#define WAKEUP_BUTTON_GPIO_PORT GPIOA -#define WAKEUP_BUTTON_GPIO_CLK_ENABLE() __HAL_RCC_GPIOA_CLK_ENABLE() -#define WAKEUP_BUTTON_GPIO_CLK_DISABLE() __HAL_RCC_GPIOA_CLK_DISABLE() -#define WAKEUP_BUTTON_EXTI_IRQn EXTI0_IRQn - -/* Define the USER button as an alias of the Wakeup button */ -#define USER_BUTTON_PIN WAKEUP_BUTTON_PIN -#define USER_BUTTON_GPIO_PORT WAKEUP_BUTTON_GPIO_PORT -#define USER_BUTTON_GPIO_CLK_ENABLE() WAKEUP_BUTTON_GPIO_CLK_ENABLE() -#define USER_BUTTON_GPIO_CLK_DISABLE() WAKEUP_BUTTON_GPIO_CLK_DISABLE() -#define USER_BUTTON_EXTI_IRQn WAKEUP_BUTTON_EXTI_IRQn - -#define BUTTON_GPIO_CLK_ENABLE() __HAL_RCC_GPIOA_CLK_ENABLE() - -/** - * @} - */ - -/** - * @brief Discovery Pins definition - * TODO : to be modified/reviewed - */ -#define AUDIO_INT_PIN GPIO_PIN_7 -#define AUDIO_INT_PORT GPIOB -#define AUDIO_INT_PORT_CLK_ENABLE() __HAL_RCC_GPIOB_CLK_ENABLE() - -#define OTG_FS1_OVER_CURRENT_PIN GPIO_PIN_7 -#define OTG_FS1_OVER_CURRENT_PORT GPIOB -#define OTG_FS1_OVER_CURRENT_PORT_CLK_ENABLE() __HAL_RCC_GPIOB_CLK_ENABLE() - -#define OTG_FS1_POWER_SWITCH_PIN GPIO_PIN_2 -#define OTG_FS1_POWER_SWITCH_PORT GPIOB -#define OTG_FS1_POWER_SWITCH_PORT_CLK_ENABLE() __HAL_RCC_GPIOB_CLK_ENABLE() - -/** - * @brief SD-detect signal - */ -#define SD_DETECT_PIN ((uint32_t)GPIO_PIN_2) -#define SD_DETECT_GPIO_PORT ((GPIO_TypeDef*)GPIOG) -#define SD_DETECT_GPIO_CLK_ENABLE() __HAL_RCC_GPIOG_CLK_ENABLE() -#define SD_DETECT_GPIO_CLK_DISABLE() __HAL_RCC_GPIOG_CLK_DISABLE() -#define SD_DETECT_EXTI_IRQn EXTI2_IRQn - -/** - * @brief TS_INT signal from TouchScreen when it is configured in interrupt mode - * GPIOJ5 is used for that purpose on Manta Dragon Discovery board - */ -#define TS_INT_PIN ((uint32_t)GPIO_PIN_5) -#define TS_INT_GPIO_PORT ((GPIO_TypeDef*)GPIOJ) -#define TS_INT_GPIO_CLK_ENABLE() __HAL_RCC_GPIOJ_CLK_ENABLE() -#define TS_INT_GPIO_CLK_DISABLE() __HAL_RCC_GPIOJ_CLK_DISABLE() -#define TS_INT_EXTI_IRQn EXTI9_5_IRQn - -/** - * @brief TouchScreen FT6206 Slave I2C address - */ -#define TS_I2C_ADDRESS ((uint16_t)0x54) - - -/** - * @brief Audio I2C Slave address - */ -#define AUDIO_I2C_ADDRESS ((uint16_t)0x94) - -/** - * @brief EEPROM I2C Slave address 1 - */ -#define EEPROM_I2C_ADDRESS_A01 ((uint16_t)0xA0) - -/** - * @brief EEPROM I2C Slave address 2 - */ -#define EEPROM_I2C_ADDRESS_A02 ((uint16_t)0xA6) - -/** - * @brief I2C clock speed configuration (in Hz) - * WARNING: - * Make sure that this define is not already declared in other files - * It can be used in parallel by other modules. - */ -#ifndef I2C1_SCL_FREQ_KHZ -#define I2C1_SCL_FREQ_KHZ 400000 /*!< f(I2C_SCL) = 400 kHz */ -#endif /* I2C1_SCL_FREQ_KHZ */ - -/** - * @brief User can use this section to tailor I2C1/I2C1 instance used and associated - * resources. - * Definition for I2C1 clock resources - */ -#define DISCO_I2C1 I2C1 -#define DISCO_I2C1_CLK_ENABLE() __HAL_RCC_I2C1_CLK_ENABLE() -#define DISCO_DMAx_CLK_ENABLE() __HAL_RCC_DMA1_CLK_ENABLE() -#define DISCO_I2C1_SCL_SDA_GPIO_CLK_ENABLE() __HAL_RCC_GPIOB_CLK_ENABLE() - -#define DISCO_I2C1_FORCE_RESET() __HAL_RCC_I2C1_FORCE_RESET() -#define DISCO_I2C1_RELEASE_RESET() __HAL_RCC_I2C1_RELEASE_RESET() - -/** @brief Definition for I2C1 Pins - */ -#define DISCO_I2C1_SCL_PIN GPIO_PIN_8 /*!< PB8 */ -#define DISCO_I2C1_SCL_SDA_GPIO_PORT GPIOB -#define DISCO_I2C1_SCL_SDA_AF GPIO_AF4_I2C1 -#define DISCO_I2C1_SDA_PIN GPIO_PIN_9 /*!< PB9 */ - -/** @brief Definition of I2C interrupt requests - */ -#define DISCO_I2C1_EV_IRQn I2C1_EV_IRQn -#define DISCO_I2C1_ER_IRQn I2C1_ER_IRQn - - - -/** - * @brief I2C2 clock speed configuration (in Hz) - * WARNING: - * Make sure that this define is not already declared in other files - * It can be used in parallel by other modules. - */ -#ifndef I2C2_SCL_FREQ_KHZ -#define I2C2_SCL_FREQ_KHZ 100000 /*!< f(I2C2_SCL) < 100 kHz */ -#endif /* I2C2_SCL_FREQ_KHZ */ - -/** - * @brief User can use this section to tailor I2C2/I2C2 instance used and associated - * resources (audio codec). - * Definition for I2C2 clock resources - */ -#define DISCO_I2C2 I2C2 -#define DISCO_I2C2_CLK_ENABLE() __HAL_RCC_I2C2_CLK_ENABLE() -#define DISCO_I2C2_SCL_SDA_GPIO_CLK_ENABLE() __HAL_RCC_GPIOH_CLK_ENABLE() - -#define DISCO_I2C2_FORCE_RESET() __HAL_RCC_I2C2_FORCE_RESET() -#define DISCO_I2C2_RELEASE_RESET() __HAL_RCC_I2C2_RELEASE_RESET() - -/** @brief Definition for I2C2 Pins - */ -#define DISCO_I2C2_SCL_PIN GPIO_PIN_4 /*!< PH4 */ -#define DISCO_I2C2_SCL_SDA_GPIO_PORT GPIOH -#define DISCO_I2C2_SCL_SDA_AF GPIO_AF4_I2C2 -#define DISCO_I2C2_SDA_PIN GPIO_PIN_5 /*!< PH5 */ - -/** @brief Definition of I2C2 interrupt requests - */ -#define DISCO_I2C2_EV_IRQn I2C2_EV_IRQn -#define DISCO_I2C2_ER_IRQn I2C2_ER_IRQn - - -/** - * @} - */ - -/** @defgroup STM32469I_Discovery_LOW_LEVEL_Exported_Macros STM32469I Discovery Low Level Exported Macros - * @{ - */ -/** - * @} - */ - -/** @defgroup STM32469I_Discovery_LOW_LEVEL_Exported_Functions STM32469I Discovery Low Level Exported Functions - * @{ - */ -uint32_t BSP_GetVersion(void); -void BSP_LED_Init(Led_TypeDef Led); -void BSP_LED_DeInit(Led_TypeDef Led); -void BSP_LED_On(Led_TypeDef Led); -void BSP_LED_Off(Led_TypeDef Led); -void BSP_LED_Toggle(Led_TypeDef Led); -void BSP_PB_Init(Button_TypeDef Button, ButtonMode_TypeDef Button_Mode); -void BSP_PB_DeInit(Button_TypeDef Button); -uint32_t BSP_PB_GetState(Button_TypeDef Button); - -/** - * @} - */ - -/** - * @} - */ - -/** - * @} - */ - -/** - * @} - */ - -/** - * @} - */ - - -#ifdef __cplusplus -} -#endif - -#endif /* __STM32469I_DISCOVERY_H */ - -/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
--- a/stm32469i_discovery/stm32469i_discovery_eeprom.c Mon May 30 11:09:05 2016 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,474 +0,0 @@ -/** - ****************************************************************************** - * @file stm32469i_discovery_eeprom.c - * @author MCD Application Team - * @version V1.0.1 - * @date 29-September-2015 - * @brief This file provides a set of functions needed to manage an I2C M24LR64 - * EEPROM memory. - * To be able to use this driver, the switch EE_M24LR64 must be defined - * in your toolchain compiler preprocessor - * - * =================================================================== - * Notes: - * - This driver is intended for STM32F4xx families devices only. - * - The I2C EEPROM memory (M24LR64) is available on separate daughter - * board ANT7-M24LR-A, which is not provided with the STM32469I-Discovery - * board. - * To use this driver you have to connect the ANT7-M24LR-A to CN11 - * connector of STM32469I-Discovery board. - * =================================================================== - * - * It implements a high level communication layer for read and write - * from/to this memory. The needed STM32F4xx hardware resources (I2C and - * GPIO) are defined in stm32469i_discovery.h file, and the initialization is - * performed in EEPROM_IO_Init() function declared in stm32469i_discovery.c - * file. - * You can easily tailor this driver to any other development board, - * by just adapting the defines for hardware resources and - * EEPROM_IO_Init() function. - * - * @note In this driver, basic read and write functions (BSP_EEPROM_ReadBuffer() - * and BSP_EEPROM_WritePage()) use DMA mode to perform the data - * transfer to/from EEPROM memory. - * - * @note Regarding BSP_EEPROM_WritePage(), it is a optimized function to perform - * small write (less than 1 page) BUT The number of bytes (combined to write start address) must not - * cross the EEPROM page boundary. This function can only write into - * the boundaries of an EEPROM page. - * This function doesn't check on boundaries condition (in this driver - * the function BSP_EEPROM_WriteBuffer() which calls BSP_EEPROM_WritePage() is - * responsible of checking on Page boundaries). - * - * - * +-----------------------------------------------------------------+ - * | Pin assignment for M24LR64 EEPROM | - * +---------------------------------------+-----------+-------------+ - * | STM32F4xx I2C Pins | EEPROM | Pin | - * +---------------------------------------+-----------+-------------+ - * | . | E0(GND) | 1 (0V) | - * | . | AC0 | 2 | - * | . | AC1 | 3 | - * | . | VSS | 4 (0V) | - * | SDA | SDA | 5 | - * | SCL | SCL | 6 | - * | . | E1(GND) | 7 (0V) | - * | . | VDD | 8 (3.3V) | - * +---------------------------------------+-----------+-------------+ - * - ****************************************************************************** - * @attention - * - * <h2><center>© COPYRIGHT(c) 2015 STMicroelectronics</center></h2> - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. Neither the name of STMicroelectronics nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - ****************************************************************************** - */ -/* Includes ------------------------------------------------------------------*/ -#include "stm32469i_discovery_eeprom.h" - -/** @addtogroup BSP - * @{ - */ - -/** @addtogroup STM32469I-Discovery - * @{ - */ - -/** @addtogroup STM32469I-Discovery_EEPROM - * @brief This file includes the I2C EEPROM driver of STM32469I-Discovery board. - * @{ - */ - -/** @defgroup STM32469I-Discovery_EEPROM_Private_Types STM32469I Discovery Eeprom Private Types - * @{ - */ -/** - * @} - */ - -/** @defgroup STM32469I-Discovery_EEPROM_Private_Defines STM32469I Discovery Eeprom Private Defines - * @{ - */ -/** - * @} - */ - -/** @defgroup STM32469I-Discovery_EEPROM_Private_Macros STM32469I Discovery Eeprom Private Macros - * @{ - */ -/** - * @} - */ - -/** @defgroup STM32469I-Discovery_EEPROM_Private_Variables STM32469I Discovery Eeprom Private Variables - * @{ - */ -__IO uint16_t EEPROMAddress = 0; -__IO uint32_t EEPROMTimeout = EEPROM_READ_TIMEOUT; -__IO uint16_t EEPROMDataRead; -__IO uint8_t EEPROMDataWrite; -/** - * @} - */ - -/** @defgroup STM32469I-Discovery_EEPROM_Private_Function_Prototypes STM32469I Discovery Eeprom Private Prototypes - * @{ - */ -/** - * @} - */ - -/** @defgroup STM32469I-Discovery_EEPROM_Private_Functions STM32469I Discovery Eeprom Private Functions - * @{ - */ - -/** - * @brief Initializes peripherals used by the I2C EEPROM driver. - * - * @note There are 2 different versions of M24LR64 (A01 & A02). - * Then try to connect on 1st one (EEPROM_I2C_ADDRESS_A01) - * and if problem, check the 2nd one (EEPROM_I2C_ADDRESS_A02) - * @retval EEPROM_OK (0) if operation is correctly performed, else return value - * different from EEPROM_OK (0) - */ -uint32_t BSP_EEPROM_Init(void) -{ - /* I2C Initialization */ - EEPROM_IO_Init(); - - /* Select the EEPROM address for A01 and check if OK */ - EEPROMAddress = EEPROM_I2C_ADDRESS_A01; - if(EEPROM_IO_IsDeviceReady(EEPROMAddress, EEPROM_MAX_TRIALS) != HAL_OK) - { - /* Select the EEPROM address for A02 and check if OK */ - EEPROMAddress = EEPROM_I2C_ADDRESS_A02; - if(EEPROM_IO_IsDeviceReady(EEPROMAddress, EEPROM_MAX_TRIALS) != HAL_OK) - { - return EEPROM_FAIL; - } - } - return EEPROM_OK; -} - -/** - * @brief DeInitializes the EEPROM. - * @retval EEPROM state - */ -uint8_t BSP_EEPROM_DeInit(void) -{ - /* I2C won't be disabled because common to other functionalities */ - return EEPROM_OK; -} - -/** - * @brief Reads a block of data from the EEPROM. - * @param pBuffer: pointer to the buffer that receives the data read from - * the EEPROM. - * @param ReadAddr: EEPROM's internal address to start reading from. - * @param NumByteToRead: pointer to the variable holding number of bytes to - * be read from the EEPROM. - * - * @note The variable pointed by NumByteToRead is reset to 0 when all the - * data are read from the EEPROM. Application should monitor this - * variable in order know when the transfer is complete. - * - * @retval EEPROM_OK (0) if operation is correctly performed, else return value - * different from EEPROM_OK (0) or the timeout user callback. - */ -uint32_t BSP_EEPROM_ReadBuffer(uint8_t* pBuffer, uint16_t ReadAddr, uint16_t* NumByteToRead) -{ - uint32_t buffersize = *NumByteToRead; - - /* Set the pointer to the Number of data to be read. This pointer will be used - by the DMA Transfer Completer interrupt Handler in order to reset the - variable to 0. User should check on this variable in order to know if the - DMA transfer has been complete or not. */ - EEPROMDataRead = *NumByteToRead; - - if(EEPROM_IO_ReadData(EEPROMAddress, ReadAddr, pBuffer, buffersize) != HAL_OK) - { - BSP_EEPROM_TIMEOUT_UserCallback(); - return EEPROM_FAIL; - } - - /* If all operations OK, return EEPROM_OK (0) */ - return EEPROM_OK; -} - -/** - * @brief Writes more than one byte to the EEPROM with a single WRITE cycle. - * - * @note The number of bytes (combined to write start address) must not - * cross the EEPROM page boundary. This function can only write into - * the boundaries of an EEPROM page. - * This function doesn't check on boundaries condition (in this driver - * the function BSP_EEPROM_WriteBuffer() which calls BSP_EEPROM_WritePage() is - * responsible of checking on Page boundaries). - * - * @param pBuffer: pointer to the buffer containing the data to be written to - * the EEPROM. - * @param WriteAddr: EEPROM's internal address to write to. - * @param NumByteToWrite: pointer to the variable holding number of bytes to - * be written into the EEPROM. - * - * @note The variable pointed by NumByteToWrite is reset to 0 when all the - * data are written to the EEPROM. Application should monitor this - * variable in order know when the transfer is complete. - * - * @note This function just configure the communication and enable the DMA - * channel to transfer data. Meanwhile, the user application may perform - * other tasks in parallel. - * - * @retval EEPROM_OK (0) if operation is correctly performed, else return value - * different from EEPROM_OK (0) or the timeout user callback. - */ -uint32_t BSP_EEPROM_WritePage(uint8_t* pBuffer, uint16_t WriteAddr, uint8_t* NumByteToWrite) -{ - uint32_t buffersize = *NumByteToWrite; - uint32_t status = EEPROM_OK; - - /* Set the pointer to the Number of data to be written. This pointer will be used - by the DMA Transfer Completer interrupt Handler in order to reset the - variable to 0. User should check on this variable in order to know if the - DMA transfer has been complete or not. */ - EEPROMDataWrite = *NumByteToWrite; - - if(EEPROM_IO_WriteData(EEPROMAddress, WriteAddr, pBuffer, buffersize) != HAL_OK) - { - BSP_EEPROM_TIMEOUT_UserCallback(); - status = EEPROM_FAIL; - } - - if(BSP_EEPROM_WaitEepromStandbyState() != EEPROM_OK) - { - return EEPROM_FAIL; - } - - /* If all operations OK, return EEPROM_OK (0) */ - return status; -} - -/** - * @brief Writes buffer of data to the I2C EEPROM. - * @param pBuffer: pointer to the buffer containing the data to be written - * to the EEPROM. - * @param WriteAddr: EEPROM's internal address to write to. - * @param NumByteToWrite: number of bytes to write to the EEPROM. - * @retval EEPROM_OK (0) if operation is correctly performed, else return value - * different from EEPROM_OK (0) or the timeout user callback. - */ -uint32_t BSP_EEPROM_WriteBuffer(uint8_t *pBuffer, uint16_t WriteAddr, uint16_t NumByteToWrite) -{ - uint16_t numofpage = 0, numofsingle = 0, count = 0; - uint16_t addr = 0; - uint8_t dataindex = 0; - uint32_t status = EEPROM_OK; - - addr = WriteAddr % EEPROM_PAGESIZE; - count = EEPROM_PAGESIZE - addr; - numofpage = NumByteToWrite / EEPROM_PAGESIZE; - numofsingle = NumByteToWrite % EEPROM_PAGESIZE; - - /* If WriteAddr is EEPROM_PAGESIZE aligned */ - if(addr == 0) - { - /* If NumByteToWrite < EEPROM_PAGESIZE */ - if(numofpage == 0) - { - /* Store the number of data to be written */ - dataindex = numofsingle; - /* Start writing data */ - status = BSP_EEPROM_WritePage(pBuffer, WriteAddr, (uint8_t*)(&dataindex)); - if(status != EEPROM_OK) - { - return status; - } - } - /* If NumByteToWrite > EEPROM_PAGESIZE */ - else - { - while(numofpage--) - { - /* Store the number of data to be written */ - dataindex = EEPROM_PAGESIZE; - status = BSP_EEPROM_WritePage(pBuffer, WriteAddr, (uint8_t*)(&dataindex)); - if(status != EEPROM_OK) - { - return status; - } - - WriteAddr += EEPROM_PAGESIZE; - pBuffer += EEPROM_PAGESIZE; - } - - if(numofsingle!=0) - { - /* Store the number of data to be written */ - dataindex = numofsingle; - status = BSP_EEPROM_WritePage(pBuffer, WriteAddr, (uint8_t*)(&dataindex)); - if(status != EEPROM_OK) - { - return status; - } - } - } - } - /* If WriteAddr is not EEPROM_PAGESIZE aligned */ - else - { - /* If NumByteToWrite < EEPROM_PAGESIZE */ - if(numofpage== 0) - { - /* If the number of data to be written is more than the remaining space - in the current page: */ - if(NumByteToWrite > count) - { - /* Store the number of data to be written */ - dataindex = count; - /* Write the data contained in same page */ - status = BSP_EEPROM_WritePage(pBuffer, WriteAddr, (uint8_t*)(&dataindex)); - if(status != EEPROM_OK) - { - return status; - } - - /* Store the number of data to be written */ - dataindex = (NumByteToWrite - count); - /* Write the remaining data in the following page */ - status = BSP_EEPROM_WritePage((uint8_t*)(pBuffer + count), (WriteAddr + count), (uint8_t*)(&dataindex)); - if(status != EEPROM_OK) - { - return status; - } - } - else - { - /* Store the number of data to be written */ - dataindex = numofsingle; - status = BSP_EEPROM_WritePage(pBuffer, WriteAddr, (uint8_t*)(&dataindex)); - if(status != EEPROM_OK) - { - return status; - } - } - } - /* If NumByteToWrite > EEPROM_PAGESIZE */ - else - { - NumByteToWrite -= count; - numofpage = NumByteToWrite / EEPROM_PAGESIZE; - numofsingle = NumByteToWrite % EEPROM_PAGESIZE; - - if(count != 0) - { - /* Store the number of data to be written */ - dataindex = count; - status = BSP_EEPROM_WritePage(pBuffer, WriteAddr, (uint8_t*)(&dataindex)); - if(status != EEPROM_OK) - { - return status; - } - WriteAddr += count; - pBuffer += count; - } - - while(numofpage--) - { - /* Store the number of data to be written */ - dataindex = EEPROM_PAGESIZE; - status = BSP_EEPROM_WritePage(pBuffer, WriteAddr, (uint8_t*)(&dataindex)); - if(status != EEPROM_OK) - { - return status; - } - WriteAddr += EEPROM_PAGESIZE; - pBuffer += EEPROM_PAGESIZE; - } - if(numofsingle != 0) - { - /* Store the number of data to be written */ - dataindex = numofsingle; - status = BSP_EEPROM_WritePage(pBuffer, WriteAddr, (uint8_t*)(&dataindex)); - if(status != EEPROM_OK) - { - return status; - } - } - } - } - - /* If all operations OK, return EEPROM_OK (0) */ - return EEPROM_OK; -} - -/** - * @brief Wait for EEPROM Standby state. - * - * @note This function allows to wait and check that EEPROM has finished the - * last operation. It is mostly used after Write operation: after receiving - * the buffer to be written, the EEPROM may need additional time to actually - * perform the write operation. During this time, it doesn't answer to - * I2C packets addressed to it. Once the write operation is complete - * the EEPROM responds to its address. - * - * @retval EEPROM_OK (0) if operation is correctly performed, else return value - * different from EEPROM_OK (0) or the timeout user callback. - */ -uint32_t BSP_EEPROM_WaitEepromStandbyState(void) -{ - /* Check if the maximum allowed number of trials has bee reached */ - if(EEPROM_IO_IsDeviceReady(EEPROMAddress, EEPROM_MAX_TRIALS) != HAL_OK) - { - /* If the maximum number of trials has been reached, exit the function */ - BSP_EEPROM_TIMEOUT_UserCallback(); - return EEPROM_TIMEOUT; - } - return EEPROM_OK; -} - -/** - * @brief Basic management of the timeout situation. - */ -__weak void BSP_EEPROM_TIMEOUT_UserCallback(void) -{ -} - -/** - * @} - */ - -/** - * @} - */ - -/** - * @} - */ - -/** - * @} - */ - -/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
--- a/stm32469i_discovery/stm32469i_discovery_eeprom.h Mon May 30 11:09:05 2016 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,146 +0,0 @@ -/** - ****************************************************************************** - * @file stm32469i_discovery_eeprom.h - * @author MCD Application Team - * @version V1.0.1 - * @date 29-September-2015 - * @brief This file contains all the functions prototypes for - * the stm32469i_discovery_eeprom.c firmware driver. - ****************************************************************************** - * @attention - * - * <h2><center>© COPYRIGHT(c) 2015 STMicroelectronics</center></h2> - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. Neither the name of STMicroelectronics nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - ****************************************************************************** - */ - -/* Define to prevent recursive inclusion -------------------------------------*/ -#ifndef __STM32F469I_DISCOVERY_EEPROM_H -#define __STM32F469I_DISCOVERY_EEPROM_H - -#ifdef __cplusplus - extern "C" { -#endif - -/* Includes ------------------------------------------------------------------*/ -#include "stm32469i_discovery.h" - -/** @addtogroup BSP - * @{ - */ - -/** @addtogroup STM32469I-Discovery - * @{ - */ - -/** @addtogroup STM32469I-Discovery_EEPROM - * @brief This file includes the I2C EEPROM driver of STM32469I-Discovery board. - * @{ - */ - -/** @defgroup STM32469I-Discovery_EEPROM_Exported_Types STM32469I Discovery EEPROM Exported Types - * @{ - */ -/** - * @} - */ - -/** @defgroup STM32469I-Discovery_EEPROM_Exported_Constants STM32469I-Discovery EEPROM Exported Constants - * @{ - */ -/* EEPROM hardware address and page size */ -#define EEPROM_PAGESIZE ((uint8_t)4) -#define EEPROM_MAX_SIZE ((uint16_t)0x2000) /* 64Kbit */ - -/* Maximum Timeout values for flags and events waiting loops. -This timeout is based on systick set to 1ms*/ -/* Timeout for read based if read all the EEPROM : EEPROM_MAX_SIZE * I2C_SPEED (640ms) */ -#define EEPROM_READ_TIMEOUT ((uint32_t)(1000)) -/* Timeout for write based on max write which is EEPROM_PAGESIZE bytes: EEPROM_PAGESIZE * I2C_SPEED (320us) */ -#define EEPROM_WRITE_TIMEOUT ((uint32_t)(10)) - -/* Maximum number of trials for EEPROM_WaitEepromStandbyState() function */ -#define EEPROM_MAX_TRIALS 3000 - -#define EEPROM_OK 0 -#define EEPROM_FAIL 1 -#define EEPROM_TIMEOUT 2 -/** - * @} - */ - -/** @defgroup STM32469I-Discovery_EEPROM_Exported_Macros STM32469I-Discovery EEPROM Exported Macros - * @{ - */ -/** - * @} - */ - -/** @defgroup STM32469I-Discovery_EEPROM_Exported_Functions STM32469I-Discovery_EEPROM Exported Functions - * @{ - */ -uint32_t BSP_EEPROM_Init(void); -uint8_t BSP_EEPROM_DeInit(void); -uint32_t BSP_EEPROM_ReadBuffer(uint8_t* pBuffer, uint16_t ReadAddr, uint16_t* NumByteToRead); -uint32_t BSP_EEPROM_WritePage(uint8_t* pBuffer, uint16_t WriteAddr, uint8_t* NumByteToWrite); -uint32_t BSP_EEPROM_WriteBuffer(uint8_t* pBuffer, uint16_t WriteAddr, uint16_t NumByteToWrite); -uint32_t BSP_EEPROM_WaitEepromStandbyState(void); - -/* USER Callbacks: This function is declared as __weak in EEPROM driver and - should be implemented into user application. - BSP_EEPROM_TIMEOUT_UserCallback() function is called whenever a timeout condition - occure during communication (waiting on an event that doesn't occur, bus - errors, busy devices ...). */ -void BSP_EEPROM_TIMEOUT_UserCallback(void); - -/* Link function for I2C EEPROM peripheral */ -void EEPROM_IO_Init(void); -HAL_StatusTypeDef EEPROM_IO_WriteData(uint16_t DevAddress, uint16_t MemAddress, uint8_t *pBuffer, uint32_t BufferSize); -HAL_StatusTypeDef EEPROM_IO_ReadData(uint16_t DevAddress, uint16_t MemAddress, uint8_t *pBuffer, uint32_t BufferSize); -HAL_StatusTypeDef EEPROM_IO_IsDeviceReady(uint16_t DevAddress, uint32_t Trials); - -/** - * @} - */ - -/** - * @} - */ - -/** - * @} - */ - -/** - * @} - */ - -#ifdef __cplusplus -} -#endif - -#endif /* __STM32F469I_DISCOVERY_EEPROM_H */ - -/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
--- a/stm32469i_discovery/stm32469i_discovery_lcd.c Mon May 30 11:09:05 2016 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1649 +0,0 @@ -/** - ****************************************************************************** - * @file stm32469i_discovery_lcd.c - * @author MCD Application Team - * @version V1.0.1 - * @date 29-September-2015 - * @brief This file includes the driver for Liquid Crystal Display (LCD) module - * mounted on STM32469I-Discovery evaluation board. - ****************************************************************************** - * @attention - * - * <h2><center>© COPYRIGHT(c) 2015 STMicroelectronics</center></h2> - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. Neither the name of STMicroelectronics nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - ****************************************************************************** - */ - -/* File Info: ------------------------------------------------------------------ - User NOTES -1. How To use this driver: --------------------------- - - This driver is used to drive directly in video mode a LCD TFT using the DSI interface. - The following IPs are implied : DSI Host IP block working - in conjunction to the LTDC controller. - - This driver is linked by construction to LCD KoD mounted on board MB1166. - -2. Driver description: ---------------------- - + Initialization steps: - o Initialize the LCD using the BSP_LCD_Init() function. - o Select the LCD layer to be used using the BSP_LCD_SelectLayer() function. - o Enable the LCD display using the BSP_LCD_DisplayOn() function. - - + Options - o Configure and enable the color keying functionality using the - BSP_LCD_SetColorKeying() function. - o Modify in the fly the transparency and/or the frame buffer address - using the following functions: - - BSP_LCD_SetTransparency() - - BSP_LCD_SetLayerAddress() - - + Display on LCD - o Clear the whole LCD using BSP_LCD_Clear() function or only one specified string - line using the BSP_LCD_ClearStringLine() function. - o Display a character on the specified line and column using the BSP_LCD_DisplayChar() - function or a complete string line using the BSP_LCD_DisplayStringAtLine() function. - o Display a string line on the specified position (x,y in pixel) and align mode - using the BSP_LCD_DisplayStringAtLine() function. - o Draw and fill a basic shapes (dot, line, rectangle, circle, ellipse, .. bitmap) - on LCD using the available set of functions. - -------------------------------------------------------------------------------*/ - -/* Includes ------------------------------------------------------------------*/ -#include "stm32469i_discovery_lcd.h" -#include "../Fonts/fonts.h" -//#include "../../../Utilities/Fonts/font24.c" -//#include "../../../Utilities/Fonts/font20.c" -//#include "../../../Utilities/Fonts/font16.c" -//#include "../../../Utilities/Fonts/font12.c" -//#include "../../../Utilities/Fonts/font8.c" - -/** @addtogroup BSP - * @{ - */ - -/** @addtogroup STM32469I-Discovery - * @{ - */ - -/** @addtogroup STM32469I-Discovery_LCD - * @{ - */ - -/** @defgroup STM32469I-Discovery_LCD_Private_TypesDefinitions LCD Private TypesDefinitions - * @{ - */ -static DSI_VidCfgTypeDef hdsivideo_handle; - -/** - * @} - */ - -/** @defgroup STM32469I-Discovery_LCD_Private_Defines LCD Private Defines - * @{ - */ -/** - * @} - */ - -/** @defgroup STM32469I-Discovery_LCD_Private_Macros LCD Private Macros - * @{ - */ -#define ABS(X) ((X) > 0 ? (X) : -(X)) - -#define POLY_X(Z) ((int32_t)((Points + (Z))->X)) -#define POLY_Y(Z) ((int32_t)((Points + (Z))->Y)) -/** - * @} - */ - -/** @defgroup STM32469I-Discovery_LCD_Exported_Variables STM32469I Discovery LCD Exported Variables - * @{ - */ - -/** - * @} - */ - - -/** @defgroup STM32469I-Discovery_LCD_Private_Variables LCD Private Variables - * @{ - */ - -DMA2D_HandleTypeDef hdma2d_eval; -LTDC_HandleTypeDef hltdc_eval; -DSI_HandleTypeDef hdsi_eval; -uint32_t lcd_x_size = OTM8009A_800X480_WIDTH; -uint32_t lcd_y_size = OTM8009A_800X480_HEIGHT; - -/** - * @} - */ - - -/** @defgroup STM32469I-Discovery_LCD_Private_Variables LCD Private Variables - * @{ - */ - -/** - * @brief Default Active LTDC Layer in which drawing is made is LTDC Layer Background - */ -static uint32_t ActiveLayer = LTDC_ACTIVE_LAYER_BACKGROUND; - -/** - * @brief Current Drawing Layer properties variable - */ -static LCD_DrawPropTypeDef DrawProp[LTDC_MAX_LAYER_NUMBER]; -/** - * @} - */ - -/** @defgroup STM32469I-Discovery_LCD_Private_FunctionPrototypes LCD Private FunctionPrototypes - * @{ - */ -static void DrawChar(uint16_t Xpos, uint16_t Ypos, const uint8_t *c); -static void FillTriangle(uint16_t x1, uint16_t x2, uint16_t x3, uint16_t y1, uint16_t y2, uint16_t y3); -static void LL_FillBuffer(uint32_t LayerIndex, void *pDst, uint32_t xSize, uint32_t ySize, uint32_t OffLine, uint32_t ColorIndex); -static void LL_ConvertLineToARGB8888(void * pSrc, void *pDst, uint32_t xSize, uint32_t ColorMode); -/** - * @} - */ - -/** @defgroup STM32469I-Discovery_LCD_Exported_Functions LCD Exported Functions - * @{ - */ - -/** - * @brief Initializes the DSI LCD. - * @param None - * @retval LCD state - */ -uint8_t BSP_LCD_Init(void) -{ - return (BSP_LCD_InitEx(LCD_ORIENTATION_LANDSCAPE)); -} - -/** - * @brief Initializes the DSI LCD. - * The ititialization is done as below: - * - DSI PLL ititialization - * - DSI ititialization - * - LTDC ititialization - * - OTM8009A LCD Display IC Driver ititialization - * @param None - * @retval LCD state - */ -uint8_t BSP_LCD_InitEx(LCD_OrientationTypeDef orientation) -{ - DSI_PLLInitTypeDef dsiPllInit; - static RCC_PeriphCLKInitTypeDef PeriphClkInitStruct; - uint32_t LcdClock = 27429; /*!< LcdClk = 27429 kHz */ - uint32_t Clockratio = 0; - uint32_t laneByteClk_kHz = 0; - uint32_t VSA; /*!< Vertical start active time in units of lines */ - uint32_t VBP; /*!< Vertical Back Porch time in units of lines */ - uint32_t VFP; /*!< Vertical Front Porch time in units of lines */ - uint32_t VACT; /*!< Vertical Active time in units of lines = imageSize Y in pixels to display */ - uint32_t HSA; /*!< Horizontal start active time in units of lcdClk */ - uint32_t HBP; /*!< Horizontal Back Porch time in units of lcdClk */ - uint32_t HFP; /*!< Horizontal Front Porch time in units of lcdClk */ - uint32_t HACT; /*!< Horizontal Active time in units of lcdClk = imageSize X in pixels to display */ - - - /* Toggle Hardware Reset of the DSI LCD using - * its XRES signal (active low) */ - BSP_LCD_Reset(); - - /* Call first MSP Initialize only in case of first initialization - * This will set IP blocks LTDC, DSI and DMA2D - * - out of reset - * - clocked - * - NVIC IRQ related to IP blocks enabled - */ - BSP_LCD_MspInit(); - -/*************************DSI Initialization***********************************/ - - /* Base address of DSI Host/Wrapper registers to be set before calling De-Init */ - hdsi_eval.Instance = DSI; - - HAL_DSI_DeInit(&(hdsi_eval)); - -#if !defined(USE_STM32469I_DISCO_REVA) - dsiPllInit.PLLNDIV = 125; - dsiPllInit.PLLIDF = DSI_PLL_IN_DIV2; - dsiPllInit.PLLODF = DSI_PLL_OUT_DIV1; -#else - dsiPllInit.PLLNDIV = 100; - dsiPllInit.PLLIDF = DSI_PLL_IN_DIV5; - dsiPllInit.PLLODF = DSI_PLL_OUT_DIV1; -#endif - laneByteClk_kHz = 62500; /* 500 MHz / 8 = 62.5 MHz = 62500 kHz */ - - /* Set number of Lanes */ - hdsi_eval.Init.NumberOfLanes = DSI_TWO_DATA_LANES; - - /* TXEscapeCkdiv = f(LaneByteClk)/15.62 = 4 */ - hdsi_eval.Init.TXEscapeCkdiv = laneByteClk_kHz/15620; - - HAL_DSI_Init(&(hdsi_eval), &(dsiPllInit)); - Clockratio = laneByteClk_kHz/LcdClock; - /* Timing parameters for all Video modes - * Set Timing parameters of LTDC depending on its chosen orientation - */ - if(orientation == LCD_ORIENTATION_PORTRAIT) - { - VSA = OTM8009A_480X800_HSYNC; - VBP = OTM8009A_480X800_HBP; - VFP = OTM8009A_480X800_HFP; - HSA = OTM8009A_480X800_VSYNC; - HBP = OTM8009A_480X800_VBP; - HFP = OTM8009A_480X800_VFP; - lcd_x_size = OTM8009A_480X800_WIDTH; /* 480 */ - lcd_y_size = OTM8009A_480X800_HEIGHT; /* 800 */ - } - else - { - /* lcd_orientation == LCD_ORIENTATION_LANDSCAPE */ - VSA = OTM8009A_800X480_VSYNC; /* 12 */ - VBP = OTM8009A_800X480_VBP; /* 12 */ - VFP = OTM8009A_800X480_VFP; /* 12 */ - HSA = OTM8009A_800X480_HSYNC; /* 120 */ - HBP = OTM8009A_800X480_HBP; /* 120 */ - HFP = OTM8009A_800X480_HFP; /* 120 */ - lcd_x_size = OTM8009A_800X480_WIDTH; /* 800 */ - lcd_y_size = OTM8009A_800X480_HEIGHT; /* 480 */ - } - - HACT = lcd_x_size; - VACT = lcd_y_size; - - - hdsivideo_handle.VirtualChannelID = LCD_OTM8009A_ID; - hdsivideo_handle.ColorCoding = LCD_DSI_PIXEL_DATA_FMT_RBG888; - hdsivideo_handle.VSPolarity = DSI_VSYNC_ACTIVE_HIGH; - hdsivideo_handle.HSPolarity = DSI_HSYNC_ACTIVE_HIGH; - hdsivideo_handle.DEPolarity = DSI_DATA_ENABLE_ACTIVE_HIGH; - hdsivideo_handle.Mode = DSI_VID_MODE_BURST; /* Mode Video burst ie : one LgP per line */ - hdsivideo_handle.NullPacketSize = 0xFFF; - hdsivideo_handle.NumberOfChunks = 0; - hdsivideo_handle.PacketSize = HACT; /* Value depending on display orientation choice portrait/landscape */ - hdsivideo_handle.HorizontalSyncActive = HSA*Clockratio; - hdsivideo_handle.HorizontalBackPorch = HBP*Clockratio; - hdsivideo_handle.HorizontalLine = (HACT + HSA + HBP + HFP)*Clockratio; /* Value depending on display orientation choice portrait/landscape */ - hdsivideo_handle.VerticalSyncActive = VSA; - hdsivideo_handle.VerticalBackPorch = VBP; - hdsivideo_handle.VerticalFrontPorch = VFP; - hdsivideo_handle.VerticalActive = VACT; /* Value depending on display orientation choice portrait/landscape */ - - /* Enable or disable sending LP command while streaming is active in video mode */ - hdsivideo_handle.LPCommandEnable = DSI_LP_COMMAND_ENABLE; /* Enable sending commands in mode LP (Low Power) */ - - /* Largest packet size possible to transmit in LP mode in VSA, VBP, VFP regions */ - /* Only useful when sending LP packets is allowed while streaming is active in video mode */ - hdsivideo_handle.LPLargestPacketSize = 64; - - /* Largest packet size possible to transmit in LP mode in HFP region during VACT period */ - /* Only useful when sending LP packets is allowed while streaming is active in video mode */ - hdsivideo_handle.LPVACTLargestPacketSize = 64; - - - /* Specify for each region of the video frame, if the transmission of command in LP mode is allowed in this region */ - /* while streaming is active in video mode */ - hdsivideo_handle.LPHorizontalFrontPorchEnable = DSI_LP_HFP_ENABLE; /* Allow sending LP commands during HFP period */ - hdsivideo_handle.LPHorizontalBackPorchEnable = DSI_LP_HBP_ENABLE; /* Allow sending LP commands during HBP period */ - hdsivideo_handle.LPVerticalActiveEnable = DSI_LP_VACT_ENABLE; /* Allow sending LP commands during VACT period */ - hdsivideo_handle.LPVerticalFrontPorchEnable = DSI_LP_VFP_ENABLE; /* Allow sending LP commands during VFP period */ - hdsivideo_handle.LPVerticalBackPorchEnable = DSI_LP_VBP_ENABLE; /* Allow sending LP commands during VBP period */ - hdsivideo_handle.LPVerticalSyncActiveEnable = DSI_LP_VSYNC_ENABLE; /* Allow sending LP commands during VSync = VSA period */ - - /* Configure DSI Video mode timings with settings set above */ - HAL_DSI_ConfigVideoMode(&(hdsi_eval), &(hdsivideo_handle)); - - /* Enable the DSI host and wrapper : but LTDC is not started yet at this stage */ - HAL_DSI_Start(&(hdsi_eval)); -/*************************End DSI Initialization*******************************/ - - -/************************LTDC Initialization***********************************/ - - /* Timing Configuration */ - hltdc_eval.Init.HorizontalSync = (HSA - 1); - hltdc_eval.Init.AccumulatedHBP = (HSA + HBP - 1); - hltdc_eval.Init.AccumulatedActiveW = (lcd_x_size + HSA + HBP - 1); - hltdc_eval.Init.TotalWidth = (lcd_x_size + HSA + HBP + HFP - 1); - - /* Initialize the LCD pixel width and pixel height */ - hltdc_eval.LayerCfg->ImageWidth = lcd_x_size; - hltdc_eval.LayerCfg->ImageHeight = lcd_y_size; - - - /* LCD clock configuration */ - /* PLLSAI_VCO Input = HSE_VALUE/PLL_M = 1 Mhz */ - /* PLLSAI_VCO Output = PLLSAI_VCO Input * PLLSAIN = 384 Mhz */ - /* PLLLCDCLK = PLLSAI_VCO Output/PLLSAIR = 384 MHz / 7 = 54.857 MHz */ - /* LTDC clock frequency = PLLLCDCLK / LTDC_PLLSAI_DIVR_2 = 54.857 MHz / 2 = 27.429 MHz */ - PeriphClkInitStruct.PeriphClockSelection = RCC_PERIPHCLK_LTDC; - PeriphClkInitStruct.PLLSAI.PLLSAIN = 384; - PeriphClkInitStruct.PLLSAI.PLLSAIR = 7; - PeriphClkInitStruct.PLLSAIDivR = RCC_PLLSAIDIVR_2; - HAL_RCCEx_PeriphCLKConfig(&PeriphClkInitStruct); - - /* Background value */ - hltdc_eval.Init.Backcolor.Blue = 0; - hltdc_eval.Init.Backcolor.Green = 0; - hltdc_eval.Init.Backcolor.Red = 0; - hltdc_eval.Init.PCPolarity = LTDC_PCPOLARITY_IPC; - hltdc_eval.Instance = LTDC; - - /* Get LTDC Configuration from DSI Configuration */ - HAL_LTDC_StructInitFromVideoConfig(&(hltdc_eval), &(hdsivideo_handle)); - - /* Initialize the LTDC */ - HAL_LTDC_Init(&hltdc_eval); - -#if !defined(DATA_IN_ExtSDRAM) - /* Initialize the SDRAM */ - BSP_SDRAM_Init(); -#endif /* DATA_IN_ExtSDRAM */ - - /* Initialize the font */ - BSP_LCD_SetFont(&LCD_DEFAULT_FONT); - -/************************End LTDC Initialization*******************************/ - - -/***********************OTM8009A Initialization********************************/ - - /* Initialize the OTM8009A LCD Display IC Driver (KoD LCD IC Driver) - * depending on configuration set in 'hdsivideo_handle'. - */ - OTM8009A_Init(hdsivideo_handle.ColorCoding, orientation); - -/***********************End OTM8009A Initialization****************************/ - - return LCD_OK; -} - -/** - * @brief BSP LCD Reset - * Hw reset the LCD DSI activating its XRES signal (active low for some time) - * and desactivating it later. - * This signal is only cabled on Discovery Rev B and beyond. - */ -void BSP_LCD_Reset(void) -{ -#if !defined(USE_STM32469I_DISCO_REVA) -/* EVAL Rev B and beyond : reset the LCD by activation of XRES (active low) connected to PH7 */ - GPIO_InitTypeDef gpio_init_structure; - - __HAL_RCC_GPIOH_CLK_ENABLE(); - - /* Configure the GPIO on PH7 */ - gpio_init_structure.Pin = GPIO_PIN_7; - gpio_init_structure.Mode = GPIO_MODE_OUTPUT_OD; - gpio_init_structure.Pull = GPIO_NOPULL; - gpio_init_structure.Speed = GPIO_SPEED_HIGH; - - HAL_GPIO_Init(GPIOH, &gpio_init_structure); - - /* Activate XRES active low */ - HAL_GPIO_WritePin(GPIOH, GPIO_PIN_7, GPIO_PIN_RESET); - - //HAL_Delay(20); /* wait 20 ms */ - wait_ms(20); - - /* Desactivate XRES */ - HAL_GPIO_WritePin(GPIOH, GPIO_PIN_7, GPIO_PIN_SET); - - /* Wait for 10ms after releasing XRES before sending commands */ - //HAL_Delay(10); - wait_ms(10); -#else - -#endif /* USE_STM32469I_DISCO_REVA == 0 */ -} - -/** - * @brief Gets the LCD X size. - * @retval Used LCD X size - */ -uint32_t BSP_LCD_GetXSize(void) -{ - return (lcd_x_size); -} - -/** - * @brief Gets the LCD Y size. - * @retval Used LCD Y size - */ -uint32_t BSP_LCD_GetYSize(void) -{ - return (lcd_y_size); -} - -/** - * @brief Set the LCD X size. - * @param imageWidthPixels : uint32_t image width in pixels unit - * @retval None - */ -void BSP_LCD_SetXSize(uint32_t imageWidthPixels) -{ - hltdc_eval.LayerCfg[ActiveLayer].ImageWidth = imageWidthPixels; -} - -/** - * @brief Set the LCD Y size. - * @param imageHeightPixels : uint32_t image height in lines unit - */ -void BSP_LCD_SetYSize(uint32_t imageHeightPixels) -{ - hltdc_eval.LayerCfg[ActiveLayer].ImageHeight = imageHeightPixels; -} - - -/** - * @brief Initializes the LCD layers. - * @param LayerIndex: Layer foreground or background - * @param FB_Address: Layer frame buffer - * @retval None - */ -void BSP_LCD_LayerDefaultInit(uint16_t LayerIndex, uint32_t FB_Address) -{ - LCD_LayerCfgTypeDef Layercfg; - - /* Layer Init */ - Layercfg.WindowX0 = 0; - Layercfg.WindowX1 = BSP_LCD_GetXSize(); - Layercfg.WindowY0 = 0; - Layercfg.WindowY1 = BSP_LCD_GetYSize(); - Layercfg.PixelFormat = LTDC_PIXEL_FORMAT_ARGB8888; - Layercfg.FBStartAdress = FB_Address; - Layercfg.Alpha = 255; - Layercfg.Alpha0 = 0; - Layercfg.Backcolor.Blue = 0; - Layercfg.Backcolor.Green = 0; - Layercfg.Backcolor.Red = 0; - Layercfg.BlendingFactor1 = LTDC_BLENDING_FACTOR1_PAxCA; - Layercfg.BlendingFactor2 = LTDC_BLENDING_FACTOR2_PAxCA; - Layercfg.ImageWidth = BSP_LCD_GetXSize(); - Layercfg.ImageHeight = BSP_LCD_GetYSize(); - - HAL_LTDC_ConfigLayer(&hltdc_eval, &Layercfg, LayerIndex); - - DrawProp[LayerIndex].BackColor = LCD_COLOR_WHITE; - DrawProp[LayerIndex].pFont = &Font24; - DrawProp[LayerIndex].TextColor = LCD_COLOR_BLACK; -} - - -/** - * @brief Selects the LCD Layer. - * @param LayerIndex: Layer foreground or background - */ -void BSP_LCD_SelectLayer(uint32_t LayerIndex) -{ - ActiveLayer = LayerIndex; -} - -/** - * @brief Sets an LCD Layer visible - * @param LayerIndex: Visible Layer - * @param State: New state of the specified layer - * This parameter can be one of the following values: - * @arg ENABLE - * @arg DISABLE - */ -void BSP_LCD_SetLayerVisible(uint32_t LayerIndex, FunctionalState State) -{ - if(State == ENABLE) - { - __HAL_LTDC_LAYER_ENABLE(&(hltdc_eval), LayerIndex); - } - else - { - __HAL_LTDC_LAYER_DISABLE(&(hltdc_eval), LayerIndex); - } - __HAL_LTDC_RELOAD_CONFIG(&(hltdc_eval)); - -} - -/** - * @brief Configures the transparency. - * @param LayerIndex: Layer foreground or background. - * @param Transparency: Transparency - * This parameter must be a number between Min_Data = 0x00 and Max_Data = 0xFF - */ -void BSP_LCD_SetTransparency(uint32_t LayerIndex, uint8_t Transparency) -{ - - HAL_LTDC_SetAlpha(&(hltdc_eval), Transparency, LayerIndex); - -} - -/** - * @brief Sets an LCD layer frame buffer address. - * @param LayerIndex: Layer foreground or background - * @param Address: New LCD frame buffer value - */ -void BSP_LCD_SetLayerAddress(uint32_t LayerIndex, uint32_t Address) -{ - - HAL_LTDC_SetAddress(&(hltdc_eval), Address, LayerIndex); - -} - -/** - * @brief Sets display window. - * @param LayerIndex: Layer index - * @param Xpos: LCD X position - * @param Ypos: LCD Y position - * @param Width: LCD window width - * @param Height: LCD window height - */ -void BSP_LCD_SetLayerWindow(uint16_t LayerIndex, uint16_t Xpos, uint16_t Ypos, uint16_t Width, uint16_t Height) -{ - /* Reconfigure the layer size */ - HAL_LTDC_SetWindowSize(&(hltdc_eval), Width, Height, LayerIndex); - - /* Reconfigure the layer position */ - HAL_LTDC_SetWindowPosition(&(hltdc_eval), Xpos, Ypos, LayerIndex); - -} - -/** - * @brief Configures and sets the color keying. - * @param LayerIndex: Layer foreground or background - * @param RGBValue: Color reference - */ -void BSP_LCD_SetColorKeying(uint32_t LayerIndex, uint32_t RGBValue) -{ - /* Configure and Enable the color Keying for LCD Layer */ - HAL_LTDC_ConfigColorKeying(&(hltdc_eval), RGBValue, LayerIndex); - HAL_LTDC_EnableColorKeying(&(hltdc_eval), LayerIndex); -} - -/** - * @brief Disables the color keying. - * @param LayerIndex: Layer foreground or background - */ -void BSP_LCD_ResetColorKeying(uint32_t LayerIndex) -{ - /* Disable the color Keying for LCD Layer */ - HAL_LTDC_DisableColorKeying(&(hltdc_eval), LayerIndex); -} - -/** - * @brief Sets the LCD text color. - * @param Color: Text color code ARGB(8-8-8-8) - */ -void BSP_LCD_SetTextColor(uint32_t Color) -{ - DrawProp[ActiveLayer].TextColor = Color; -} - -/** - * @brief Gets the LCD text color. - * @retval Used text color. - */ -uint32_t BSP_LCD_GetTextColor(void) -{ - return DrawProp[ActiveLayer].TextColor; -} - -/** - * @brief Sets the LCD background color. - * @param Color: Layer background color code ARGB(8-8-8-8) - */ -void BSP_LCD_SetBackColor(uint32_t Color) -{ - DrawProp[ActiveLayer].BackColor = Color; -} - -/** - * @brief Gets the LCD background color. - * @retval Used background color - */ -uint32_t BSP_LCD_GetBackColor(void) -{ - return DrawProp[ActiveLayer].BackColor; -} - -/** - * @brief Sets the LCD text font. - * @param fonts: Layer font to be used - */ -void BSP_LCD_SetFont(sFONT *fonts) -{ - DrawProp[ActiveLayer].pFont = fonts; -} - -/** - * @brief Gets the LCD text font. - * @retval Used layer font - */ -sFONT *BSP_LCD_GetFont(void) -{ - return DrawProp[ActiveLayer].pFont; -} - -/** - * @brief Reads an LCD pixel. - * @param Xpos: X position - * @param Ypos: Y position - * @retval RGB pixel color - */ -uint32_t BSP_LCD_ReadPixel(uint16_t Xpos, uint16_t Ypos) -{ - uint32_t ret = 0; - - if(hltdc_eval.LayerCfg[ActiveLayer].PixelFormat == LTDC_PIXEL_FORMAT_ARGB8888) - { - /* Read data value from SDRAM memory */ - ret = *(__IO uint32_t*) (hltdc_eval.LayerCfg[ActiveLayer].FBStartAdress + (2*(Ypos*BSP_LCD_GetXSize() + Xpos))); - } - else if(hltdc_eval.LayerCfg[ActiveLayer].PixelFormat == LTDC_PIXEL_FORMAT_RGB888) - { - /* Read data value from SDRAM memory */ - ret = (*(__IO uint32_t*) (hltdc_eval.LayerCfg[ActiveLayer].FBStartAdress + (2*(Ypos*BSP_LCD_GetXSize() + Xpos))) & 0x00FFFFFF); - } - else if((hltdc_eval.LayerCfg[ActiveLayer].PixelFormat == LTDC_PIXEL_FORMAT_RGB565) || \ - (hltdc_eval.LayerCfg[ActiveLayer].PixelFormat == LTDC_PIXEL_FORMAT_ARGB4444) || \ - (hltdc_eval.LayerCfg[ActiveLayer].PixelFormat == LTDC_PIXEL_FORMAT_AL88)) - { - /* Read data value from SDRAM memory */ - ret = *(__IO uint16_t*) (hltdc_eval.LayerCfg[ActiveLayer].FBStartAdress + (2*(Ypos*BSP_LCD_GetXSize() + Xpos))); - } - else - { - /* Read data value from SDRAM memory */ - ret = *(__IO uint8_t*) (hltdc_eval.LayerCfg[ActiveLayer].FBStartAdress + (2*(Ypos*BSP_LCD_GetXSize() + Xpos))); - } - - return ret; -} - -/** - * @brief Clears the whole currently active layer of LTDC. - * @param Color: Color of the background - */ -void BSP_LCD_Clear(uint32_t Color) -{ - /* Clear the LCD */ - LL_FillBuffer(ActiveLayer, (uint32_t *)(hltdc_eval.LayerCfg[ActiveLayer].FBStartAdress), BSP_LCD_GetXSize(), BSP_LCD_GetYSize(), 0, Color); -} - -/** - * @brief Clears the selected line in currently active layer. - * @param Line: Line to be cleared - */ -void BSP_LCD_ClearStringLine(uint32_t Line) -{ - uint32_t color_backup = DrawProp[ActiveLayer].TextColor; - DrawProp[ActiveLayer].TextColor = DrawProp[ActiveLayer].BackColor; - - /* Draw rectangle with background color */ - BSP_LCD_FillRect(0, (Line * DrawProp[ActiveLayer].pFont->Height), BSP_LCD_GetXSize(), DrawProp[ActiveLayer].pFont->Height); - - DrawProp[ActiveLayer].TextColor = color_backup; - BSP_LCD_SetTextColor(DrawProp[ActiveLayer].TextColor); -} - -/** - * @brief Displays one character in currently active layer. - * @param Xpos: Start column address - * @param Ypos: Line where to display the character shape. - * @param Ascii: Character ascii code - * This parameter must be a number between Min_Data = 0x20 and Max_Data = 0x7E - */ -void BSP_LCD_DisplayChar(uint16_t Xpos, uint16_t Ypos, uint8_t Ascii) -{ - DrawChar(Xpos, Ypos, &DrawProp[ActiveLayer].pFont->table[(Ascii-' ') *\ - DrawProp[ActiveLayer].pFont->Height * ((DrawProp[ActiveLayer].pFont->Width + 7) / 8)]); -} - -/** - * @brief Displays characters in currently active layer. - * @param Xpos: X position (in pixel) - * @param Ypos: Y position (in pixel) - * @param Text: Pointer to string to display on LCD - * @param Mode: Display mode - * This parameter can be one of the following values: - * @arg CENTER_MODE - * @arg RIGHT_MODE - * @arg LEFT_MODE - */ -void BSP_LCD_DisplayStringAt(uint16_t Xpos, uint16_t Ypos, uint8_t *Text, Text_AlignModeTypdef Mode) -{ - uint16_t refcolumn = 1, i = 0; - uint32_t size = 0, xsize = 0; - uint8_t *ptr = Text; - - /* Get the text size */ - while (*ptr++) size ++ ; - - /* Characters number per line */ - xsize = (BSP_LCD_GetXSize()/DrawProp[ActiveLayer].pFont->Width); - - switch (Mode) - { - case CENTER_MODE: - { - refcolumn = Xpos + ((xsize - size)* DrawProp[ActiveLayer].pFont->Width) / 2; - break; - } - case LEFT_MODE: - { - refcolumn = Xpos; - break; - } - case RIGHT_MODE: - { - refcolumn = - Xpos + ((xsize - size)*DrawProp[ActiveLayer].pFont->Width); - break; - } - default: - { - refcolumn = Xpos; - break; - } - } - - /* Check that the Start column is located in the screen */ - if ((refcolumn < 1) || (refcolumn >= 0x8000)) - { - refcolumn = 1; - } - - /* Send the string character by character on LCD */ - while ((*Text != 0) & (((BSP_LCD_GetXSize() - (i*DrawProp[ActiveLayer].pFont->Width)) & 0xFFFF) >= DrawProp[ActiveLayer].pFont->Width)) - { - /* Display one character on LCD */ - BSP_LCD_DisplayChar(refcolumn, Ypos, *Text); - /* Decrement the column position by 16 */ - refcolumn += DrawProp[ActiveLayer].pFont->Width; - - /* Point on the next character */ - Text++; - i++; - } - -} - -/** - * @brief Displays a maximum of 60 characters on the LCD. - * @param Line: Line where to display the character shape - * @param ptr: Pointer to string to display on LCD - */ -void BSP_LCD_DisplayStringAtLine(uint16_t Line, uint8_t *ptr) -{ - BSP_LCD_DisplayStringAt(0, LINE(Line), ptr, LEFT_MODE); -} - -/** - * @brief Draws an horizontal line in currently active layer. - * @param Xpos: X position - * @param Ypos: Y position - * @param Length: Line length - */ -void BSP_LCD_DrawHLine(uint16_t Xpos, uint16_t Ypos, uint16_t Length) -{ - uint32_t Xaddress = 0; - - /* Get the line address */ - Xaddress = (hltdc_eval.LayerCfg[ActiveLayer].FBStartAdress) + 4*(BSP_LCD_GetXSize()*Ypos + Xpos); - - /* Write line */ - LL_FillBuffer(ActiveLayer, (uint32_t *)Xaddress, Length, 1, 0, DrawProp[ActiveLayer].TextColor); -} - -/** - * @brief Draws a vertical line in currently active layer. - * @param Xpos: X position - * @param Ypos: Y position - * @param Length: Line length - */ -void BSP_LCD_DrawVLine(uint16_t Xpos, uint16_t Ypos, uint16_t Length) -{ - uint32_t Xaddress = 0; - - /* Get the line address */ - Xaddress = (hltdc_eval.LayerCfg[ActiveLayer].FBStartAdress) + 4*(BSP_LCD_GetXSize()*Ypos + Xpos); - - /* Write line */ - LL_FillBuffer(ActiveLayer, (uint32_t *)Xaddress, 1, Length, (BSP_LCD_GetXSize() - 1), DrawProp[ActiveLayer].TextColor); -} - -/** - * @brief Draws an uni-line (between two points) in currently active layer. - * @param x1: Point 1 X position - * @param y1: Point 1 Y position - * @param x2: Point 2 X position - * @param y2: Point 2 Y position - */ -void BSP_LCD_DrawLine(uint16_t x1, uint16_t y1, uint16_t x2, uint16_t y2) -{ - int16_t deltax = 0, deltay = 0, x = 0, y = 0, xinc1 = 0, xinc2 = 0, - yinc1 = 0, yinc2 = 0, den = 0, num = 0, numadd = 0, numpixels = 0, - curpixel = 0; - - deltax = ABS(x2 - x1); /* The difference between the x's */ - deltay = ABS(y2 - y1); /* The difference between the y's */ - x = x1; /* Start x off at the first pixel */ - y = y1; /* Start y off at the first pixel */ - - if (x2 >= x1) /* The x-values are increasing */ - { - xinc1 = 1; - xinc2 = 1; - } - else /* The x-values are decreasing */ - { - xinc1 = -1; - xinc2 = -1; - } - - if (y2 >= y1) /* The y-values are increasing */ - { - yinc1 = 1; - yinc2 = 1; - } - else /* The y-values are decreasing */ - { - yinc1 = -1; - yinc2 = -1; - } - - if (deltax >= deltay) /* There is at least one x-value for every y-value */ - { - xinc1 = 0; /* Don't change the x when numerator >= denominator */ - yinc2 = 0; /* Don't change the y for every iteration */ - den = deltax; - num = deltax / 2; - numadd = deltay; - numpixels = deltax; /* There are more x-values than y-values */ - } - else /* There is at least one y-value for every x-value */ - { - xinc2 = 0; /* Don't change the x for every iteration */ - yinc1 = 0; /* Don't change the y when numerator >= denominator */ - den = deltay; - num = deltay / 2; - numadd = deltax; - numpixels = deltay; /* There are more y-values than x-values */ - } - - for (curpixel = 0; curpixel <= numpixels; curpixel++) - { - BSP_LCD_DrawPixel(x, y, DrawProp[ActiveLayer].TextColor); /* Draw the current pixel */ - num += numadd; /* Increase the numerator by the top of the fraction */ - if (num >= den) /* Check if numerator >= denominator */ - { - num -= den; /* Calculate the new numerator value */ - x += xinc1; /* Change the x as appropriate */ - y += yinc1; /* Change the y as appropriate */ - } - x += xinc2; /* Change the x as appropriate */ - y += yinc2; /* Change the y as appropriate */ - } -} - -/** - * @brief Draws a rectangle in currently active layer. - * @param Xpos: X position - * @param Ypos: Y position - * @param Width: Rectangle width - * @param Height: Rectangle height - */ -void BSP_LCD_DrawRect(uint16_t Xpos, uint16_t Ypos, uint16_t Width, uint16_t Height) -{ - /* Draw horizontal lines */ - BSP_LCD_DrawHLine(Xpos, Ypos, Width); - BSP_LCD_DrawHLine(Xpos, (Ypos+ Height), Width); - - /* Draw vertical lines */ - BSP_LCD_DrawVLine(Xpos, Ypos, Height); - BSP_LCD_DrawVLine((Xpos + Width), Ypos, Height); -} - -/** - * @brief Draws a circle in currently active layer. - * @param Xpos: X position - * @param Ypos: Y position - * @param Radius: Circle radius - */ -void BSP_LCD_DrawCircle(uint16_t Xpos, uint16_t Ypos, uint16_t Radius) -{ - int32_t D; /* Decision Variable */ - uint32_t CurX; /* Current X Value */ - uint32_t CurY; /* Current Y Value */ - - D = 3 - (Radius << 1); - CurX = 0; - CurY = Radius; - - while (CurX <= CurY) - { - BSP_LCD_DrawPixel((Xpos + CurX), (Ypos - CurY), DrawProp[ActiveLayer].TextColor); - - BSP_LCD_DrawPixel((Xpos - CurX), (Ypos - CurY), DrawProp[ActiveLayer].TextColor); - - BSP_LCD_DrawPixel((Xpos + CurY), (Ypos - CurX), DrawProp[ActiveLayer].TextColor); - - BSP_LCD_DrawPixel((Xpos - CurY), (Ypos - CurX), DrawProp[ActiveLayer].TextColor); - - BSP_LCD_DrawPixel((Xpos + CurX), (Ypos + CurY), DrawProp[ActiveLayer].TextColor); - - BSP_LCD_DrawPixel((Xpos - CurX), (Ypos + CurY), DrawProp[ActiveLayer].TextColor); - - BSP_LCD_DrawPixel((Xpos + CurY), (Ypos + CurX), DrawProp[ActiveLayer].TextColor); - - BSP_LCD_DrawPixel((Xpos - CurY), (Ypos + CurX), DrawProp[ActiveLayer].TextColor); - - if (D < 0) - { - D += (CurX << 2) + 6; - } - else - { - D += ((CurX - CurY) << 2) + 10; - CurY--; - } - CurX++; - } -} - -/** - * @brief Draws an poly-line (between many points) in currently active layer. - * @param Points: Pointer to the points array - * @param PointCount: Number of points - */ -void BSP_LCD_DrawPolygon(pPoint Points, uint16_t PointCount) -{ - int16_t X = 0, Y = 0; - - if(PointCount < 2) - { - return; - } - - BSP_LCD_DrawLine(Points->X, Points->Y, (Points+PointCount-1)->X, (Points+PointCount-1)->Y); - - while(--PointCount) - { - X = Points->X; - Y = Points->Y; - Points++; - BSP_LCD_DrawLine(X, Y, Points->X, Points->Y); - } -} - -/** - * @brief Draws an ellipse on LCD in currently active layer. - * @param Xpos: X position - * @param Ypos: Y position - * @param XRadius: Ellipse X radius - * @param YRadius: Ellipse Y radius - */ -void BSP_LCD_DrawEllipse(int Xpos, int Ypos, int XRadius, int YRadius) -{ - int x = 0, y = -YRadius, err = 2-2*XRadius, e2; - float K = 0, rad1 = 0, rad2 = 0; - - rad1 = XRadius; - rad2 = YRadius; - - K = (float)(rad2/rad1); - - do { - BSP_LCD_DrawPixel((Xpos-(uint16_t)(x/K)), (Ypos+y), DrawProp[ActiveLayer].TextColor); - BSP_LCD_DrawPixel((Xpos+(uint16_t)(x/K)), (Ypos+y), DrawProp[ActiveLayer].TextColor); - BSP_LCD_DrawPixel((Xpos+(uint16_t)(x/K)), (Ypos-y), DrawProp[ActiveLayer].TextColor); - BSP_LCD_DrawPixel((Xpos-(uint16_t)(x/K)), (Ypos-y), DrawProp[ActiveLayer].TextColor); - - e2 = err; - if (e2 <= x) { - err += ++x*2+1; - if (-y == x && e2 <= y) e2 = 0; - } - if (e2 > y) err += ++y*2+1; - } - while (y <= 0); -} - -/** - * @brief Draws a bitmap picture loaded in the internal Flash (32 bpp) in currently active layer. - * @param Xpos: Bmp X position in the LCD - * @param Ypos: Bmp Y position in the LCD - * @param pbmp: Pointer to Bmp picture address in the internal Flash - */ -void BSP_LCD_DrawBitmap(uint32_t Xpos, uint32_t Ypos, uint8_t *pbmp) -{ - uint32_t index = 0, width = 0, height = 0, bit_pixel = 0; - uint32_t Address; - uint32_t InputColorMode = 0; - - /* Get bitmap data address offset */ - index = *(__IO uint16_t *) (pbmp + 10); - index |= (*(__IO uint16_t *) (pbmp + 12)) << 16; - - /* Read bitmap width */ - width = *(uint16_t *) (pbmp + 18); - width |= (*(uint16_t *) (pbmp + 20)) << 16; - - /* Read bitmap height */ - height = *(uint16_t *) (pbmp + 22); - height |= (*(uint16_t *) (pbmp + 24)) << 16; - - /* Read bit/pixel */ - bit_pixel = *(uint16_t *) (pbmp + 28); - - /* Set the address */ - Address = hltdc_eval.LayerCfg[ActiveLayer].FBStartAdress + (((BSP_LCD_GetXSize()*Ypos) + Xpos)*(4)); - - /* Get the layer pixel format */ - if ((bit_pixel/8) == 4) - { - InputColorMode = CM_ARGB8888; - } - else if ((bit_pixel/8) == 2) - { - InputColorMode = CM_RGB565; - } - else - { - InputColorMode = CM_RGB888; - } - - /* Bypass the bitmap header */ - pbmp += (index + (width * (height - 1) * (bit_pixel/8))); - - /* Convert picture to ARGB8888 pixel format */ - for(index=0; index < height; index++) - { - /* Pixel format conversion */ - LL_ConvertLineToARGB8888((uint32_t *)pbmp, (uint32_t *)Address, width, InputColorMode); - - /* Increment the source and destination buffers */ - Address+= (BSP_LCD_GetXSize()*4); - pbmp -= width*(bit_pixel/8); - } -} - -/** - * @brief Draws a full rectangle in currently active layer. - * @param Xpos: X position - * @param Ypos: Y position - * @param Width: Rectangle width - * @param Height: Rectangle height - */ -void BSP_LCD_FillRect(uint16_t Xpos, uint16_t Ypos, uint16_t Width, uint16_t Height) -{ - uint32_t Xaddress = 0; - - /* Set the text color */ - BSP_LCD_SetTextColor(DrawProp[ActiveLayer].TextColor); - - /* Get the rectangle start address */ - Xaddress = (hltdc_eval.LayerCfg[ActiveLayer].FBStartAdress) + 4*(BSP_LCD_GetXSize()*Ypos + Xpos); - - /* Fill the rectangle */ - LL_FillBuffer(ActiveLayer, (uint32_t *)Xaddress, Width, Height, (BSP_LCD_GetXSize() - Width), DrawProp[ActiveLayer].TextColor); -} - -/** - * @brief Draws a full circle in currently active layer. - * @param Xpos: X position - * @param Ypos: Y position - * @param Radius: Circle radius - */ -void BSP_LCD_FillCircle(uint16_t Xpos, uint16_t Ypos, uint16_t Radius) -{ - int32_t D; /* Decision Variable */ - uint32_t CurX; /* Current X Value */ - uint32_t CurY; /* Current Y Value */ - - D = 3 - (Radius << 1); - - CurX = 0; - CurY = Radius; - - BSP_LCD_SetTextColor(DrawProp[ActiveLayer].TextColor); - - while (CurX <= CurY) - { - if(CurY > 0) - { - BSP_LCD_DrawHLine(Xpos - CurY, Ypos + CurX, 2*CurY); - BSP_LCD_DrawHLine(Xpos - CurY, Ypos - CurX, 2*CurY); - } - - if(CurX > 0) - { - BSP_LCD_DrawHLine(Xpos - CurX, Ypos - CurY, 2*CurX); - BSP_LCD_DrawHLine(Xpos - CurX, Ypos + CurY, 2*CurX); - } - if (D < 0) - { - D += (CurX << 2) + 6; - } - else - { - D += ((CurX - CurY) << 2) + 10; - CurY--; - } - CurX++; - } - - BSP_LCD_SetTextColor(DrawProp[ActiveLayer].TextColor); - BSP_LCD_DrawCircle(Xpos, Ypos, Radius); -} - -/** - * @brief Draws a full poly-line (between many points) in currently active layer. - * @param Points: Pointer to the points array - * @param PointCount: Number of points - */ -void BSP_LCD_FillPolygon(pPoint Points, uint16_t PointCount) -{ - int16_t X = 0, Y = 0, X2 = 0, Y2 = 0, X_center = 0, Y_center = 0, X_first = 0, Y_first = 0, pixelX = 0, pixelY = 0, counter = 0; - uint16_t IMAGE_LEFT = 0, IMAGE_RIGHT = 0, IMAGE_TOP = 0, IMAGE_BOTTOM = 0; - - IMAGE_LEFT = IMAGE_RIGHT = Points->X; - IMAGE_TOP= IMAGE_BOTTOM = Points->Y; - - for(counter = 1; counter < PointCount; counter++) - { - pixelX = POLY_X(counter); - if(pixelX < IMAGE_LEFT) - { - IMAGE_LEFT = pixelX; - } - if(pixelX > IMAGE_RIGHT) - { - IMAGE_RIGHT = pixelX; - } - - pixelY = POLY_Y(counter); - if(pixelY < IMAGE_TOP) - { - IMAGE_TOP = pixelY; - } - if(pixelY > IMAGE_BOTTOM) - { - IMAGE_BOTTOM = pixelY; - } - } - - if(PointCount < 2) - { - return; - } - - X_center = (IMAGE_LEFT + IMAGE_RIGHT)/2; - Y_center = (IMAGE_BOTTOM + IMAGE_TOP)/2; - - X_first = Points->X; - Y_first = Points->Y; - - while(--PointCount) - { - X = Points->X; - Y = Points->Y; - Points++; - X2 = Points->X; - Y2 = Points->Y; - - FillTriangle(X, X2, X_center, Y, Y2, Y_center); - FillTriangle(X, X_center, X2, Y, Y_center, Y2); - FillTriangle(X_center, X2, X, Y_center, Y2, Y); - } - - FillTriangle(X_first, X2, X_center, Y_first, Y2, Y_center); - FillTriangle(X_first, X_center, X2, Y_first, Y_center, Y2); - FillTriangle(X_center, X2, X_first, Y_center, Y2, Y_first); -} - -/** - * @brief Draws a full ellipse in currently active layer. - * @param Xpos: X position - * @param Ypos: Y position - * @param XRadius: Ellipse X radius - * @param YRadius: Ellipse Y radius - */ -void BSP_LCD_FillEllipse(int Xpos, int Ypos, int XRadius, int YRadius) -{ - int x = 0, y = -YRadius, err = 2-2*XRadius, e2; - float K = 0, rad1 = 0, rad2 = 0; - - rad1 = XRadius; - rad2 = YRadius; - - K = (float)(rad2/rad1); - - do - { - BSP_LCD_DrawHLine((Xpos-(uint16_t)(x/K)), (Ypos+y), (2*(uint16_t)(x/K) + 1)); - BSP_LCD_DrawHLine((Xpos-(uint16_t)(x/K)), (Ypos-y), (2*(uint16_t)(x/K) + 1)); - - e2 = err; - if (e2 <= x) - { - err += ++x*2+1; - if (-y == x && e2 <= y) e2 = 0; - } - if (e2 > y) err += ++y*2+1; - } - while (y <= 0); -} - -/** - * @brief Switch back on the display if was switched off by previous call of BSP_LCD_DisplayOff(). - * Exit DSI ULPM mode if was allowed and configured in Dsi Configuration. - */ -void BSP_LCD_DisplayOn(void) -{ - /* Send Display on DCS command to display */ - HAL_DSI_ShortWrite(&(hdsi_eval), - hdsivideo_handle.VirtualChannelID, - DSI_DCS_SHORT_PKT_WRITE_P1, - OTM8009A_CMD_DISPON, - 0x00); - -} - -/** - * @brief Switch Off the display. - * Enter DSI ULPM mode if was allowed and configured in Dsi Configuration. - */ -void BSP_LCD_DisplayOff(void) -{ - /* Send Display off DCS Command to display */ - HAL_DSI_ShortWrite(&(hdsi_eval), - hdsivideo_handle.VirtualChannelID, - DSI_DCS_SHORT_PKT_WRITE_P1, - OTM8009A_CMD_DISPOFF, - 0x00); - -} - -/** - * @brief DCS or Generic short/long write command - * @param NbParams: Number of parameters. It indicates the write command mode: - * If inferior to 2, a long write command is performed else short. - * @param pParams: Pointer to parameter values table. - * @retval HAL status - */ -void DSI_IO_WriteCmd(uint32_t NbrParams, uint8_t *pParams) -{ - if(NbrParams <= 1) - { - HAL_DSI_ShortWrite(&hdsi_eval, LCD_OTM8009A_ID, DSI_DCS_SHORT_PKT_WRITE_P1, pParams[0], pParams[1]); - } - else - { - HAL_DSI_LongWrite(&hdsi_eval, LCD_OTM8009A_ID, DSI_DCS_LONG_PKT_WRITE, NbrParams, pParams[NbrParams], pParams); - } -} - -/******************************************************************************* - LTDC, DMA2D and DSI BSP Routines -*******************************************************************************/ -/** - * @brief Handles DMA2D interrupt request. - * @note : Can be surcharged by application code implementation of the function. - */ -__weak void BSP_LCD_DMA2D_IRQHandler(void) -{ - HAL_DMA2D_IRQHandler(&hdma2d_eval); -} - -/** - * @brief Handles DSI interrupt request. - * @note : Can be surcharged by application code implementation of the function. - */ -__weak void BSP_LCD_DSI_IRQHandler(void) -{ - HAL_DSI_IRQHandler(&(hdsi_eval)); -} - - -/** - * @brief Handles LTDC interrupt request. - * @note : Can be surcharged by application code implementation of the function. - */ -__weak void BSP_LCD_LTDC_IRQHandler(void) -{ - HAL_LTDC_IRQHandler(&(hltdc_eval)); -} - -/** - * @brief De-Initializes the BSP LCD Msp - * Application can surcharge if needed this function implementation. - */ -__weak void BSP_LCD_MspDeInit(void) -{ - /** @brief Disable IRQ of LTDC IP */ - HAL_NVIC_DisableIRQ(LTDC_IRQn); - - /** @brief Disable IRQ of DMA2D IP */ - HAL_NVIC_DisableIRQ(DMA2D_IRQn); - - /** @brief Disable IRQ of DSI IP */ - HAL_NVIC_DisableIRQ(DSI_IRQn); - - /** @brief Force and let in reset state LTDC, DMA2D and DSI Host + Wrapper IPs */ - __HAL_RCC_LTDC_FORCE_RESET(); - __HAL_RCC_DMA2D_FORCE_RESET(); - __HAL_RCC_DSI_FORCE_RESET(); - - /** @brief Disable the LTDC, DMA2D and DSI Host and Wrapper clocks */ - __HAL_RCC_LTDC_CLK_DISABLE(); - __HAL_RCC_DMA2D_CLK_DISABLE(); - __HAL_RCC_DSI_CLK_DISABLE(); -} - -/** - * @brief Initialize the BSP LCD Msp. - * Application can surcharge if needed this function implementation - */ -__weak void BSP_LCD_MspInit(void) -{ - /** @brief Enable the LTDC clock */ - __HAL_RCC_LTDC_CLK_ENABLE(); - - /** @brief Toggle Sw reset of LTDC IP */ - __HAL_RCC_LTDC_FORCE_RESET(); - __HAL_RCC_LTDC_RELEASE_RESET(); - - /** @brief Enable the DMA2D clock */ - __HAL_RCC_DMA2D_CLK_ENABLE(); - - /** @brief Toggle Sw reset of DMA2D IP */ - __HAL_RCC_DMA2D_FORCE_RESET(); - __HAL_RCC_DMA2D_RELEASE_RESET(); - - /** @brief Enable DSI Host and wrapper clocks */ - __HAL_RCC_DSI_CLK_ENABLE(); - - /** @brief Soft Reset the DSI Host and wrapper */ - __HAL_RCC_DSI_FORCE_RESET(); - __HAL_RCC_DSI_RELEASE_RESET(); - - /** @brief NVIC configuration for LTDC interrupt that is now enabled */ - HAL_NVIC_SetPriority(LTDC_IRQn, 3, 0); - HAL_NVIC_EnableIRQ(LTDC_IRQn); - - /** @brief NVIC configuration for DMA2D interrupt that is now enabled */ - HAL_NVIC_SetPriority(DMA2D_IRQn, 3, 0); - HAL_NVIC_EnableIRQ(DMA2D_IRQn); - - /** @brief NVIC configuration for DSI interrupt that is now enabled */ - HAL_NVIC_SetPriority(DSI_IRQn, 3, 0); - HAL_NVIC_EnableIRQ(DSI_IRQn); -} - -/** - * @brief This function handles LTDC Error interrupt Handler. - * @note : Can be surcharged by application code implementation of the function. - */ - -__weak void BSP_LCD_LTDC_ER_IRQHandler(void) -{ - HAL_LTDC_IRQHandler(&(hltdc_eval)); -} - - -/** - * @brief Draws a pixel on LCD. - * @param Xpos: X position - * @param Ypos: Y position - * @param RGB_Code: Pixel color in ARGB mode (8-8-8-8) - */ -void BSP_LCD_DrawPixel(uint16_t Xpos, uint16_t Ypos, uint32_t RGB_Code) -{ - /* Write data value to all SDRAM memory */ - *(__IO uint32_t*) (hltdc_eval.LayerCfg[ActiveLayer].FBStartAdress + (4*(Ypos*BSP_LCD_GetXSize() + Xpos))) = RGB_Code; -} - - -/** - * @brief Draws a character on LCD. - * @param Xpos: Line where to display the character shape - * @param Ypos: Start column address - * @param c: Pointer to the character data - */ -static void DrawChar(uint16_t Xpos, uint16_t Ypos, const uint8_t *c) -{ - uint32_t i = 0, j = 0; - uint16_t height, width; - uint8_t offset; - uint8_t *pchar; - uint32_t line; - - height = DrawProp[ActiveLayer].pFont->Height; - width = DrawProp[ActiveLayer].pFont->Width; - - offset = 8 *((width + 7)/8) - width ; - - for(i = 0; i < height; i++) - { - pchar = ((uint8_t *)c + (width + 7)/8 * i); - - switch(((width + 7)/8)) - { - - case 1: - line = pchar[0]; - break; - - case 2: - line = (pchar[0]<< 8) | pchar[1]; - break; - - case 3: - default: - line = (pchar[0]<< 16) | (pchar[1]<< 8) | pchar[2]; - break; - } - - for (j = 0; j < width; j++) - { - if(line & (1 << (width- j + offset- 1))) - { - BSP_LCD_DrawPixel((Xpos + j), Ypos, DrawProp[ActiveLayer].TextColor); - } - else - { - BSP_LCD_DrawPixel((Xpos + j), Ypos, DrawProp[ActiveLayer].BackColor); - } - } - Ypos++; - } -} - -/** - * @brief Fills a triangle (between 3 points). - * @param x1: Point 1 X position - * @param y1: Point 1 Y position - * @param x2: Point 2 X position - * @param y2: Point 2 Y position - * @param x3: Point 3 X position - * @param y3: Point 3 Y position - */ -static void FillTriangle(uint16_t x1, uint16_t x2, uint16_t x3, uint16_t y1, uint16_t y2, uint16_t y3) -{ - int16_t deltax = 0, deltay = 0, x = 0, y = 0, xinc1 = 0, xinc2 = 0, - yinc1 = 0, yinc2 = 0, den = 0, num = 0, numadd = 0, numpixels = 0, - curpixel = 0; - - deltax = ABS(x2 - x1); /* The difference between the x's */ - deltay = ABS(y2 - y1); /* The difference between the y's */ - x = x1; /* Start x off at the first pixel */ - y = y1; /* Start y off at the first pixel */ - - if (x2 >= x1) /* The x-values are increasing */ - { - xinc1 = 1; - xinc2 = 1; - } - else /* The x-values are decreasing */ - { - xinc1 = -1; - xinc2 = -1; - } - - if (y2 >= y1) /* The y-values are increasing */ - { - yinc1 = 1; - yinc2 = 1; - } - else /* The y-values are decreasing */ - { - yinc1 = -1; - yinc2 = -1; - } - - if (deltax >= deltay) /* There is at least one x-value for every y-value */ - { - xinc1 = 0; /* Don't change the x when numerator >= denominator */ - yinc2 = 0; /* Don't change the y for every iteration */ - den = deltax; - num = deltax / 2; - numadd = deltay; - numpixels = deltax; /* There are more x-values than y-values */ - } - else /* There is at least one y-value for every x-value */ - { - xinc2 = 0; /* Don't change the x for every iteration */ - yinc1 = 0; /* Don't change the y when numerator >= denominator */ - den = deltay; - num = deltay / 2; - numadd = deltax; - numpixels = deltay; /* There are more y-values than x-values */ - } - - for (curpixel = 0; curpixel <= numpixels; curpixel++) - { - BSP_LCD_DrawLine(x, y, x3, y3); - - num += numadd; /* Increase the numerator by the top of the fraction */ - if (num >= den) /* Check if numerator >= denominator */ - { - num -= den; /* Calculate the new numerator value */ - x += xinc1; /* Change the x as appropriate */ - y += yinc1; /* Change the y as appropriate */ - } - x += xinc2; /* Change the x as appropriate */ - y += yinc2; /* Change the y as appropriate */ - } -} - -/** - * @brief Fills a buffer. - * @param LayerIndex: Layer index - * @param pDst: Pointer to destination buffer - * @param xSize: Buffer width - * @param ySize: Buffer height - * @param OffLine: Offset - * @param ColorIndex: Color index - */ -static void LL_FillBuffer(uint32_t LayerIndex, void *pDst, uint32_t xSize, uint32_t ySize, uint32_t OffLine, uint32_t ColorIndex) -{ - /* Register to memory mode with ARGB8888 as color Mode */ - hdma2d_eval.Init.Mode = DMA2D_R2M; - hdma2d_eval.Init.ColorMode = DMA2D_ARGB8888; - hdma2d_eval.Init.OutputOffset = OffLine; - - hdma2d_eval.Instance = DMA2D; - - /* DMA2D Initialization */ - if(HAL_DMA2D_Init(&hdma2d_eval) == HAL_OK) - { - if(HAL_DMA2D_ConfigLayer(&hdma2d_eval, LayerIndex) == HAL_OK) - { - if (HAL_DMA2D_Start(&hdma2d_eval, ColorIndex, (uint32_t)pDst, xSize, ySize) == HAL_OK) - { - /* Polling For DMA transfer */ - HAL_DMA2D_PollForTransfer(&hdma2d_eval, 10); - } - } - } -} - -/** - * @brief Converts a line to an ARGB8888 pixel format. - * @param pSrc: Pointer to source buffer - * @param pDst: Output color - * @param xSize: Buffer width - * @param ColorMode: Input color mode - */ -static void LL_ConvertLineToARGB8888(void *pSrc, void *pDst, uint32_t xSize, uint32_t ColorMode) -{ - /* Configure the DMA2D Mode, Color Mode and output offset */ - hdma2d_eval.Init.Mode = DMA2D_M2M_PFC; - hdma2d_eval.Init.ColorMode = DMA2D_ARGB8888; - hdma2d_eval.Init.OutputOffset = 0; - - /* Foreground Configuration */ - hdma2d_eval.LayerCfg[1].AlphaMode = DMA2D_NO_MODIF_ALPHA; - hdma2d_eval.LayerCfg[1].InputAlpha = 0xFF; - hdma2d_eval.LayerCfg[1].InputColorMode = ColorMode; - hdma2d_eval.LayerCfg[1].InputOffset = 0; - - hdma2d_eval.Instance = DMA2D; - - /* DMA2D Initialization */ - if(HAL_DMA2D_Init(&hdma2d_eval) == HAL_OK) - { - if(HAL_DMA2D_ConfigLayer(&hdma2d_eval, 1) == HAL_OK) - { - if (HAL_DMA2D_Start(&hdma2d_eval, (uint32_t)pSrc, (uint32_t)pDst, xSize, 1) == HAL_OK) - { - /* Polling For DMA transfer */ - HAL_DMA2D_PollForTransfer(&hdma2d_eval, 10); - } - } - } -} - -/** - * @} - */ - -/** - * @} - */ - -/** - * @} - */ - -/** - * @} - */ - -/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
--- a/stm32469i_discovery/stm32469i_discovery_lcd.h Mon May 30 11:09:05 2016 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,411 +0,0 @@ -/** - ****************************************************************************** - * @file stm32469i_discovery_lcd.h - * @author MCD Application Team - * @version V1.0.1 - * @date 29-September-2015 - * @brief This file contains the common defines and functions prototypes for - * the stm32469i_discovery_lcd.c driver. - ****************************************************************************** - * @attention - * - * <h2><center>© COPYRIGHT(c) 2015 STMicroelectronics</center></h2> - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. Neither the name of STMicroelectronics nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - ****************************************************************************** - */ - -/* Define to prevent recursive inclusion -------------------------------------*/ -#ifndef __STM32469I_DISCOVERY_LCD_H -#define __STM32469I_DISCOVERY_LCD_H - -#ifdef __cplusplus - extern "C" { -#endif - -/* Includes ------------------------------------------------------------------*/ -/* Include LCD component Driver */ - -/* Include OTM8009A LCD Driver IC driver code */ -#include "../Components/otm8009a/otm8009a.h" - -/* Include SDRAM Driver */ -#include "stm32469i_discovery_sdram.h" -#include "stm32469i_discovery.h" -#include "../Fonts/fonts.h" - -#include <string.h> /* use of memset() */ - -/** @addtogroup BSP - * @{ - */ - -/** @addtogroup STM32469I-Discovery - * @{ - */ - -/** @addtogroup STM32469I-Discovery_LCD STM32469I Discovery LCD - * @{ - */ - -/** @defgroup STM32469I-Discovery_LCD_Exported_Constants STM32469I Discovery LCD Exported Constants - * @{ - */ - -#define LCD_LayerCfgTypeDef LTDC_LayerCfgTypeDef -/** - * @brief LCD FB_StartAddress - */ -#define LCD_FB_START_ADDRESS ((uint32_t)0xC0000000) - -/** @brief Maximum number of LTDC layers - */ -#define LTDC_MAX_LAYER_NUMBER ((uint32_t) 2) - -/** @brief LTDC Background layer index - */ -#define LTDC_ACTIVE_LAYER_BACKGROUND ((uint32_t) 0) - -/** @brief LTDC Foreground layer index - */ -#define LTDC_ACTIVE_LAYER_FOREGROUND ((uint32_t) 1) - -/** @brief Number of LTDC layers - */ -#define LTDC_NB_OF_LAYERS ((uint32_t) 2) - -/** @brief LTDC Default used layer index - */ -#define LTDC_DEFAULT_ACTIVE_LAYER LTDC_ACTIVE_LAYER_FOREGROUND - -/** - * @brief LCD status structure definition - */ -#define LCD_OK 0x00 -#define LCD_ERROR 0x01 -#define LCD_TIMEOUT 0x02 - -/** - * @brief LCD Display OTM8009A ID - */ -#define LCD_OTM8009A_ID ((uint32_t) 0) - -/** - * @brief LCD color definitions values - * in ARGB8888 format. - */ - -/** @brief Blue value in ARGB8888 format - */ -#define LCD_COLOR_BLUE ((uint32_t) 0xFF0000FF) - -/** @brief Green value in ARGB8888 format - */ -#define LCD_COLOR_GREEN ((uint32_t) 0xFF00FF00) - -/** @brief Red value in ARGB8888 format - */ -#define LCD_COLOR_RED ((uint32_t) 0xFFFF0000) - -/** @brief Cyan value in ARGB8888 format - */ -#define LCD_COLOR_CYAN ((uint32_t) 0xFF00FFFF) - -/** @brief Magenta value in ARGB8888 format - */ -#define LCD_COLOR_MAGENTA ((uint32_t) 0xFFFF00FF) - -/** @brief Yellow value in ARGB8888 format - */ -#define LCD_COLOR_YELLOW ((uint32_t) 0xFFFFFF00) - -/** @brief Light Blue value in ARGB8888 format - */ -#define LCD_COLOR_LIGHTBLUE ((uint32_t) 0xFF8080FF) - -/** @brief Light Green value in ARGB8888 format - */ -#define LCD_COLOR_LIGHTGREEN ((uint32_t) 0xFF80FF80) - -/** @brief Light Red value in ARGB8888 format - */ -#define LCD_COLOR_LIGHTRED ((uint32_t) 0xFFFF8080) - -/** @brief Light Cyan value in ARGB8888 format - */ -#define LCD_COLOR_LIGHTCYAN ((uint32_t) 0xFF80FFFF) - -/** @brief Light Magenta value in ARGB8888 format - */ -#define LCD_COLOR_LIGHTMAGENTA ((uint32_t) 0xFFFF80FF) - -/** @brief Light Yellow value in ARGB8888 format - */ -#define LCD_COLOR_LIGHTYELLOW ((uint32_t) 0xFFFFFF80) - -/** @brief Dark Blue value in ARGB8888 format - */ -#define LCD_COLOR_DARKBLUE ((uint32_t) 0xFF000080) - -/** @brief Light Dark Green value in ARGB8888 format - */ -#define LCD_COLOR_DARKGREEN ((uint32_t) 0xFF008000) - -/** @brief Light Dark Red value in ARGB8888 format - */ -#define LCD_COLOR_DARKRED ((uint32_t) 0xFF800000) - -/** @brief Dark Cyan value in ARGB8888 format - */ -#define LCD_COLOR_DARKCYAN ((uint32_t) 0xFF008080) - -/** @brief Dark Magenta value in ARGB8888 format - */ -#define LCD_COLOR_DARKMAGENTA ((uint32_t) 0xFF800080) - -/** @brief Dark Yellow value in ARGB8888 format - */ -#define LCD_COLOR_DARKYELLOW ((uint32_t) 0xFF808000) - -/** @brief White value in ARGB8888 format - */ -#define LCD_COLOR_WHITE ((uint32_t) 0xFFFFFFFF) - -/** @brief Light Gray value in ARGB8888 format - */ -#define LCD_COLOR_LIGHTGRAY ((uint32_t) 0xFFD3D3D3) - -/** @brief Gray value in ARGB8888 format - */ -#define LCD_COLOR_GRAY ((uint32_t) 0xFF808080) - -/** @brief Dark Gray value in ARGB8888 format - */ -#define LCD_COLOR_DARKGRAY ((uint32_t) 0xFF404040) - -/** @brief Black value in ARGB8888 format - */ -#define LCD_COLOR_BLACK ((uint32_t) 0xFF000000) - -/** @brief Brown value in ARGB8888 format - */ -#define LCD_COLOR_BROWN ((uint32_t) 0xFFA52A2A) - -/** @brief Orange value in ARGB8888 format - */ -#define LCD_COLOR_ORANGE ((uint32_t) 0xFFFFA500) - -/** @brief Transparent value in ARGB8888 format - */ -#define LCD_COLOR_TRANSPARENT ((uint32_t) 0xFF000000) - -/** - * @brief LCD default font - */ -#define LCD_DEFAULT_FONT Font24 -/** - * @} - */ - -/** @defgroup STM32469I-Discovery_LCD_Exported_Types STM32469I Discovery LCD Exported Types - * @{ - */ - -/** -* @brief LCD Drawing main properties -*/ -typedef struct -{ - uint32_t TextColor; /*!< Specifies the color of text */ - uint32_t BackColor; /*!< Specifies the background color below the text */ - sFONT *pFont; /*!< Specifies the font used for the text */ - -} LCD_DrawPropTypeDef; - -/** - * @brief LCD Drawing point (pixel) geometric definition - */ -typedef struct -{ - int16_t X; /*!< geometric X position of drawing */ - int16_t Y; /*!< geometric Y position of drawing */ - -} Point; - -/** - * @brief Pointer on LCD Drawing point (pixel) geometric definition - */ -typedef Point * pPoint; - -/** - * @brief LCD drawing Line alignment mode definitions - */ -typedef enum -{ - CENTER_MODE = 0x01, /*!< Center mode */ - RIGHT_MODE = 0x02, /*!< Right mode */ - LEFT_MODE = 0x03 /*!< Left mode */ - -} Text_AlignModeTypdef; - - -/** - * @brief LCD_OrientationTypeDef - * Possible values of Display Orientation - */ -typedef enum -{ - LCD_ORIENTATION_PORTRAIT = 0x00, /*!< Portrait orientation choice of LCD screen */ - LCD_ORIENTATION_LANDSCAPE = 0x01, /*!< Landscape orientation choice of LCD screen */ - LCD_ORIENTATION_INVALID = 0x02 /*!< Invalid orientation choice of LCD screen */ -} LCD_OrientationTypeDef; - -/** - * @brief Possible values of - * pixel data format (ie color coding) transmitted on DSI Data lane in DSI packets - */ -typedef enum -{ - LCD_DSI_PIXEL_DATA_FMT_RBG888 = 0x00, /*!< DSI packet pixel format chosen is RGB888 : 24 bpp */ - LCD_DSI_PIXEL_DATA_FMT_RBG565 = 0x02, /*!< DSI packet pixel format chosen is RGB565 : 16 bpp */ - LCD_DSI_PIXEL_DATA_FMT_INVALID = 0x03 /*!< Invalid DSI packet pixel format */ - -} LCD_DsiPixelDataFmtTypeDef; - -/** - * @} - */ - -/** @defgroup STM32469I-Discovery_LCD_Exported_Macro STM32469I Discovery LCD Exported Macro - * @{ - */ - -/** @defgroup STM32469I-Discovery_LCD_Exported_Functions STM32469I Discovery LCD Exported Functions - * @{ - */ -void BSP_LCD_DMA2D_IRQHandler(void); -void BSP_LCD_DSI_IRQHandler(void); -void BSP_LCD_LTDC_IRQHandler(void); -void BSP_LCD_LTDC_ER_IRQHandler(void); - -uint8_t BSP_LCD_Init(void); -uint8_t BSP_LCD_InitEx(LCD_OrientationTypeDef orientation); - -void BSP_LCD_MspDeInit(void); -void BSP_LCD_MspInit(void); -void BSP_LCD_Reset(void); - -uint32_t BSP_LCD_GetXSize(void); -uint32_t BSP_LCD_GetYSize(void); -void BSP_LCD_SetXSize(uint32_t imageWidthPixels); -void BSP_LCD_SetYSize(uint32_t imageHeightPixels); - -void BSP_LCD_LayerDefaultInit(uint16_t LayerIndex, uint32_t FB_Address); -void BSP_LCD_SetTransparency(uint32_t LayerIndex, uint8_t Transparency); -void BSP_LCD_SetLayerAddress(uint32_t LayerIndex, uint32_t Address); -void BSP_LCD_SetColorKeying(uint32_t LayerIndex, uint32_t RGBValue); -void BSP_LCD_ResetColorKeying(uint32_t LayerIndex); -void BSP_LCD_SetLayerWindow(uint16_t LayerIndex, uint16_t Xpos, uint16_t Ypos, uint16_t Width, uint16_t Height); - -void BSP_LCD_SelectLayer(uint32_t LayerIndex); -void BSP_LCD_SetLayerVisible(uint32_t LayerIndex, FunctionalState State); - -void BSP_LCD_SetTextColor(uint32_t Color); -uint32_t BSP_LCD_GetTextColor(void); -void BSP_LCD_SetBackColor(uint32_t Color); -uint32_t BSP_LCD_GetBackColor(void); -void BSP_LCD_SetFont(sFONT *fonts); -sFONT *BSP_LCD_GetFont(void); - -uint32_t BSP_LCD_ReadPixel(uint16_t Xpos, uint16_t Ypos); -void BSP_LCD_DrawPixel(uint16_t Xpos, uint16_t Ypos, uint32_t pixel); -void BSP_LCD_Clear(uint32_t Color); -void BSP_LCD_ClearStringLine(uint32_t Line); -void BSP_LCD_DisplayStringAtLine(uint16_t Line, uint8_t *ptr); -void BSP_LCD_DisplayStringAt(uint16_t Xpos, uint16_t Ypos, uint8_t *Text, Text_AlignModeTypdef Mode); -void BSP_LCD_DisplayChar(uint16_t Xpos, uint16_t Ypos, uint8_t Ascii); - -void BSP_LCD_DrawHLine(uint16_t Xpos, uint16_t Ypos, uint16_t Length); -void BSP_LCD_DrawVLine(uint16_t Xpos, uint16_t Ypos, uint16_t Length); -void BSP_LCD_DrawLine(uint16_t x1, uint16_t y1, uint16_t x2, uint16_t y2); -void BSP_LCD_DrawRect(uint16_t Xpos, uint16_t Ypos, uint16_t Width, uint16_t Height); -void BSP_LCD_DrawCircle(uint16_t Xpos, uint16_t Ypos, uint16_t Radius); -void BSP_LCD_DrawPolygon(pPoint Points, uint16_t PointCount); -void BSP_LCD_DrawEllipse(int Xpos, int Ypos, int XRadius, int YRadius); -void BSP_LCD_DrawBitmap(uint32_t Xpos, uint32_t Ypos, uint8_t *pbmp); - -void BSP_LCD_FillRect(uint16_t Xpos, uint16_t Ypos, uint16_t Width, uint16_t Height); -void BSP_LCD_FillCircle(uint16_t Xpos, uint16_t Ypos, uint16_t Radius); -void BSP_LCD_FillPolygon(pPoint Points, uint16_t PointCount); -void BSP_LCD_FillEllipse(int Xpos, int Ypos, int XRadius, int YRadius); - -void BSP_LCD_DisplayOff(void); -void BSP_LCD_DisplayOn(void); - -/** - * @} - */ - -/** @defgroup STM32469I-EVAL_LCD_Exported_Variables STM32469I EVAL LCD Exported Variables - * @{ - */ - -/* @brief DMA2D handle variable */ -extern DMA2D_HandleTypeDef hdma2d_eval; - -/** - * @} - */ - -/** @defgroup STM32469I-Discovery_LCD_Exported_Variables STM32469I Discovery LCD Exported Variables - * @{ - */ - -/** - * @} - */ - -/** - * @} - */ - -/** - * @} - */ - -/** - * @} - */ - -/** - * @} - */ - -#ifdef __cplusplus -} -#endif - -#endif /* __STM32469I_DISCOVERY_LCD_H */ - -/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
--- a/stm32469i_discovery/stm32469i_discovery_qspi.c Mon May 30 11:09:05 2016 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,783 +0,0 @@ -/** - ****************************************************************************** - * @file stm32469i_discovery_qspi.c - * @author MCD Application Team - * @version V1.0.1 - * @date 29-September-2015 - * @brief This file includes a standard driver for the N25Q128A QSPI - * memory mounted on STM32469I-Discovery board. - @verbatim - ============================================================================== - ##### How to use this driver ##### - ============================================================================== - [..] - (#) This driver is used to drive the N25Q128A QSPI external - memory mounted on STM32469I-Discovery board. - - (#) This driver need a specific component driver N25Q128A to be included with. - - (#) Initialization steps: - (++) Initialize the QPSI external memory using the BSP_QSPI_Init() function. This - function includes the MSP layer hardware resources initialization and the - QSPI interface with the external memory. - - (#) QSPI memory operations - (++) QSPI memory can be accessed with read/write operations once it is - initialized. - Read/write operation can be performed with AHB access using the functions - BSP_QSPI_Read()/BSP_QSPI_Write(). - (++) The function BSP_QSPI_GetInfo() returns the configuration of the QSPI memory. - (see the QSPI memory data sheet) - (++) Perform erase block operation using the function BSP_QSPI_Erase_Block() and by - specifying the block address. You can perform an erase operation of the whole - chip by calling the function BSP_QSPI_Erase_Chip(). - (++) The function BSP_QSPI_GetStatus() returns the current status of the QSPI memory. - (see the QSPI memory data sheet) - @endverbatim - ****************************************************************************** - * @attention - * - * <h2><center>© COPYRIGHT(c) 2015 STMicroelectronics</center></h2> - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. Neither the name of STMicroelectronics nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - ****************************************************************************** - */ - -/* Includes ------------------------------------------------------------------*/ -#include "stm32469i_discovery_qspi.h" - -/** @addtogroup BSP - * @{ - */ - -/** @addtogroup STM32469I_Discovery - * @{ - */ - -/** @defgroup STM32469I_Discovery_QSPI STM32469I_Discovery QSPI - * @{ - */ - - -/* Private variables ---------------------------------------------------------*/ - - -/** @defgroup STM32469I_Discovery_QSPI_Private_Variables Private Variables - * @{ - */ -QSPI_HandleTypeDef QSPIHandle; - -/** - * @} - */ - - - -/* Private functions ---------------------------------------------------------*/ - -/** @defgroup STM32469I_Discovery_QSPI_Private_Functions QSPI Private Functions - * @{ - */ -static uint8_t QSPI_ResetMemory (QSPI_HandleTypeDef *hqspi); -static uint8_t QSPI_DummyCyclesCfg (QSPI_HandleTypeDef *hqspi); -static uint8_t QSPI_WriteEnable (QSPI_HandleTypeDef *hqspi); -static uint8_t QSPI_AutoPollingMemReady (QSPI_HandleTypeDef *hqspi, uint32_t Timeout); - - -/** - * @} - */ - -/** @defgroup STM32469I_Discovery_QSPI_Exported_Functions QSPI Exported Functions - * @{ - */ - -/** - * @brief Initializes the QSPI interface. - * @retval QSPI memory status - */ -uint8_t BSP_QSPI_Init(void) -{ - QSPIHandle.Instance = QUADSPI; - - /* Call the DeInit function to reset the driver */ - if (HAL_QSPI_DeInit(&QSPIHandle) != HAL_OK) - { - return QSPI_ERROR; - } - - /* System level initialization */ - BSP_QSPI_MspInit(&QSPIHandle, NULL); - - /* QSPI initialization */ - QSPIHandle.Init.ClockPrescaler = 1; /* QSPI Freq= 180 MHz / (1+1) = 90 MHz */ - QSPIHandle.Init.FifoThreshold = 1; - QSPIHandle.Init.SampleShifting = QSPI_SAMPLE_SHIFTING_HALFCYCLE; - QSPIHandle.Init.FlashSize = POSITION_VAL(N25Q128A_FLASH_SIZE) - 1; - QSPIHandle.Init.ChipSelectHighTime = QSPI_CS_HIGH_TIME_2_CYCLE; - QSPIHandle.Init.ClockMode = QSPI_CLOCK_MODE_0; - QSPIHandle.Init.FlashID = QSPI_FLASH_ID_1; - QSPIHandle.Init.DualFlash = QSPI_DUALFLASH_DISABLE; - - if (HAL_QSPI_Init(&QSPIHandle) != HAL_OK) - { - return QSPI_ERROR; - } - - /* QSPI memory reset */ - if (QSPI_ResetMemory(&QSPIHandle) != QSPI_OK) - { - return QSPI_NOT_SUPPORTED; - } - - - /* Configuration of the dummy cucles on QSPI memory side */ - if (QSPI_DummyCyclesCfg(&QSPIHandle) != QSPI_OK) - { - return QSPI_NOT_SUPPORTED; - } - - return QSPI_OK; -} - -/** - * @brief De-Initializes the QSPI interface. - * @retval QSPI memory status - */ -uint8_t BSP_QSPI_DeInit(void) -{ - QSPIHandle.Instance = QUADSPI; - - /* Call the DeInit function to reset the driver */ - if (HAL_QSPI_DeInit(&QSPIHandle) != HAL_OK) - { - return QSPI_ERROR; - } - - /* System level De-initialization */ - BSP_QSPI_MspDeInit(&QSPIHandle, NULL); - - return QSPI_OK; -} - -/** - * @brief Reads an amount of data from the QSPI memory. - * @param pData: Pointer to data to be read - * @param ReadAddr: Read start address - * @param Size: Size of data to read - * @retval QSPI memory status - */ -uint8_t BSP_QSPI_Read(uint8_t* pData, uint32_t ReadAddr, uint32_t Size) -{ - QSPI_CommandTypeDef s_command; - - /* Initialize the read command */ - s_command.InstructionMode = QSPI_INSTRUCTION_1_LINE; - s_command.Instruction = QUAD_INOUT_FAST_READ_CMD; - s_command.AddressMode = QSPI_ADDRESS_4_LINES; - s_command.AddressSize = QSPI_ADDRESS_24_BITS; - s_command.Address = ReadAddr; - s_command.AlternateByteMode = QSPI_ALTERNATE_BYTES_NONE; - s_command.DataMode = QSPI_DATA_4_LINES; - s_command.DummyCycles = N25Q128A_DUMMY_CYCLES_READ_QUAD; - s_command.NbData = Size; - s_command.DdrMode = QSPI_DDR_MODE_DISABLE; - s_command.DdrHoldHalfCycle = QSPI_DDR_HHC_ANALOG_DELAY; - s_command.SIOOMode = QSPI_SIOO_INST_EVERY_CMD; - - /* Configure the command */ - if (HAL_QSPI_Command(&QSPIHandle, &s_command, HAL_QPSI_TIMEOUT_DEFAULT_VALUE) != HAL_OK) - { - return QSPI_ERROR; - } - - /* Reception of the data */ - if (HAL_QSPI_Receive(&QSPIHandle, pData, HAL_QPSI_TIMEOUT_DEFAULT_VALUE) != HAL_OK) - { - return QSPI_ERROR; - } - - return QSPI_OK; -} - -/** - * @brief Writes an amount of data to the QSPI memory. - * @param pData: Pointer to data to be written - * @param WriteAddr: Write start address - * @param Size: Size of data to write - * @retval QSPI memory status - */ -uint8_t BSP_QSPI_Write(uint8_t* pData, uint32_t WriteAddr, uint32_t Size) -{ - QSPI_CommandTypeDef s_command; - uint32_t end_addr, current_size, current_addr; - - /* Calculation of the size between the write address and the end of the page */ - current_addr = 0; - - while (current_addr <= WriteAddr) - { - current_addr += N25Q128A_PAGE_SIZE; - } - current_size = current_addr - WriteAddr; - - /* Check if the size of the data is less than the remaining place in the page */ - if (current_size > Size) - { - current_size = Size; - } - - /* Initialize the address variables */ - current_addr = WriteAddr; - end_addr = WriteAddr + Size; - - /* Initialize the program command */ - s_command.InstructionMode = QSPI_INSTRUCTION_1_LINE; - s_command.Instruction = EXT_QUAD_IN_FAST_PROG_CMD; - s_command.AddressMode = QSPI_ADDRESS_4_LINES; - s_command.AddressSize = QSPI_ADDRESS_24_BITS; - s_command.AlternateByteMode = QSPI_ALTERNATE_BYTES_NONE; - s_command.DataMode = QSPI_DATA_4_LINES; - s_command.DummyCycles = 0; - s_command.DdrMode = QSPI_DDR_MODE_DISABLE; - s_command.DdrHoldHalfCycle = QSPI_DDR_HHC_ANALOG_DELAY; - s_command.SIOOMode = QSPI_SIOO_INST_EVERY_CMD; - - /* Perform the write page by page */ - do - { - s_command.Address = current_addr; - s_command.NbData = current_size; - - /* Enable write operations */ - if (QSPI_WriteEnable(&QSPIHandle) != QSPI_OK) - { - return QSPI_ERROR; - } - - /* Configure the command */ - if (HAL_QSPI_Command(&QSPIHandle, &s_command, HAL_QPSI_TIMEOUT_DEFAULT_VALUE) != HAL_OK) - { - return QSPI_ERROR; - } - - /* Transmission of the data */ - if (HAL_QSPI_Transmit(&QSPIHandle, pData, HAL_QPSI_TIMEOUT_DEFAULT_VALUE) != HAL_OK) - { - return QSPI_ERROR; - } - - /* Configure automatic polling mode to wait for end of program */ - if (QSPI_AutoPollingMemReady(&QSPIHandle, HAL_QPSI_TIMEOUT_DEFAULT_VALUE) != QSPI_OK) - { - return QSPI_ERROR; - } - - /* Update the address and size variables for next page programming */ - current_addr += current_size; - pData += current_size; - current_size = ((current_addr + N25Q128A_PAGE_SIZE) > end_addr) ? (end_addr - current_addr) : N25Q128A_PAGE_SIZE; - } while (current_addr < end_addr); - - return QSPI_OK; -} - -/** - * @brief Erases the specified block of the QSPI memory. - * @param BlockAddress: Block address to erase - * @retval QSPI memory status - */ -uint8_t BSP_QSPI_Erase_Block(uint32_t BlockAddress) -{ - QSPI_CommandTypeDef s_command; - - /* Initialize the erase command */ - s_command.InstructionMode = QSPI_INSTRUCTION_1_LINE; - s_command.Instruction = SUBSECTOR_ERASE_CMD; - s_command.AddressMode = QSPI_ADDRESS_1_LINE; - s_command.AddressSize = QSPI_ADDRESS_24_BITS; - s_command.Address = BlockAddress; - s_command.AlternateByteMode = QSPI_ALTERNATE_BYTES_NONE; - s_command.DataMode = QSPI_DATA_NONE; - s_command.DummyCycles = 0; - s_command.DdrMode = QSPI_DDR_MODE_DISABLE; - s_command.DdrHoldHalfCycle = QSPI_DDR_HHC_ANALOG_DELAY; - s_command.SIOOMode = QSPI_SIOO_INST_EVERY_CMD; - - /* Enable write operations */ - if (QSPI_WriteEnable(&QSPIHandle) != QSPI_OK) - { - return QSPI_ERROR; - } - - /* Send the command */ - if (HAL_QSPI_Command(&QSPIHandle, &s_command, HAL_QPSI_TIMEOUT_DEFAULT_VALUE) != HAL_OK) - { - return QSPI_ERROR; - } - - /* Configure automatic polling mode to wait for end of erase */ - if (QSPI_AutoPollingMemReady(&QSPIHandle, N25Q128A_SUBSECTOR_ERASE_MAX_TIME) != QSPI_OK) - { - return QSPI_ERROR; - } - - return QSPI_OK; -} - -/** - * @brief Erases the entire QSPI memory. - * @retval QSPI memory status - */ -uint8_t BSP_QSPI_Erase_Chip(void) -{ - QSPI_CommandTypeDef s_command; - - /* Initialize the erase command */ - s_command.InstructionMode = QSPI_INSTRUCTION_1_LINE; - s_command.Instruction = BULK_ERASE_CMD; - s_command.AddressMode = QSPI_ADDRESS_NONE; - s_command.AlternateByteMode = QSPI_ALTERNATE_BYTES_NONE; - s_command.DataMode = QSPI_DATA_NONE; - s_command.DummyCycles = 0; - s_command.DdrMode = QSPI_DDR_MODE_DISABLE; - s_command.DdrHoldHalfCycle = QSPI_DDR_HHC_ANALOG_DELAY; - s_command.SIOOMode = QSPI_SIOO_INST_EVERY_CMD; - - /* Enable write operations */ - if (QSPI_WriteEnable(&QSPIHandle) != QSPI_OK) - { - return QSPI_ERROR; - } - - /* Send the command */ - if (HAL_QSPI_Command(&QSPIHandle, &s_command, HAL_QPSI_TIMEOUT_DEFAULT_VALUE) != HAL_OK) - { - return QSPI_ERROR; - } - - /* Configure automatic polling mode to wait for end of erase */ - if (QSPI_AutoPollingMemReady(&QSPIHandle, N25Q128A_BULK_ERASE_MAX_TIME) != QSPI_OK) - { - return QSPI_ERROR; - } - - return QSPI_OK; -} - -/** - * @brief Reads current status of the QSPI memory. - * @retval QSPI memory status - */ -uint8_t BSP_QSPI_GetStatus(void) -{ - QSPI_CommandTypeDef s_command; - uint8_t reg; - - /* Initialize the read flag status register command */ - s_command.InstructionMode = QSPI_INSTRUCTION_1_LINE; - s_command.Instruction = READ_FLAG_STATUS_REG_CMD; - s_command.AddressMode = QSPI_ADDRESS_NONE; - s_command.AlternateByteMode = QSPI_ALTERNATE_BYTES_NONE; - s_command.DataMode = QSPI_DATA_1_LINE; - s_command.DummyCycles = 0; - s_command.NbData = 1; - s_command.DdrMode = QSPI_DDR_MODE_DISABLE; - s_command.DdrHoldHalfCycle = QSPI_DDR_HHC_ANALOG_DELAY; - s_command.SIOOMode = QSPI_SIOO_INST_EVERY_CMD; - - /* Configure the command */ - if (HAL_QSPI_Command(&QSPIHandle, &s_command, HAL_QPSI_TIMEOUT_DEFAULT_VALUE) != HAL_OK) - { - return QSPI_ERROR; - } - - /* Reception of the data */ - if (HAL_QSPI_Receive(&QSPIHandle, ®, HAL_QPSI_TIMEOUT_DEFAULT_VALUE) != HAL_OK) - { - return QSPI_ERROR; - } - - /* Check the value of the register */ - if ((reg & (N25Q128A_FSR_PRERR | N25Q128A_FSR_VPPERR | N25Q128A_FSR_PGERR | N25Q128A_FSR_ERERR)) != 0) - { - return QSPI_ERROR; - } - else if ((reg & (N25Q128A_FSR_PGSUS | N25Q128A_FSR_ERSUS)) != 0) - { - return QSPI_SUSPENDED; - } - else if ((reg & N25Q128A_FSR_READY) != 0) - { - return QSPI_OK; - } - else - { - return QSPI_BUSY; - } -} - -/** - * @brief Reads the configuration of the memory and fills QspiInfo struct - * @param pInfo pointer to Info structure - * @retval QSPI memory status - */ -uint8_t BSP_QSPI_GetInfo(QSPI_InfoTypeDef* pInfo) -{ - /* Configure the structure with the memory configuration */ - pInfo->FlashSize = N25Q128A_FLASH_SIZE; - pInfo->EraseSectorSize = N25Q128A_SUBSECTOR_SIZE; - pInfo->EraseSectorsNumber = (N25Q128A_FLASH_SIZE/N25Q128A_SUBSECTOR_SIZE); - pInfo->ProgPageSize = N25Q128A_PAGE_SIZE; - pInfo->ProgPagesNumber = (N25Q128A_FLASH_SIZE/N25Q128A_PAGE_SIZE); - - return QSPI_OK; -} - -/** - * @brief Configure the QSPI in memory-mapped mode - * @param None - * @retval QSPI memory status - */ -uint8_t BSP_QSPI_MemoryMappedMode(void) -{ - QSPI_CommandTypeDef s_command; - QSPI_MemoryMappedTypeDef s_mem_mapped_cfg; - - /* Configure the command for the read instruction */ - s_command.InstructionMode = QSPI_INSTRUCTION_1_LINE; - s_command.Instruction = QUAD_INOUT_FAST_READ_CMD; - s_command.AddressMode = QSPI_ADDRESS_4_LINES; - s_command.AddressSize = QSPI_ADDRESS_24_BITS; - s_command.AlternateByteMode = QSPI_ALTERNATE_BYTES_NONE; - s_command.DataMode = QSPI_DATA_4_LINES; - s_command.DummyCycles = N25Q128A_DUMMY_CYCLES_READ_QUAD; - s_command.DdrMode = QSPI_DDR_MODE_DISABLE; - s_command.DdrHoldHalfCycle = QSPI_DDR_HHC_ANALOG_DELAY; - s_command.SIOOMode = QSPI_SIOO_INST_EVERY_CMD; - - /* Configure the memory mapped mode */ - s_mem_mapped_cfg.TimeOutActivation = QSPI_TIMEOUT_COUNTER_ENABLE; - s_mem_mapped_cfg.TimeOutPeriod = 100; - - if (HAL_QSPI_MemoryMapped(&QSPIHandle, &s_command, &s_mem_mapped_cfg) != HAL_OK) - { - return QSPI_ERROR; - } - - return QSPI_OK; -} - -/** - * @} - */ - -/** @addtogroup STM32446E_Discovery_QSPI_Private_Functions - * @{ - */ - -/** - * @brief QSPI MSP Initialization - * This function configures the hardware resources used in this example: - * - Peripheral's clock enable - * - Peripheral's GPIO Configuration - * - NVIC configuration for QSPI interrupt - * @retval None - */ -__weak void BSP_QSPI_MspInit(QSPI_HandleTypeDef *hqspi, void *Params) -{ - GPIO_InitTypeDef gpio_init_structure; - - /*##-1- Enable peripherals and GPIO Clocks #################################*/ - /* Enable the QuadSPI memory interface clock */ - QSPI_CLK_ENABLE(); - /* Reset the QuadSPI memory interface */ - QSPI_FORCE_RESET(); - QSPI_RELEASE_RESET(); - /* Enable GPIO clocks */ - QSPI_CS_GPIO_CLK_ENABLE(); - QSPI_DX_CLK_GPIO_CLK_ENABLE(); - - /*##-2- Configure peripheral GPIO ##########################################*/ - /* QSPI CS GPIO pin configuration */ - gpio_init_structure.Pin = QSPI_CS_PIN; - gpio_init_structure.Mode = GPIO_MODE_AF_PP; - gpio_init_structure.Pull = GPIO_PULLUP; - gpio_init_structure.Speed = GPIO_SPEED_HIGH; - gpio_init_structure.Alternate = GPIO_AF10_QSPI; - HAL_GPIO_Init(QSPI_CS_GPIO_PORT, &gpio_init_structure); - - /* QSPI CLK GPIO pin configuration */ - gpio_init_structure.Pin = QSPI_CLK_PIN; - gpio_init_structure.Pull = GPIO_NOPULL; - gpio_init_structure.Alternate = GPIO_AF9_QSPI; - HAL_GPIO_Init(QSPI_CLK_GPIO_PORT, &gpio_init_structure); - - /* QSPI D0 and D1 GPIO pin configuration */ - gpio_init_structure.Pin = (QSPI_D0_PIN | QSPI_D1_PIN); - gpio_init_structure.Alternate = GPIO_AF10_QSPI; - HAL_GPIO_Init(QSPI_DX_GPIO_PORT, &gpio_init_structure); - - /* QSPI D2 and D3 GPIO pin configuration */ - gpio_init_structure.Pin = (QSPI_D2_PIN | QSPI_D3_PIN) ; - gpio_init_structure.Alternate = GPIO_AF9_QSPI; - HAL_GPIO_Init(QSPI_DX_GPIO_PORT, &gpio_init_structure); - - /*##-3- Configure the NVIC for QSPI #########################################*/ - /* NVIC configuration for QSPI interrupt */ - HAL_NVIC_SetPriority(QUADSPI_IRQn, 0x0F, 0); - HAL_NVIC_EnableIRQ(QUADSPI_IRQn); - -} - -/** - * @brief QSPI MSP De-Initialization - * This function frees the hardware resources used in this example: - * - Disable the Peripheral's clock - * - Revert GPIO and NVIC configuration to their default state - * @retval None - */ -__weak void BSP_QSPI_MspDeInit(QSPI_HandleTypeDef *hqspi, void *Params) -{ - /*##-1- Disable the NVIC for QSPI ###########################################*/ - HAL_NVIC_DisableIRQ(QUADSPI_IRQn); - - /*##-2- Disable peripherals and GPIO Clocks ################################*/ - /* De-Configure QSPI pins */ - HAL_GPIO_DeInit(QSPI_CS_GPIO_PORT, QSPI_CS_PIN); - HAL_GPIO_DeInit(QSPI_CLK_GPIO_PORT, QSPI_CLK_PIN); - HAL_GPIO_DeInit(QSPI_DX_GPIO_PORT, QSPI_D0_PIN); - HAL_GPIO_DeInit(QSPI_DX_GPIO_PORT, QSPI_D1_PIN); - HAL_GPIO_DeInit(QSPI_DX_GPIO_PORT, QSPI_D2_PIN); - HAL_GPIO_DeInit(QSPI_DX_GPIO_PORT, QSPI_D3_PIN); - - /*##-3- Reset peripherals ##################################################*/ - /* Reset the QuadSPI memory interface */ - QSPI_FORCE_RESET(); - QSPI_RELEASE_RESET(); - - /* Disable the QuadSPI memory interface clock */ - QSPI_CLK_DISABLE(); -} - -/** - * @brief This function reset the QSPI memory. - * @param hqspi: QSPI handle - * @retval None - */ -static uint8_t QSPI_ResetMemory(QSPI_HandleTypeDef *hqspi) -{ - QSPI_CommandTypeDef s_command; - - /* Initialize the reset enable command */ - s_command.InstructionMode = QSPI_INSTRUCTION_1_LINE; - s_command.Instruction = RESET_ENABLE_CMD; - s_command.AddressMode = QSPI_ADDRESS_NONE; - s_command.AlternateByteMode = QSPI_ALTERNATE_BYTES_NONE; - s_command.DataMode = QSPI_DATA_NONE; - s_command.DummyCycles = 0; - s_command.DdrMode = QSPI_DDR_MODE_DISABLE; - s_command.DdrHoldHalfCycle = QSPI_DDR_HHC_ANALOG_DELAY; - s_command.SIOOMode = QSPI_SIOO_INST_EVERY_CMD; - - /* Send the command */ - if (HAL_QSPI_Command(hqspi, &s_command, HAL_QPSI_TIMEOUT_DEFAULT_VALUE) != HAL_OK) - { - return QSPI_ERROR; - } - - /* Send the reset memory command */ - s_command.Instruction = RESET_MEMORY_CMD; - if (HAL_QSPI_Command(hqspi, &s_command, HAL_QPSI_TIMEOUT_DEFAULT_VALUE) != HAL_OK) - { - return QSPI_ERROR; - } - - /* Configure automatic polling mode to wait the memory is ready */ - if (QSPI_AutoPollingMemReady(hqspi, HAL_QPSI_TIMEOUT_DEFAULT_VALUE) != QSPI_OK) - { - return QSPI_ERROR; - } - - return QSPI_OK; -} - -/** - * @brief This function configure the dummy cycles on memory side. - * @param hqspi: QSPI handle - * @retval None - */ -static uint8_t QSPI_DummyCyclesCfg(QSPI_HandleTypeDef *hqspi) -{ - QSPI_CommandTypeDef s_command; - uint8_t reg; - - /* Initialize the read volatile configuration register command */ - s_command.InstructionMode = QSPI_INSTRUCTION_1_LINE; - s_command.Instruction = READ_VOL_CFG_REG_CMD; - s_command.AddressMode = QSPI_ADDRESS_NONE; - s_command.AlternateByteMode = QSPI_ALTERNATE_BYTES_NONE; - s_command.DataMode = QSPI_DATA_1_LINE; - s_command.DummyCycles = 0; - s_command.NbData = 1; - s_command.DdrMode = QSPI_DDR_MODE_DISABLE; - s_command.DdrHoldHalfCycle = QSPI_DDR_HHC_ANALOG_DELAY; - s_command.SIOOMode = QSPI_SIOO_INST_EVERY_CMD; - - /* Configure the command */ - if (HAL_QSPI_Command(hqspi, &s_command, HAL_QPSI_TIMEOUT_DEFAULT_VALUE) != HAL_OK) - { - return QSPI_ERROR; - } - - /* Reception of the data */ - if (HAL_QSPI_Receive(hqspi, ®, HAL_QPSI_TIMEOUT_DEFAULT_VALUE) != HAL_OK) - { - return QSPI_ERROR; - } - - /* Enable write operations */ - if (QSPI_WriteEnable(hqspi) != QSPI_OK) - { - return QSPI_ERROR; - } - - /* Update volatile configuration register (with new dummy cycles) */ - s_command.Instruction = WRITE_VOL_CFG_REG_CMD; - MODIFY_REG(reg, N25Q128A_VCR_NB_DUMMY, (N25Q128A_DUMMY_CYCLES_READ_QUAD << POSITION_VAL(N25Q128A_VCR_NB_DUMMY))); - - /* Configure the write volatile configuration register command */ - if (HAL_QSPI_Command(hqspi, &s_command, HAL_QPSI_TIMEOUT_DEFAULT_VALUE) != HAL_OK) - { - return QSPI_ERROR; - } - - /* Transmission of the data */ - if (HAL_QSPI_Transmit(hqspi, ®, HAL_QPSI_TIMEOUT_DEFAULT_VALUE) != HAL_OK) - { - return QSPI_ERROR; - } - - return QSPI_OK; -} - -/** - * @brief This function send a Write Enable and wait it is effective. - * @param hqspi: QSPI handle - * @retval None - */ -static uint8_t QSPI_WriteEnable(QSPI_HandleTypeDef *hqspi) -{ - QSPI_CommandTypeDef s_command; - QSPI_AutoPollingTypeDef s_config; - - /* Enable write operations */ - s_command.InstructionMode = QSPI_INSTRUCTION_1_LINE; - s_command.Instruction = WRITE_ENABLE_CMD; - s_command.AddressMode = QSPI_ADDRESS_NONE; - s_command.AlternateByteMode = QSPI_ALTERNATE_BYTES_NONE; - s_command.DataMode = QSPI_DATA_NONE; - s_command.DummyCycles = 0; - s_command.DdrMode = QSPI_DDR_MODE_DISABLE; - s_command.DdrHoldHalfCycle = QSPI_DDR_HHC_ANALOG_DELAY; - s_command.SIOOMode = QSPI_SIOO_INST_EVERY_CMD; - - if (HAL_QSPI_Command(hqspi, &s_command, HAL_QPSI_TIMEOUT_DEFAULT_VALUE) != HAL_OK) - { - return QSPI_ERROR; - } - - /* Configure automatic polling mode to wait for write enabling */ - s_config.Match = N25Q128A_SR_WREN; - s_config.Mask = N25Q128A_SR_WREN; - s_config.MatchMode = QSPI_MATCH_MODE_AND; - s_config.StatusBytesSize = 1; - s_config.Interval = 0x10; - s_config.AutomaticStop = QSPI_AUTOMATIC_STOP_ENABLE; - - s_command.Instruction = READ_STATUS_REG_CMD; - s_command.DataMode = QSPI_DATA_1_LINE; - - if (HAL_QSPI_AutoPolling(hqspi, &s_command, &s_config, HAL_QPSI_TIMEOUT_DEFAULT_VALUE) != HAL_OK) - { - return QSPI_ERROR; - } - - return QSPI_OK; -} - -/** - * @brief This function read the SR of the memory and wait the EOP. - * @param hqspi: QSPI handle - * @param Timeout: timeout value before returning an error - * @retval None - */ -static uint8_t QSPI_AutoPollingMemReady(QSPI_HandleTypeDef *hqspi, uint32_t Timeout) -{ - QSPI_CommandTypeDef s_command; - QSPI_AutoPollingTypeDef s_config; - - /* Configure automatic polling mode to wait for memory ready */ - s_command.InstructionMode = QSPI_INSTRUCTION_1_LINE; - s_command.Instruction = READ_STATUS_REG_CMD; - s_command.AddressMode = QSPI_ADDRESS_NONE; - s_command.AlternateByteMode = QSPI_ALTERNATE_BYTES_NONE; - s_command.DataMode = QSPI_DATA_1_LINE; - s_command.DummyCycles = 0; - s_command.DdrMode = QSPI_DDR_MODE_DISABLE; - s_command.DdrHoldHalfCycle = QSPI_DDR_HHC_ANALOG_DELAY; - s_command.SIOOMode = QSPI_SIOO_INST_EVERY_CMD; - - s_config.Match = 0; - s_config.Mask = N25Q128A_SR_WIP; - s_config.MatchMode = QSPI_MATCH_MODE_AND; - s_config.StatusBytesSize = 1; - s_config.Interval = 0x10; - s_config.AutomaticStop = QSPI_AUTOMATIC_STOP_ENABLE; - - if (HAL_QSPI_AutoPolling(hqspi, &s_command, &s_config, Timeout) != HAL_OK) - { - return QSPI_ERROR; - } - - return QSPI_OK; -} -/** - * @} - */ - -/** - * @} - */ - -/** - * @} - */ - -/** - * @} - */ - -/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ -
--- a/stm32469i_discovery/stm32469i_discovery_qspi.h Mon May 30 11:09:05 2016 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,164 +0,0 @@ -/** - ****************************************************************************** - * @file stm32469i_discovery_qspi.h - * @author MCD Application Team - * @version V1.0.1 - * @date 29-September-2015 - * @brief This file contains the common defines and functions prototypes for - * the stm32469i_discovery_qspi.c driver. - ****************************************************************************** - * @attention - * - * <h2><center>© COPYRIGHT(c) 2015 STMicroelectronics</center></h2> - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. Neither the name of STMicroelectronics nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - ****************************************************************************** - */ - -/** @addtogroup BSP - * @{ - */ - -/** @addtogroup STM32469I_Discovery - * @{ - */ - -/* Define to prevent recursive inclusion -------------------------------------*/ -#ifndef __STM32469I_DISCOVERY_QSPI_H -#define __STM32469I_DISCOVERY_QSPI_H - -#ifdef __cplusplus - extern "C" { -#endif - -/* Includes ------------------------------------------------------------------*/ -#include "stm32f4xx_hal.h" -#include "../Components/n25q128a/n25q128a.h" - - -/** @addtogroup STM32469I_Discovery_QSPI - * @{ - */ - - -/* Exported constants --------------------------------------------------------*/ -/** @defgroup STM32446E_Discovery_QSPI_Exported_Constants Exported Constants - * @{ - */ -/* QSPI Error codes */ -#define QSPI_OK ((uint8_t)0x00) -#define QSPI_ERROR ((uint8_t)0x01) -#define QSPI_BUSY ((uint8_t)0x02) -#define QSPI_NOT_SUPPORTED ((uint8_t)0x04) -#define QSPI_SUSPENDED ((uint8_t)0x08) - - -/* Definition for QSPI clock resources */ -#define QSPI_CLK_ENABLE() __HAL_RCC_QSPI_CLK_ENABLE() -#define QSPI_CLK_DISABLE() __HAL_RCC_QSPI_CLK_DISABLE() -#define QSPI_CS_GPIO_CLK_ENABLE() __HAL_RCC_GPIOB_CLK_ENABLE() -#define QSPI_CS_GPIO_CLK_DISABLE() __HAL_RCC_GPIOB_CLK_DISABLE() -#define QSPI_DX_CLK_GPIO_CLK_ENABLE() __HAL_RCC_GPIOF_CLK_ENABLE() -#define QSPI_DX_CLK_GPIO_CLK_DISABLE() __HAL_RCC_GPIOF_CLK_DISABLE() - -#define QSPI_FORCE_RESET() __HAL_RCC_QSPI_FORCE_RESET() -#define QSPI_RELEASE_RESET() __HAL_RCC_QSPI_RELEASE_RESET() - -/* Definition for QSPI Pins */ -#define QSPI_CS_PIN GPIO_PIN_6 -#define QSPI_CS_GPIO_PORT GPIOB -#define QSPI_CLK_PIN GPIO_PIN_10 -#define QSPI_CLK_GPIO_PORT GPIOF -#define QSPI_D0_PIN GPIO_PIN_8 -#define QSPI_D1_PIN GPIO_PIN_9 -#define QSPI_D2_PIN GPIO_PIN_7 -#define QSPI_D3_PIN GPIO_PIN_6 -#define QSPI_DX_GPIO_PORT GPIOF - - -/** - * @} - */ - -/* Exported types ------------------------------------------------------------*/ -/** @defgroup STM32446E_Discovery_QSPI_Exported_Types Exported Types - * @{ - */ -/** - * @brief QSPI Info - * */ -typedef struct { - uint32_t FlashSize; /*!< Size of the flash */ - uint32_t EraseSectorSize; /*!< Size of sectors for the erase operation */ - uint32_t EraseSectorsNumber; /*!< Number of sectors for the erase operation */ - uint32_t ProgPageSize; /*!< Size of pages for the program operation */ - uint32_t ProgPagesNumber; /*!< Number of pages for the program operation */ -} QSPI_InfoTypeDef; - -/** - * @} - */ - - -/* Exported functions --------------------------------------------------------*/ -/** @addtogroup STM32446E_Discovery_QSPI_Exported_Functions - * @{ - */ -uint8_t BSP_QSPI_Init (void); -uint8_t BSP_QSPI_DeInit (void); -uint8_t BSP_QSPI_Read (uint8_t* pData, uint32_t ReadAddr, uint32_t Size); -uint8_t BSP_QSPI_Write (uint8_t* pData, uint32_t WriteAddr, uint32_t Size); -uint8_t BSP_QSPI_Erase_Block(uint32_t BlockAddress); -uint8_t BSP_QSPI_Erase_Chip (void); -uint8_t BSP_QSPI_GetStatus (void); -uint8_t BSP_QSPI_GetInfo (QSPI_InfoTypeDef* pInfo); -uint8_t BSP_QSPI_MemoryMappedMode(void); - -/* These function can be modified in case the current settings (e.g. DMA stream) - need to be changed for specific application needs */ -void BSP_QSPI_MspInit(QSPI_HandleTypeDef *hqspi, void *Params); -void BSP_QSPI_MspDeInit(QSPI_HandleTypeDef *hqspi, void *Params); - -/** - * @} - */ - -/** - * @} - */ - -#ifdef __cplusplus -} -#endif - -#endif /* __STM32469I_DISCOVERY_QSPI_H */ -/** - * @} - */ - -/** - * @} - */ - -/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
--- a/stm32469i_discovery/stm32469i_discovery_sd.c Mon May 30 11:09:05 2016 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,598 +0,0 @@ -/** - ****************************************************************************** - * @file stm32469i_discovery_sd.c - * @author MCD Application Team - * @version V1.0.1 - * @date 29-September-2015 - * @brief This file includes the uSD card driver mounted on STM32469I-Discovery - * board. - ****************************************************************************** - * @attention - * - * <h2><center>© COPYRIGHT(c) 2015 STMicroelectronics</center></h2> - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. Neither the name of STMicroelectronics nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - ****************************************************************************** - */ - -/* File Info : ----------------------------------------------------------------- - User NOTES -1. How To use this driver: --------------------------- - - This driver is used to drive the micro SD external card mounted on STM32469I-Discovery - board. - - This driver does not need a specific component driver for the micro SD device - to be included with. - -2. Driver description: ---------------------- - + Initialization steps: - o Initialize the micro SD card using the BSP_SD_Init() function. This - function includes the MSP layer hardware resources initialization and the - SDIO interface configuration to interface with the external micro SD. It - also includes the micro SD initialization sequence. - o To check the SD card presence you can use the function BSP_SD_IsDetected() which - returns the detection status - o If SD presence detection interrupt mode is desired, you must configure the - SD detection interrupt mode by calling the function BSP_SD_ITConfig(). The interrupt - is generated as an external interrupt whenever the micro SD card is - plugged/unplugged in/from the discovery board. The SD detection interrupt - is handled by calling the function BSP_SD_DetectIT() which is called in the IRQ - handler file, the user callback is implemented in the function BSP_SD_DetectCallback(). - o The function BSP_SD_GetCardInfo() is used to get the micro SD card information - which is stored in the structure "HAL_SD_CardInfoTypedef". - - + Micro SD card operations - o The micro SD card can be accessed with read/write block(s) operations once - it is reay for access. The access cand be performed whether using the polling - mode by calling the functions BSP_SD_ReadBlocks()/BSP_SD_WriteBlocks(), or by DMA - transfer using the functions BSP_SD_ReadBlocks_DMA()/BSP_SD_WriteBlocks_DMA() - o The DMA transfer complete is used with interrupt mode. Once the SD transfer - is complete, the SD interrupt is handeled using the function BSP_SD_IRQHandler(), - the DMA Tx/Rx transfer complete are handeled using the functions - BSP_SD_DMA_Tx_IRQHandler()/BSP_SD_DMA_Rx_IRQHandler(). The corresponding user callbacks - are implemented by the user at application level. - o The SD erase block(s) is performed using the function BSP_SD_Erase() with specifying - the number of blocks to erase. - o The SD runtime status is returned when calling the function BSP_SD_GetStatus(). - -------------------------------------------------------------------------------*/ - -/* Includes ------------------------------------------------------------------*/ -#include "stm32469i_discovery_sd.h" - -/** @addtogroup BSP - * @{ - */ - -/** @addtogroup STM32469I-Discovery - * @{ - */ - -/** @defgroup STM32469I-Discovery_SD STM32469I-Discovery SD - * @{ - */ - - -/** @defgroup STM32469I-Discovery_SD_Private_TypesDefinitions STM32469I Discovery Sd Private TypesDef - * @{ - */ -/** - * @} - */ - -/** @defgroup STM32469I-Discovery_SD_Private_Defines STM32469I Discovery Sd Private Defines - * @{ - */ -/** - * @} - */ - -/** @defgroup STM32469I-Discovery_SD_Private_Macros STM32469I Discovery Sd Private Macro - * @{ - */ -/** - * @} - */ - -/** @defgroup STM32469I-Discovery_SD_Private_Variables STM32469I Discovery Sd Private Variables - * @{ - */ -static SD_HandleTypeDef uSdHandle; -static SD_CardInfo uSdCardInfo; - -/** - * @} - */ - -/** @defgroup STM32469I-Discovery_SD_Private_FunctionPrototypes STM32469I Discovery Sd Private Prototypes - * @{ - */ -/** - * @} - */ - -/** @defgroup STM32469I-Discovery_SD_Private_Functions STM32469I Discovery Sd Private Functions - * @{ - */ - -/** - * @brief Initializes the SD card device. - * @retval SD status - */ -uint8_t BSP_SD_Init(void) -{ - uint8_t sd_state = MSD_OK; - - /* PLLSAI is dedicated to LCD periph. Do not use it to get 48MHz*/ - - /* uSD device interface configuration */ - uSdHandle.Instance = SDIO; - - uSdHandle.Init.ClockEdge = SDIO_CLOCK_EDGE_RISING; - uSdHandle.Init.ClockBypass = SDIO_CLOCK_BYPASS_DISABLE; - uSdHandle.Init.ClockPowerSave = SDIO_CLOCK_POWER_SAVE_DISABLE; - uSdHandle.Init.BusWide = SDIO_BUS_WIDE_1B; - uSdHandle.Init.HardwareFlowControl = SDIO_HARDWARE_FLOW_CONTROL_ENABLE; - uSdHandle.Init.ClockDiv = SDIO_TRANSFER_CLK_DIV; - - /* Msp SD Detect pin initialization */ - BSP_SD_Detect_MspInit(&uSdHandle, NULL); - if(BSP_SD_IsDetected() != SD_PRESENT) /* Check if SD card is present */ - { - return MSD_ERROR_SD_NOT_PRESENT; - } - - /* Msp SD initialization */ - BSP_SD_MspInit(&uSdHandle, NULL); - - /* HAL SD initialization */ - if(HAL_SD_Init(&uSdHandle, &uSdCardInfo) != SD_OK) - { - sd_state = MSD_ERROR; - } - - /* Configure SD Bus width */ - if(sd_state == MSD_OK) - { - /* Enable wide operation */ - if(HAL_SD_WideBusOperation_Config(&uSdHandle, SDIO_BUS_WIDE_4B) != SD_OK) - { - sd_state = MSD_ERROR; - } - else - { - sd_state = MSD_OK; - } - } - return sd_state; -} - -/** - * @brief DeInitializes the SD card device. - * @retval SD status - */ -uint8_t BSP_SD_DeInit(void) -{ - uint8_t sd_state = MSD_OK; - - uSdHandle.Instance = SDIO; - - /* HAL SD deinitialization */ - if(HAL_SD_DeInit(&uSdHandle) != HAL_OK) - { - sd_state = MSD_ERROR; - } - - /* Msp SD deinitialization */ - uSdHandle.Instance = SDIO; - BSP_SD_MspDeInit(&uSdHandle, NULL); - - return sd_state; -} - -/** - * @brief Configures Interrupt mode for SD detection pin. - * @retval Returns 0 - */ -uint8_t BSP_SD_ITConfig(void) -{ - GPIO_InitTypeDef gpio_init_structure; - - /* Configure Interrupt mode for SD detection pin */ - gpio_init_structure.Pin = SD_DETECT_PIN; - gpio_init_structure.Pull = GPIO_PULLUP; - gpio_init_structure.Speed = GPIO_SPEED_FAST; - gpio_init_structure.Mode = GPIO_MODE_IT_RISING_FALLING; - HAL_GPIO_Init(SD_DETECT_GPIO_PORT, &gpio_init_structure); - - /* Enable and set SD detect EXTI Interrupt to the lowest priority */ - HAL_NVIC_SetPriority((IRQn_Type)(SD_DETECT_EXTI_IRQn), 0x0F, 0x00); - HAL_NVIC_EnableIRQ((IRQn_Type)(SD_DETECT_EXTI_IRQn)); - - return MSD_OK; -} - -/** - * @brief Detects if SD card is correctly plugged in the memory slot or not. - * @retval Returns if SD is detected or not - */ -uint8_t BSP_SD_IsDetected(void) -{ - __IO uint8_t status = SD_PRESENT; - - /* Check SD card detect pin */ - if (HAL_GPIO_ReadPin(SD_DETECT_GPIO_PORT, SD_DETECT_PIN) == GPIO_PIN_SET) - { - status = SD_NOT_PRESENT; - } - - return status; -} - - - -/** - * @brief Reads block(s) from a specified address in an SD card, in polling mode. - * @param pData: Pointer to the buffer that will contain the data to transmit - * @param ReadAddr: Address from where data is to be read - * @param BlockSize: SD card data block size, that should be 512 - * @param NumOfBlocks: Number of SD blocks to read - * @retval SD status - */ -uint8_t BSP_SD_ReadBlocks(uint32_t *pData, uint64_t ReadAddr, uint32_t BlockSize, uint32_t NumOfBlocks) -{ - if(HAL_SD_ReadBlocks(&uSdHandle, pData, ReadAddr, BlockSize, NumOfBlocks) != SD_OK) - { - return MSD_ERROR; - } - else - { - return MSD_OK; - } -} - -/** - * @brief Writes block(s) to a specified address in an SD card, in polling mode. - * @param pData: Pointer to the buffer that will contain the data to transmit - * @param WriteAddr: Address from where data is to be written - * @param BlockSize: SD card data block size, that should be 512 - * @param NumOfBlocks: Number of SD blocks to write - * @retval SD status - */ -uint8_t BSP_SD_WriteBlocks(uint32_t *pData, uint64_t WriteAddr, uint32_t BlockSize, uint32_t NumOfBlocks) -{ - if(HAL_SD_WriteBlocks(&uSdHandle, pData, WriteAddr, BlockSize, NumOfBlocks) != SD_OK) - { - return MSD_ERROR; - } - else - { - return MSD_OK; - } -} - -/** - * @brief Reads block(s) from a specified address in an SD card, in DMA mode. - * @param pData: Pointer to the buffer that will contain the data to transmit - * @param ReadAddr: Address from where data is to be read - * @param BlockSize: SD card data block size, that should be 512 - * @param NumOfBlocks: Number of SD blocks to read - * @retval SD status - */ -uint8_t BSP_SD_ReadBlocks_DMA(uint32_t *pData, uint64_t ReadAddr, uint32_t BlockSize, uint32_t NumOfBlocks) -{ - uint8_t sd_state = MSD_OK; - - /* Read block(s) in DMA transfer mode */ - if(HAL_SD_ReadBlocks_DMA(&uSdHandle, pData, ReadAddr, BlockSize, NumOfBlocks) != SD_OK) - { - sd_state = MSD_ERROR; - } - - /* Wait until transfer is complete */ - if(sd_state == MSD_OK) - { - if(HAL_SD_CheckReadOperation(&uSdHandle, (uint32_t)SD_DATATIMEOUT) != SD_OK) - { - sd_state = MSD_ERROR; - } - else - { - sd_state = MSD_OK; - } - } - - return sd_state; -} - -/** - * @brief Writes block(s) to a specified address in an SD card, in DMA mode. - * @param pData: Pointer to the buffer that will contain the data to transmit - * @param WriteAddr: Address from where data is to be written - * @param BlockSize: SD card data block size, that should be 512 - * @param NumOfBlocks: Number of SD blocks to write - * @retval SD status - */ -uint8_t BSP_SD_WriteBlocks_DMA(uint32_t *pData, uint64_t WriteAddr, uint32_t BlockSize, uint32_t NumOfBlocks) -{ - uint8_t sd_state = MSD_OK; - - /* Write block(s) in DMA transfer mode */ - if(HAL_SD_WriteBlocks_DMA(&uSdHandle, pData, WriteAddr, BlockSize, NumOfBlocks) != SD_OK) - { - sd_state = MSD_ERROR; - } - - /* Wait until transfer is complete */ - if(sd_state == MSD_OK) - { - if(HAL_SD_CheckWriteOperation(&uSdHandle, (uint32_t)SD_DATATIMEOUT) != SD_OK) - { - sd_state = MSD_ERROR; - } - else - { - sd_state = MSD_OK; - } - } - - return sd_state; -} - -/** - * @brief Erases the specified memory area of the given SD card. - * @param StartAddr: Start byte address - * @param EndAddr: End byte address - * @retval SD status - */ -uint8_t BSP_SD_Erase(uint64_t StartAddr, uint64_t EndAddr) -{ - if(HAL_SD_Erase(&uSdHandle, StartAddr, EndAddr) != SD_OK) - { - return MSD_ERROR; - } - else - { - return MSD_OK; - } -} - -/** - * @brief Initializes the SD MSP. - * @param hsd: SD handle - * @param Params : pointer on additional configuration parameters, can be NULL. - */ -__weak void BSP_SD_MspInit(SD_HandleTypeDef *hsd, void *Params) -{ - static DMA_HandleTypeDef dma_rx_handle; - static DMA_HandleTypeDef dma_tx_handle; - GPIO_InitTypeDef gpio_init_structure; - - /* Enable SDIO clock */ - __HAL_RCC_SDIO_CLK_ENABLE(); - - /* Enable DMA2 clocks */ - __DMAx_TxRx_CLK_ENABLE(); - - /* Enable GPIOs clock */ - __HAL_RCC_GPIOC_CLK_ENABLE(); - __HAL_RCC_GPIOD_CLK_ENABLE(); - - /* Common GPIO configuration */ - gpio_init_structure.Mode = GPIO_MODE_AF_PP; - gpio_init_structure.Pull = GPIO_PULLUP; - gpio_init_structure.Speed = GPIO_SPEED_HIGH; - gpio_init_structure.Alternate = GPIO_AF12_SDIO; - - /* GPIOC configuration */ - gpio_init_structure.Pin = GPIO_PIN_8 | GPIO_PIN_9 | GPIO_PIN_10 | GPIO_PIN_11 | GPIO_PIN_12; - - HAL_GPIO_Init(GPIOC, &gpio_init_structure); - - /* GPIOD configuration */ - gpio_init_structure.Pin = GPIO_PIN_2; - HAL_GPIO_Init(GPIOD, &gpio_init_structure); - - /* NVIC configuration for SDIO interrupts */ - HAL_NVIC_SetPriority(SDIO_IRQn, 5, 0); - HAL_NVIC_EnableIRQ(SDIO_IRQn); - - /* Configure DMA Rx parameters */ - dma_rx_handle.Init.Channel = SD_DMAx_Rx_CHANNEL; - dma_rx_handle.Init.Direction = DMA_PERIPH_TO_MEMORY; - dma_rx_handle.Init.PeriphInc = DMA_PINC_DISABLE; - dma_rx_handle.Init.MemInc = DMA_MINC_ENABLE; - dma_rx_handle.Init.PeriphDataAlignment = DMA_PDATAALIGN_WORD; - dma_rx_handle.Init.MemDataAlignment = DMA_MDATAALIGN_WORD; - dma_rx_handle.Init.Mode = DMA_PFCTRL; - dma_rx_handle.Init.Priority = DMA_PRIORITY_VERY_HIGH; - dma_rx_handle.Init.FIFOMode = DMA_FIFOMODE_ENABLE; - dma_rx_handle.Init.FIFOThreshold = DMA_FIFO_THRESHOLD_FULL; - dma_rx_handle.Init.MemBurst = DMA_MBURST_INC4; - dma_rx_handle.Init.PeriphBurst = DMA_PBURST_INC4; - - dma_rx_handle.Instance = SD_DMAx_Rx_STREAM; - - /* Associate the DMA handle */ - __HAL_LINKDMA(hsd, hdmarx, dma_rx_handle); - - /* Deinitialize the stream for new transfer */ - HAL_DMA_DeInit(&dma_rx_handle); - - /* Configure the DMA stream */ - HAL_DMA_Init(&dma_rx_handle); - - /* Configure DMA Tx parameters */ - dma_tx_handle.Init.Channel = SD_DMAx_Tx_CHANNEL; - dma_tx_handle.Init.Direction = DMA_MEMORY_TO_PERIPH; - dma_tx_handle.Init.PeriphInc = DMA_PINC_DISABLE; - dma_tx_handle.Init.MemInc = DMA_MINC_ENABLE; - dma_tx_handle.Init.PeriphDataAlignment = DMA_PDATAALIGN_WORD; - dma_tx_handle.Init.MemDataAlignment = DMA_MDATAALIGN_WORD; - dma_tx_handle.Init.Mode = DMA_PFCTRL; - dma_tx_handle.Init.Priority = DMA_PRIORITY_VERY_HIGH; - dma_tx_handle.Init.FIFOMode = DMA_FIFOMODE_ENABLE; - dma_tx_handle.Init.FIFOThreshold = DMA_FIFO_THRESHOLD_FULL; - dma_tx_handle.Init.MemBurst = DMA_MBURST_INC4; - dma_tx_handle.Init.PeriphBurst = DMA_PBURST_INC4; - - dma_tx_handle.Instance = SD_DMAx_Tx_STREAM; - - /* Associate the DMA handle */ - __HAL_LINKDMA(hsd, hdmatx, dma_tx_handle); - - /* Deinitialize the stream for new transfer */ - HAL_DMA_DeInit(&dma_tx_handle); - - /* Configure the DMA stream */ - HAL_DMA_Init(&dma_tx_handle); - - /* NVIC configuration for DMA transfer complete interrupt */ - HAL_NVIC_SetPriority(SD_DMAx_Rx_IRQn, 6, 0); - HAL_NVIC_EnableIRQ(SD_DMAx_Rx_IRQn); - - /* NVIC configuration for DMA transfer complete interrupt */ - HAL_NVIC_SetPriority(SD_DMAx_Tx_IRQn, 6, 0); - HAL_NVIC_EnableIRQ(SD_DMAx_Tx_IRQn); -} - -/** - * @brief Initializes the SD Detect pin MSP. - * @param hsd: SD handle - * @retval None - */ -__weak void BSP_SD_Detect_MspInit(SD_HandleTypeDef *hsd, void *Params) -{ - GPIO_InitTypeDef gpio_init_structure; - - SD_DETECT_GPIO_CLK_ENABLE(); - - /* GPIO configuration in input for uSD_Detect signal */ - gpio_init_structure.Pin = SD_DETECT_PIN; - gpio_init_structure.Mode = GPIO_MODE_INPUT; - gpio_init_structure.Pull = GPIO_PULLUP; - gpio_init_structure.Speed = GPIO_SPEED_HIGH; - HAL_GPIO_Init(SD_DETECT_GPIO_PORT, &gpio_init_structure); -} - -/** - * @brief DeInitializes the SD MSP. - * @param hsd: SD handle - * @param Params : pointer on additional configuration parameters, can be NULL. - */ -__weak void BSP_SD_MspDeInit(SD_HandleTypeDef *hsd, void *Params) -{ - static DMA_HandleTypeDef dma_rx_handle; - static DMA_HandleTypeDef dma_tx_handle; - - /* Disable NVIC for DMA transfer complete interrupts */ - HAL_NVIC_DisableIRQ(SD_DMAx_Rx_IRQn); - HAL_NVIC_DisableIRQ(SD_DMAx_Tx_IRQn); - - /* Deinitialize the stream for new transfer */ - dma_rx_handle.Instance = SD_DMAx_Rx_STREAM; - HAL_DMA_DeInit(&dma_rx_handle); - - /* Deinitialize the stream for new transfer */ - dma_tx_handle.Instance = SD_DMAx_Tx_STREAM; - HAL_DMA_DeInit(&dma_tx_handle); - - /* Disable NVIC for SDIO interrupts */ - HAL_NVIC_DisableIRQ(SDIO_IRQn); - - /* DeInit GPIO pins can be done in the application - (by surcharging this __weak function) */ - - /* Disable SDIO clock */ - __HAL_RCC_SDIO_CLK_DISABLE(); - - /* GPOI pins clock and DMA cloks can be shut down in the applic - by surcgarging this __weak function */ -} - -/** - * @brief Handles SD card interrupt request. - */ -void BSP_SD_IRQHandler(void) -{ - HAL_SD_IRQHandler(&uSdHandle); -} - -/** - * @brief Handles SD DMA Tx transfer interrupt request. - */ -void BSP_SD_DMA_Tx_IRQHandler(void) -{ - HAL_DMA_IRQHandler(uSdHandle.hdmatx); -} - -/** - * @brief Handles SD DMA Rx transfer interrupt request. - */ -void BSP_SD_DMA_Rx_IRQHandler(void) -{ - HAL_DMA_IRQHandler(uSdHandle.hdmarx); -} - -/** - * @brief Gets the current SD card data status. - * @retval Data transfer state. - * This value can be one of the following values: - * @arg SD_TRANSFER_OK: No data transfer is acting - * @arg SD_TRANSFER_BUSY: Data transfer is acting - * @arg SD_TRANSFER_ERROR: Data transfer error - */ -HAL_SD_TransferStateTypedef BSP_SD_GetStatus(void) -{ - return(HAL_SD_GetStatus(&uSdHandle)); -} - -/** - * @brief Get SD information about specific SD card. - * @param CardInfo: Pointer to HAL_SD_CardInfoTypedef structure - */ -void BSP_SD_GetCardInfo(HAL_SD_CardInfoTypedef *CardInfo) -{ - /* Get SD card Information */ - HAL_SD_Get_CardInfo(&uSdHandle, CardInfo); -} - -/** - * @} - */ - -/** - * @} - */ - -/** - * @} - */ - -/** - * @} - */ - -/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
--- a/stm32469i_discovery/stm32469i_discovery_sd.h Mon May 30 11:09:05 2016 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,159 +0,0 @@ -/** - ****************************************************************************** - * @file stm32469i_discovery_sd.h - * @author MCD Application Team - * @version V1.0.1 - * @date 29-September-2015 - * @brief This file contains the common defines and functions prototypes for - * the stm32469i_discovery_sd.c driver. - ****************************************************************************** - * @attention - * - * <h2><center>© COPYRIGHT(c) 2015 STMicroelectronics</center></h2> - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. Neither the name of STMicroelectronics nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - ****************************************************************************** - */ - -/* Define to prevent recursive inclusion -------------------------------------*/ -#ifndef __STM32469I_DISCOVERY_SD_H -#define __STM32469I_DISCOVERY_SD_H - -#ifdef __cplusplus - extern "C" { -#endif - -/* Includes ------------------------------------------------------------------*/ -#include "stm32469i_discovery.h" - -/** @addtogroup BSP - * @{ - */ - -/** @addtogroup STM32469I-Discovery - * @{ - */ - -/** @defgroup STM32469I-Discovery_SD STM32469I-Discovery SD - * @{ - */ - -/** @defgroup STM32469I-Discovery_SD_Exported_Types SD Exported Types - * @{ - */ - -/** - * @brief SD Card information structure - */ -#define SD_CardInfo HAL_SD_CardInfoTypedef -/** - * @} - */ - -/** - * @brief SD status structure definition - */ -#define MSD_OK ((uint8_t)0x00) -#define MSD_ERROR ((uint8_t)0x01) -#define MSD_ERROR_SD_NOT_PRESENT ((uint8_t)0x02) - -/** @defgroup STM32469I-Discovery_SD_Exported_Constants SD Exported Constants - * @{ - */ -#define SD_PRESENT ((uint8_t)0x01) -#define SD_NOT_PRESENT ((uint8_t)0x00) - -#define SD_DATATIMEOUT ((uint32_t)100000000) - -/* DMA definitions for SD DMA transfer */ -#define __DMAx_TxRx_CLK_ENABLE __HAL_RCC_DMA2_CLK_ENABLE -#define SD_DMAx_Tx_CHANNEL DMA_CHANNEL_4 -#define SD_DMAx_Rx_CHANNEL DMA_CHANNEL_4 -#define SD_DMAx_Tx_STREAM DMA2_Stream6 -#define SD_DMAx_Rx_STREAM DMA2_Stream3 -#define SD_DMAx_Tx_IRQn DMA2_Stream6_IRQn -#define SD_DMAx_Rx_IRQn DMA2_Stream3_IRQn -#define SD_DMAx_Tx_IRQHandler DMA2_Stream6_IRQHandler -#define SD_DMAx_Rx_IRQHandler DMA2_Stream3_IRQHandler -#define SD_DetectIRQHandler() HAL_GPIO_EXTI_IRQHandler(GPIO_PIN_8) -/** - * @} - */ - -/** @defgroup STM32469I-Discovery_SD_Exported_Macro STM32469I Discovery SD Exported Macro - * @{ - */ -/** - * @} - */ - -/** @defgroup STM32469I-Discovery_SD_Exported_Functions STM32469I Discovery SD Exported Functions - * @{ - */ -uint8_t BSP_SD_Init(void); -uint8_t BSP_SD_DeInit(void); -uint8_t BSP_SD_ITConfig(void); - - -uint8_t BSP_SD_ReadBlocks(uint32_t *pData, uint64_t ReadAddr, uint32_t BlockSize, uint32_t NumOfBlocks); -uint8_t BSP_SD_WriteBlocks(uint32_t *pData, uint64_t WriteAddr, uint32_t BlockSize, uint32_t NumOfBlocks); -uint8_t BSP_SD_ReadBlocks_DMA(uint32_t *pData, uint64_t ReadAddr, uint32_t BlockSize, uint32_t NumOfBlocks); -uint8_t BSP_SD_WriteBlocks_DMA(uint32_t *pData, uint64_t WriteAddr, uint32_t BlockSize, uint32_t NumOfBlocks); -uint8_t BSP_SD_Erase(uint64_t StartAddr, uint64_t EndAddr); -void BSP_SD_IRQHandler(void); -void BSP_SD_DMA_Tx_IRQHandler(void); -void BSP_SD_DMA_Rx_IRQHandler(void); -HAL_SD_TransferStateTypedef BSP_SD_GetStatus(void); -void BSP_SD_GetCardInfo(HAL_SD_CardInfoTypedef *CardInfo); -uint8_t BSP_SD_IsDetected(void); - -/* These __weak function can be surcharged by application code in case the current settings (e.g. DMA stream) - need to be changed for specific needs */ -void BSP_SD_MspInit(SD_HandleTypeDef *hsd, void *Params); -void BSP_SD_Detect_MspInit(SD_HandleTypeDef *hsd, void *Params); -void BSP_SD_MspDeInit(SD_HandleTypeDef *hsd, void *Params); - -/** - * @} - */ - -/** - * @} - */ - -/** - * @} - */ - -/** - * @} - */ - -#ifdef __cplusplus -} -#endif - -#endif /* __STM32469I_DISCOVERY_SD_H */ - -/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
--- a/stm32469i_discovery/stm32469i_discovery_sdram.c Mon May 30 11:09:05 2016 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,533 +0,0 @@ -/** - ****************************************************************************** - * @file stm32469i_discovery_sdram.c - * @author MCD Application Team - * @version V1.0.1 - * @date 29-September-2015 - * @brief This file includes the SDRAM driver for the MT48LC4M32B2B5-7 memory - * device mounted on STM32469I-Discovery board. - ****************************************************************************** - * @attention - * - * <h2><center>© COPYRIGHT(c) 2015 STMicroelectronics</center></h2> - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. Neither the name of STMicroelectronics nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - ****************************************************************************** - */ - -/* File Info : ----------------------------------------------------------------- - User NOTES -1. How To use this driver: --------------------------- - - This driver is used to drive the MT48LC4M32B2B5-7 SDRAM external memory mounted - on STM32469I-Discovery board. - - This driver does not need a specific component driver for the SDRAM device - to be included with. - -2. Driver description: ---------------------- - + Initialization steps: - o Initialize the SDRAM external memory using the BSP_SDRAM_Init() function. This - function includes the MSP layer hardware resources initialization and the - FMC controller configuration to interface with the external SDRAM memory. - o It contains the SDRAM initialization sequence to program the SDRAM external - device using the function BSP_SDRAM_Initialization_sequence(). Note that this - sequence is standard for all SDRAM devices, but can include some differences - from a device to another. If it is the case, the right sequence should be - implemented separately. - - + SDRAM read/write operations - o SDRAM external memory can be accessed with read/write operations once it is - initialized. - Read/write operation can be performed with AHB access using the functions - BSP_SDRAM_ReadData()/BSP_SDRAM_WriteData(), or by DMA transfer using the functions - BSP_SDRAM_ReadData_DMA()/BSP_SDRAM_WriteData_DMA(). - o The AHB access is performed with 32-bit width transaction, the DMA transfer - configuration is fixed at single (no burst) word transfer (see the - BSP_SDRAM_MspInit() weak function). - o User can implement his own functions for read/write access with his desired - configurations. - o If interrupt mode is used for DMA transfer, the function BSP_SDRAM_DMA_IRQHandler() - is called in IRQ handler file, to serve the generated interrupt once the DMA - transfer is complete. - o You can send a command to the SDRAM device in runtime using the function - BSP_SDRAM_Sendcmd(), and giving the desired command as parameter chosen between - the predefined commands of the "FMC_SDRAM_CommandTypeDef" structure. - -------------------------------------------------------------------------------*/ - -/* Includes ------------------------------------------------------------------*/ -#include "stm32469i_discovery_sdram.h" - -// mbed -void wait_ms(int ms); - -/** @addtogroup BSP - * @{ - */ - -/** @addtogroup STM32469I-Discovery - * @{ - */ - -/** @defgroup STM32469I-Discovery_SDRAM SDRAM - * @{ - */ - -/** @defgroup STM32469I-Discovery_SDRAM_Private_Types_Definitions STM32469I Discovery SDRAM Private TypesDef - * @{ - */ -/** - * @} - */ - -/** @defgroup STM32469I-Discovery_SDRAM_Private_Defines STM32469I Discovery SDRAM Private Defines - * @{ - */ -/** - * @} - */ - -/** @defgroup STM32469I-Discovery_SDRAM_Private_Macros STM32469I Discovery SDRAM Private Macros - * @{ - */ -/** - * @} - */ - -/** @defgroup STM32469I-Discovery_SDRAM_Private_Variables STM32469I Discovery SDRAM Private Variables - * @{ - */ -static SDRAM_HandleTypeDef sdramHandle; -static FMC_SDRAM_TimingTypeDef Timing; -static FMC_SDRAM_CommandTypeDef Command; -/** - * @} - */ - -/** @defgroup STM32469I-Discovery_SDRAM_Private_Function_Prototypes STM32469I Discovery SDRAM Private Prototypes - * @{ - */ - -/** - * @} - */ - -/** @defgroup STM32469I-Discovery_SDRAM_Private_Functions STM32469I Discovery SDRAM Private Functions - * @{ - */ - -/** - * @} - */ - -/** @defgroup STM32469I_Discovery_SDRAM_Exported_Functions STM32469I Discovery SDRAM Exported Functions - * @{ - */ - -/** - * @brief Initializes the SDRAM device. - * @retval SDRAM status - */ -uint8_t BSP_SDRAM_Init(void) -{ - static uint8_t sdramstatus = SDRAM_ERROR; - - /* SDRAM device configuration */ - sdramHandle.Instance = FMC_SDRAM_DEVICE; - - /* Timing configuration for 90 MHz as SD clock frequency (System clock is up to 180 MHz) */ - Timing.LoadToActiveDelay = 2; - Timing.ExitSelfRefreshDelay = 7; - Timing.SelfRefreshTime = 4; - Timing.RowCycleDelay = 7; - Timing.WriteRecoveryTime = 2; - Timing.RPDelay = 2; - Timing.RCDDelay = 2; - - sdramHandle.Init.SDBank = FMC_SDRAM_BANK1; - sdramHandle.Init.ColumnBitsNumber = FMC_SDRAM_COLUMN_BITS_NUM_8; - sdramHandle.Init.RowBitsNumber = FMC_SDRAM_ROW_BITS_NUM_11; - sdramHandle.Init.MemoryDataWidth = SDRAM_MEMORY_WIDTH; - sdramHandle.Init.InternalBankNumber = FMC_SDRAM_INTERN_BANKS_NUM_4; - sdramHandle.Init.CASLatency = FMC_SDRAM_CAS_LATENCY_3; - sdramHandle.Init.WriteProtection = FMC_SDRAM_WRITE_PROTECTION_DISABLE; - sdramHandle.Init.SDClockPeriod = SDCLOCK_PERIOD; - sdramHandle.Init.ReadBurst = FMC_SDRAM_RBURST_ENABLE; - sdramHandle.Init.ReadPipeDelay = FMC_SDRAM_RPIPE_DELAY_0; - - /* SDRAM controller initialization */ - /* __weak function can be surcharged by the application code */ - BSP_SDRAM_MspInit(&sdramHandle, (void *)NULL); - if(HAL_SDRAM_Init(&sdramHandle, &Timing) != HAL_OK) - { - sdramstatus = SDRAM_ERROR; - } - else - { - sdramstatus = SDRAM_OK; - } - - /* SDRAM initialization sequence */ - BSP_SDRAM_Initialization_sequence(REFRESH_COUNT); - - return sdramstatus; -} - -/** - * @brief DeInitializes the SDRAM device. - * @retval SDRAM status : SDRAM_OK or SDRAM_ERROR. - */ -uint8_t BSP_SDRAM_DeInit(void) -{ - static uint8_t sdramstatus = SDRAM_ERROR; - - /* SDRAM device configuration */ - sdramHandle.Instance = FMC_SDRAM_DEVICE; - - if(HAL_SDRAM_DeInit(&sdramHandle) == HAL_OK) - { - sdramstatus = SDRAM_OK; - - /* SDRAM controller De-initialization */ - BSP_SDRAM_MspDeInit(&sdramHandle, (void *)NULL); - } - - return sdramstatus; -} - - -/** - * @brief Programs the SDRAM device. - * @param RefreshCount: SDRAM refresh counter value - */ -void BSP_SDRAM_Initialization_sequence(uint32_t RefreshCount) -{ - __IO uint32_t tmpmrd = 0; - - /* Step 1: Configure a clock configuration enable command */ - Command.CommandMode = FMC_SDRAM_CMD_CLK_ENABLE; - Command.CommandTarget = FMC_SDRAM_CMD_TARGET_BANK1; - Command.AutoRefreshNumber = 1; - Command.ModeRegisterDefinition = 0; - - /* Send the command */ - HAL_SDRAM_SendCommand(&sdramHandle, &Command, SDRAM_TIMEOUT); - - /* Step 2: Insert 100 us minimum delay */ - /* Inserted delay is equal to 1 ms due to systick time base unit (ms) */ - //HAL_Delay(1); - wait_ms(1); - - /* Step 3: Configure a PALL (precharge all) command */ - Command.CommandMode = FMC_SDRAM_CMD_PALL; - Command.CommandTarget = FMC_SDRAM_CMD_TARGET_BANK1; - Command.AutoRefreshNumber = 1; - Command.ModeRegisterDefinition = 0; - - /* Send the command */ - HAL_SDRAM_SendCommand(&sdramHandle, &Command, SDRAM_TIMEOUT); - - /* Step 4: Configure an Auto Refresh command */ - Command.CommandMode = FMC_SDRAM_CMD_AUTOREFRESH_MODE; - Command.CommandTarget = FMC_SDRAM_CMD_TARGET_BANK1; - Command.AutoRefreshNumber = 8; - Command.ModeRegisterDefinition = 0; - - /* Send the command */ - HAL_SDRAM_SendCommand(&sdramHandle, &Command, SDRAM_TIMEOUT); - - /* Step 5: Program the external memory mode register */ - tmpmrd = (uint32_t)SDRAM_MODEREG_BURST_LENGTH_1 |\ - SDRAM_MODEREG_BURST_TYPE_SEQUENTIAL |\ - SDRAM_MODEREG_CAS_LATENCY_3 |\ - SDRAM_MODEREG_OPERATING_MODE_STANDARD |\ - SDRAM_MODEREG_WRITEBURST_MODE_SINGLE; - - Command.CommandMode = FMC_SDRAM_CMD_LOAD_MODE; - Command.CommandTarget = FMC_SDRAM_CMD_TARGET_BANK1; - Command.AutoRefreshNumber = 1; - Command.ModeRegisterDefinition = tmpmrd; - - /* Send the command */ - HAL_SDRAM_SendCommand(&sdramHandle, &Command, SDRAM_TIMEOUT); - - /* Step 6: Set the refresh rate counter */ - /* Set the device refresh rate */ - HAL_SDRAM_ProgramRefreshRate(&sdramHandle, RefreshCount); -} - -/** - * @brief Reads an mount of data from the SDRAM memory in polling mode. - * @param uwStartAddress: Read start address - * @param pData: Pointer to data to be read - * @param uwDataSize: Size of read data from the memory - * @retval SDRAM status : SDRAM_OK or SDRAM_ERROR. - */ -uint8_t BSP_SDRAM_ReadData(uint32_t uwStartAddress, uint32_t *pData, uint32_t uwDataSize) -{ - if(HAL_SDRAM_Read_32b(&sdramHandle, (uint32_t *)uwStartAddress, pData, uwDataSize) != HAL_OK) - { - return SDRAM_ERROR; - } - else - { - return SDRAM_OK; - } -} - -/** - * @brief Reads an mount of data from the SDRAM memory in DMA mode. - * @param uwStartAddress: Read start address - * @param pData: Pointer to data to be read - * @param uwDataSize: Size of read data from the memory - * @retval SDRAM status : SDRAM_OK or SDRAM_ERROR. - */ -uint8_t BSP_SDRAM_ReadData_DMA(uint32_t uwStartAddress, uint32_t *pData, uint32_t uwDataSize) -{ - if(HAL_SDRAM_Read_DMA(&sdramHandle, (uint32_t *)uwStartAddress, pData, uwDataSize) != HAL_OK) - { - return SDRAM_ERROR; - } - else - { - return SDRAM_OK; - } -} - -/** - * @brief Writes an mount of data to the SDRAM memory in polling mode. - * @param uwStartAddress: Write start address - * @param pData: Pointer to data to be written - * @param uwDataSize: Size of written data from the memory - * @retval SDRAM status : SDRAM_OK or SDRAM_ERROR. - */ -uint8_t BSP_SDRAM_WriteData(uint32_t uwStartAddress, uint32_t *pData, uint32_t uwDataSize) -{ - if(HAL_SDRAM_Write_32b(&sdramHandle, (uint32_t *)uwStartAddress, pData, uwDataSize) != HAL_OK) - { - return SDRAM_ERROR; - } - else - { - return SDRAM_OK; - } -} - -/** - * @brief Writes an mount of data to the SDRAM memory in DMA mode. - * @param uwStartAddress: Write start address - * @param pData: Pointer to data to be written - * @param uwDataSize: Size of written data from the memory - * @retval SDRAM status : SDRAM_OK or SDRAM_ERROR. - */ -uint8_t BSP_SDRAM_WriteData_DMA(uint32_t uwStartAddress, uint32_t *pData, uint32_t uwDataSize) -{ - if(HAL_SDRAM_Write_DMA(&sdramHandle, (uint32_t *)uwStartAddress, pData, uwDataSize) != HAL_OK) - { - return SDRAM_ERROR; - } - else - { - return SDRAM_OK; - } -} - -/** - * @brief Sends command to the SDRAM bank. - * @param SdramCmd: Pointer to SDRAM command structure - * @retval HAL status : SDRAM_OK or SDRAM_ERROR. - */ -uint8_t BSP_SDRAM_Sendcmd(FMC_SDRAM_CommandTypeDef *SdramCmd) -{ - if(HAL_SDRAM_SendCommand(&sdramHandle, SdramCmd, SDRAM_TIMEOUT) != HAL_OK) - { - return SDRAM_ERROR; - } - else - { - return SDRAM_OK; - } -} - -/** - * @brief Handles SDRAM DMA transfer interrupt request. - */ -void BSP_SDRAM_DMA_IRQHandler(void) -{ - HAL_DMA_IRQHandler(sdramHandle.hdma); -} - -/** - * @brief Initializes SDRAM MSP. - * @note This function can be surcharged by application code. - * @param hsdram: pointer on SDRAM handle - * @param Params: pointer on additional configuration parameters, can be NULL. - */ -__weak void BSP_SDRAM_MspInit(SDRAM_HandleTypeDef *hsdram, void *Params) -{ - static DMA_HandleTypeDef dma_handle; - GPIO_InitTypeDef gpio_init_structure; - - if(hsdram != (SDRAM_HandleTypeDef *)NULL) - { - /* Enable FMC clock */ - __HAL_RCC_FMC_CLK_ENABLE(); - - /* Enable chosen DMAx clock */ - __DMAx_CLK_ENABLE(); - - /* Enable GPIOs clock */ - __HAL_RCC_GPIOC_CLK_ENABLE(); - __HAL_RCC_GPIOD_CLK_ENABLE(); - __HAL_RCC_GPIOE_CLK_ENABLE(); - __HAL_RCC_GPIOF_CLK_ENABLE(); - __HAL_RCC_GPIOG_CLK_ENABLE(); - __HAL_RCC_GPIOH_CLK_ENABLE(); - __HAL_RCC_GPIOI_CLK_ENABLE(); - - /* Common GPIO configuration */ - gpio_init_structure.Mode = GPIO_MODE_AF_PP; - gpio_init_structure.Pull = GPIO_PULLUP; - gpio_init_structure.Speed = GPIO_SPEED_FAST; - gpio_init_structure.Alternate = GPIO_AF12_FMC; - - /* GPIOC configuration : PC0 is SDNWE */ - gpio_init_structure.Pin = GPIO_PIN_0; - HAL_GPIO_Init(GPIOC, &gpio_init_structure); - - /* GPIOD configuration */ - gpio_init_structure.Pin = GPIO_PIN_0 | GPIO_PIN_1 | GPIO_PIN_8| GPIO_PIN_9 | GPIO_PIN_10 |\ - GPIO_PIN_14 | GPIO_PIN_15; - - - HAL_GPIO_Init(GPIOD, &gpio_init_structure); - - /* GPIOE configuration */ - gpio_init_structure.Pin = GPIO_PIN_0 | GPIO_PIN_1 | GPIO_PIN_7| GPIO_PIN_8 | GPIO_PIN_9 |\ - GPIO_PIN_10 | GPIO_PIN_11 | GPIO_PIN_12 | GPIO_PIN_13 | GPIO_PIN_14 |\ - GPIO_PIN_15; - - HAL_GPIO_Init(GPIOE, &gpio_init_structure); - - /* GPIOF configuration */ - gpio_init_structure.Pin = GPIO_PIN_0 | GPIO_PIN_1 | GPIO_PIN_2| GPIO_PIN_3 | GPIO_PIN_4 |\ - GPIO_PIN_5 | GPIO_PIN_11 | GPIO_PIN_12 | GPIO_PIN_13 | GPIO_PIN_14 |\ - GPIO_PIN_15; - - HAL_GPIO_Init(GPIOF, &gpio_init_structure); - - /* GPIOG configuration */ - gpio_init_structure.Pin = GPIO_PIN_0 | GPIO_PIN_1 | GPIO_PIN_4| GPIO_PIN_5 | GPIO_PIN_8 |\ - GPIO_PIN_15; - HAL_GPIO_Init(GPIOG, &gpio_init_structure); - - /* GPIOH configuration */ - gpio_init_structure.Pin = GPIO_PIN_2 | GPIO_PIN_3 | GPIO_PIN_8 | GPIO_PIN_9 |\ - GPIO_PIN_10 | GPIO_PIN_11 | GPIO_PIN_12 | GPIO_PIN_13 | GPIO_PIN_14 |\ - GPIO_PIN_15; - HAL_GPIO_Init(GPIOH, &gpio_init_structure); - - /* GPIOI configuration */ - gpio_init_structure.Pin = GPIO_PIN_0 | GPIO_PIN_1 | GPIO_PIN_2 | GPIO_PIN_3 | GPIO_PIN_4 |\ - GPIO_PIN_5 | GPIO_PIN_6 | GPIO_PIN_7 | GPIO_PIN_9 | GPIO_PIN_10; - HAL_GPIO_Init(GPIOI, &gpio_init_structure); - - /* Configure common DMA parameters */ - dma_handle.Init.Channel = SDRAM_DMAx_CHANNEL; - dma_handle.Init.Direction = DMA_MEMORY_TO_MEMORY; - dma_handle.Init.PeriphInc = DMA_PINC_ENABLE; - dma_handle.Init.MemInc = DMA_MINC_ENABLE; - dma_handle.Init.PeriphDataAlignment = DMA_PDATAALIGN_WORD; - dma_handle.Init.MemDataAlignment = DMA_MDATAALIGN_WORD; - dma_handle.Init.Mode = DMA_NORMAL; - dma_handle.Init.Priority = DMA_PRIORITY_HIGH; - dma_handle.Init.FIFOMode = DMA_FIFOMODE_DISABLE; - dma_handle.Init.FIFOThreshold = DMA_FIFO_THRESHOLD_FULL; - dma_handle.Init.MemBurst = DMA_MBURST_SINGLE; - dma_handle.Init.PeriphBurst = DMA_PBURST_SINGLE; - - dma_handle.Instance = SDRAM_DMAx_STREAM; - - /* Associate the DMA handle */ - __HAL_LINKDMA(hsdram, hdma, dma_handle); - - /* Deinitialize the stream for new transfer */ - HAL_DMA_DeInit(&dma_handle); - - /* Configure the DMA stream */ - HAL_DMA_Init(&dma_handle); - - /* NVIC configuration for DMA transfer complete interrupt */ - HAL_NVIC_SetPriority(SDRAM_DMAx_IRQn, 5, 0); - HAL_NVIC_EnableIRQ(SDRAM_DMAx_IRQn); - - } /* of if(hsdram != (SDRAM_HandleTypeDef *)NULL) */ -} - -/** - * @brief DeInitializes SDRAM MSP. - * @note This function can be surcharged by application code. - * @param hsdram: pointer on SDRAM handle - * @param Params: pointer on additional configuration parameters, can be NULL. - */ -__weak void BSP_SDRAM_MspDeInit(SDRAM_HandleTypeDef *hsdram, void *Params) -{ - static DMA_HandleTypeDef dma_handle; - - if(hsdram != (SDRAM_HandleTypeDef *)NULL) - { - /* Disable NVIC configuration for DMA interrupt */ - HAL_NVIC_DisableIRQ(SDRAM_DMAx_IRQn); - - /* Deinitialize the stream for new transfer */ - dma_handle.Instance = SDRAM_DMAx_STREAM; - HAL_DMA_DeInit(&dma_handle); - - /* DeInit GPIO pins can be done in the application - (by surcharging this __weak function) */ - - /* GPIO pins clock, FMC clock and DMA clock can be shut down in the application - by surcharging this __weak function */ - - } /* of if(hsdram != (SDRAM_HandleTypeDef *)NULL) */ -} - -/** - * @} - */ - -/** - * @} - */ - -/** - * @} - */ - -/** - * @} - */ - -/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
--- a/stm32469i_discovery/stm32469i_discovery_sdram.h Mon May 30 11:09:05 2016 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,163 +0,0 @@ -/** - ****************************************************************************** - * @file stm32469i_discovery_sdram.h - * @author MCD Application Team - * @version V1.0.1 - * @date 29-September-2015 - * @brief This file contains the common defines and functions prototypes for - * the stm32469i_discovery_sdram.c driver. - ****************************************************************************** - * @attention - * - * <h2><center>© COPYRIGHT(c) 2015 STMicroelectronics</center></h2> - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. Neither the name of STMicroelectronics nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - ****************************************************************************** - */ - -/* Define to prevent recursive inclusion -------------------------------------*/ -#ifndef __STM32469I_DISCOVERY_SDRAM_H -#define __STM32469I_DISCOVERY_SDRAM_H - -#ifdef __cplusplus - extern "C" { -#endif - -/* Includes ------------------------------------------------------------------*/ -#include "stm32f4xx_hal.h" - -/** @addtogroup BSP - * @{ - */ - -/** @addtogroup STM32469I-Discovery - * @{ - */ - -/** @addtogroup STM32469I-Discovery_SDRAM - * @{ - */ - -/** @defgroup STM32469I-Discovery_SDRAM_Exported_Types STM32469I Discovery SDRAM Exported Types - * @{ - */ - -/** - * @brief SDRAM status structure definition - */ -#define SDRAM_OK ((uint8_t)0x00) -#define SDRAM_ERROR ((uint8_t)0x01) - -/** @defgroup STM32469I-Discovery_SDRAM_Exported_Constants STM32469I Discovery SDRAM Exported Constants - * @{ - */ -#define SDRAM_DEVICE_ADDR ((uint32_t)0xC0000000) - - /* SDRAM device size in MBytes */ - #define SDRAM_DEVICE_SIZE ((uint32_t)0x800000) - -#define SDRAM_MEMORY_WIDTH FMC_SDRAM_MEM_BUS_WIDTH_32 -#define SDCLOCK_PERIOD FMC_SDRAM_CLOCK_PERIOD_2 - -/* SDRAM refresh counter (90 MHz SD clock) */ -#define REFRESH_COUNT ((uint32_t)0x0569) -#define SDRAM_TIMEOUT ((uint32_t)0xFFFF) - -/* DMA definitions for SDRAM DMA transfer */ -#define __DMAx_CLK_ENABLE __HAL_RCC_DMA2_CLK_ENABLE -#define __DMAx_CLK_DISABLE __HAL_RCC_DMA2_CLK_DISABLE -#define SDRAM_DMAx_CHANNEL DMA_CHANNEL_0 -#define SDRAM_DMAx_STREAM DMA2_Stream0 -#define SDRAM_DMAx_IRQn DMA2_Stream0_IRQn -#define SDRAM_DMAx_IRQHandler DMA2_Stream0_IRQHandler -/** - * @} - */ - -/** - * @brief FMC SDRAM Mode definition register defines - */ -#define SDRAM_MODEREG_BURST_LENGTH_1 ((uint16_t)0x0000) -#define SDRAM_MODEREG_BURST_LENGTH_2 ((uint16_t)0x0001) -#define SDRAM_MODEREG_BURST_LENGTH_4 ((uint16_t)0x0002) -#define SDRAM_MODEREG_BURST_LENGTH_8 ((uint16_t)0x0004) -#define SDRAM_MODEREG_BURST_TYPE_SEQUENTIAL ((uint16_t)0x0000) -#define SDRAM_MODEREG_BURST_TYPE_INTERLEAVED ((uint16_t)0x0008) -#define SDRAM_MODEREG_CAS_LATENCY_2 ((uint16_t)0x0020) -#define SDRAM_MODEREG_CAS_LATENCY_3 ((uint16_t)0x0030) -#define SDRAM_MODEREG_OPERATING_MODE_STANDARD ((uint16_t)0x0000) -#define SDRAM_MODEREG_WRITEBURST_MODE_PROGRAMMED ((uint16_t)0x0000) -#define SDRAM_MODEREG_WRITEBURST_MODE_SINGLE ((uint16_t)0x0200) -/** - * @} - */ - -/** @defgroup STM32469I-Discovery_SDRAM_Exported_Macro STM32469I Discovery SDRAM Exported Macro - * @{ - */ -/** - * @} - */ - -/** @defgroup STM32469I-Discovery_SDRAM_Exported_Functions STM32469I Discovery SDRAM Exported Functions - * @{ - */ -uint8_t BSP_SDRAM_Init(void); -uint8_t BSP_SDRAM_DeInit(void); -void BSP_SDRAM_Initialization_sequence(uint32_t RefreshCount); -uint8_t BSP_SDRAM_ReadData(uint32_t uwStartAddress, uint32_t *pData, uint32_t uwDataSize); -uint8_t BSP_SDRAM_ReadData_DMA(uint32_t uwStartAddress, uint32_t *pData, uint32_t uwDataSize); -uint8_t BSP_SDRAM_WriteData(uint32_t uwStartAddress, uint32_t *pData, uint32_t uwDataSize); -uint8_t BSP_SDRAM_WriteData_DMA(uint32_t uwStartAddress, uint32_t *pData, uint32_t uwDataSize); -uint8_t BSP_SDRAM_Sendcmd(FMC_SDRAM_CommandTypeDef *SdramCmd); -void BSP_SDRAM_DMA_IRQHandler(void); - -/* These function can be modified in case the current settings (e.g. DMA stream) - need to be changed for specific application needs */ -void BSP_SDRAM_MspInit(SDRAM_HandleTypeDef *hsdram, void *Params); -void BSP_SDRAM_MspDeInit(SDRAM_HandleTypeDef *hsdram, void *Params); - -/** - * @} - */ - -/** - * @} - */ - -/** - * @} - */ - -/** - * @} - */ - -#ifdef __cplusplus -} -#endif - -#endif /* __STM32469I_DISCOVERY_SDRAM_H */ - -/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
--- a/stm32469i_discovery/stm32469i_discovery_ts.c Mon May 30 11:09:05 2016 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,475 +0,0 @@ -/** - ****************************************************************************** - * @file stm32469i_discovery_ts.c - * @author MCD Application Team - * @version V1.0.1 - * @date 29-September-2015 - * @brief This file provides a set of functions needed to manage the Touch - * Screen on STM32469I-Discovery board. - ****************************************************************************** - * @attention - * - * <h2><center>© COPYRIGHT(c) 2015 STMicroelectronics</center></h2> - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. Neither the name of STMicroelectronics nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - ****************************************************************************** - */ - -/* File Info : ----------------------------------------------------------------- - User NOTES -1. How To use this driver: --------------------------- - - This driver is used to drive the touch screen module of the STM32469I-Discovery - board on the K.O.D Optica Technology 480x800 TFT-LCD mounted on - MB1189 board. The touch screen driver IC inside the K.O.D module KM-040TMP-02 - is a FT6206 by Focal Tech. - -2. Driver description: ---------------------- - + Initialization steps: - o Initialize the TS module using the BSP_TS_Init() function. This - function includes the MSP layer hardware resources initialization and the - communication layer configuration to start the TS use. The LCD size properties - (x and y) are passed as parameters. - o If TS interrupt mode is desired, you must configure the TS interrupt mode - by calling the function BSP_TS_ITConfig(). The TS interrupt mode is generated - as an external interrupt whenever a touch is detected. - The interrupt mode internally uses the IO functionalities driver driven by - the IO expander, to configure the IT line. - - + Touch screen use - o The touch screen state is captured whenever the function BSP_TS_GetState() is - used. This function returns information about the last LCD touch occurred - in the TS_StateTypeDef structure. - o If TS interrupt mode is used, the function BSP_TS_ITGetStatus() is needed to get - the interrupt status. To clear the IT pending bits, you should call the - function BSP_TS_ITClear(). - o The IT is handled using the corresponding external interrupt IRQ handler, - the user IT callback treatment is implemented on the same external interrupt - callback. - -------------------------------------------------------------------------------*/ - -/* Includes ------------------------------------------------------------------*/ -#include "stm32469i_discovery_ts.h" - -/** @addtogroup BSP - * @{ - */ - -/** @addtogroup STM32469I-Discovery - * @{ - */ - -/** @defgroup STM32469I-Discovery_TS STM32469I-Discovery TS - * @{ - */ - -/** @defgroup STM32469I-Discovery_TS_Private_Types_Definitions TS Private Types Definitions - * @{ - */ -/** - * @} - */ - -/** @defgroup STM32469I-Discovery_TS_Private_Defines TS Private Types Defines - * @{ - */ -/** - * @} - */ - -/** @defgroup STM32469I-Discovery_TS_Private_Macros TS Private Macros - * @{ - */ -/** - * @} - */ - -/** @defgroup STM32469I-Discovery_TS_Imported_Variables TS Imported Variables - * @{ - */ - /** - * @} - */ - -/** @defgroup STM32469I-Discovery_TS_Private_Variables TS Private Variables - * @{ - */ -static TS_DrvTypeDef *ts_driver; -static uint8_t ts_orientation; -static uint8_t I2C_Address = 0; - -/* Table for touchscreen event information display on LCD : table indexed on enum @ref TS_TouchEventTypeDef information */ -char * ts_event_string_tab[TOUCH_EVENT_NB_MAX] = { "None", - "Press down", - "Lift up", - "Contact" - }; - -/* Table for touchscreen gesture Id information display on LCD : table indexed on enum @ref TS_GestureIdTypeDef information */ -char * ts_gesture_id_string_tab[GEST_ID_NB_MAX] = { "None", - "Move Up", - "Move Right", - "Move Down", - "Move Left", - "Zoom In", - "Zoom Out" - }; - -/** - * @} - */ - -/** @defgroup STM32469I-Discovery_TS_Private_Function_Prototypes TS Private Function Prototypes - * @{ - */ - -/** - * @} - */ - -/** @defgroup STM32469I-Discovery_TS_Public_Functions TS Public Functions - * @{ - */ - -/** - * @brief Initializes and configures the touch screen functionalities and - * configures all necessary hardware resources (GPIOs, I2C, clocks..). - * @param ts_SizeX : Maximum X size of the TS area on LCD - * @param ts_SizeY : Maximum Y size of the TS area on LCD - * @retval TS_OK if all initializations are OK. Other value if error. - */ -uint8_t BSP_TS_Init(uint16_t ts_SizeX, uint16_t ts_SizeY) -{ - uint8_t ts_status = TS_OK; - - /* Note : I2C_Address is un-initialized here, but is not used at all in init function */ - /* but the prototype of Init() is like that in template and should be respected */ - - /* Initialize the communication channel to sensor (I2C) if necessary */ - /* that is initialization is done only once after a power up */ - ft6x06_ts_drv.Init(I2C_Address); - - /* Scan FT6x06 TouchScreen IC controller ID register by I2C Read */ - /* Verify this is a FT6x06, otherwise this is an error case */ - if(ft6x06_ts_drv.ReadID(TS_I2C_ADDRESS) == FT6206_ID_VALUE) - { - /* Found FT6206 : Initialize the TS driver structure */ - ts_driver = &ft6x06_ts_drv; - - I2C_Address = TS_I2C_ADDRESS; - - /* Get LCD chosen orientation */ - if(ts_SizeX < ts_SizeY) - { - ts_orientation = TS_SWAP_NONE; - } - else - { - ts_orientation = TS_SWAP_XY | TS_SWAP_Y; - } - - if(ts_status == TS_OK) - { - /* Software reset the TouchScreen */ - ts_driver->Reset(I2C_Address); - - /* Calibrate, Configure and Start the TouchScreen driver */ - ts_driver->Start(I2C_Address); - - } /* of if(ts_status == TS_OK) */ - } - else - { - ts_status = TS_DEVICE_NOT_FOUND; - } - - return (ts_status); -} - -/** - * @brief Configures and enables the touch screen interrupts both at GPIO level and - * in TouchScreen IC driver configuration. - * @retval TS_OK if all initializations are OK. - */ -uint8_t BSP_TS_ITConfig(void) -{ - uint8_t ts_status = TS_OK; - GPIO_InitTypeDef gpio_init_structure; - - /* Msp Init of GPIO used for TS_INT pin coming from TouchScreen driver IC FT6x06 */ - /* When touchscreen is operated in interrupt mode */ - BSP_TS_INT_MspInit(); - - /* Configure Interrupt mode for TS_INT pin falling edge : when a new touch is available */ - /* TS_INT pin is active on low level on new touch available */ - gpio_init_structure.Pin = TS_INT_PIN; - gpio_init_structure.Pull = GPIO_PULLUP; - gpio_init_structure.Speed = GPIO_SPEED_FAST; - gpio_init_structure.Mode = GPIO_MODE_IT_FALLING; - HAL_GPIO_Init(TS_INT_GPIO_PORT, &gpio_init_structure); - - /* Enable and set the TS_INT EXTI Interrupt to an intermediate priority */ - HAL_NVIC_SetPriority((IRQn_Type)(TS_INT_EXTI_IRQn), 0x05, 0x00); - HAL_NVIC_EnableIRQ((IRQn_Type)(TS_INT_EXTI_IRQn)); - - /* Enable the TS in interrupt mode */ - /* In that case the INT output of FT6206 when new touch is available */ - /* is active on low level and directed on EXTI */ - ts_driver->EnableIT(I2C_Address); - - return (ts_status); -} - -/** - * @brief Returns status and positions of the touch screen. - * @param TS_State: Pointer to touch screen current state structure - * @retval TS_OK if all initializations are OK. Other value if error. - */ -uint8_t BSP_TS_GetState(TS_StateTypeDef *TS_State) -{ - static uint32_t _x[TS_MAX_NB_TOUCH] = {0, 0}; - static uint32_t _y[TS_MAX_NB_TOUCH] = {0, 0}; - uint8_t ts_status = TS_OK; - uint16_t tmp; - uint16_t Raw_x[TS_MAX_NB_TOUCH]; - uint16_t Raw_y[TS_MAX_NB_TOUCH]; - uint16_t xDiff; - uint16_t yDiff; - uint32_t index; -#if (TS_MULTI_TOUCH_SUPPORTED == 1) - uint32_t weight = 0; - uint32_t area = 0; - uint32_t event = 0; -#endif /* TS_MULTI_TOUCH_SUPPORTED == 1 */ - - /* Check and update the number of touches active detected */ - TS_State->touchDetected = ts_driver->DetectTouch(I2C_Address); - if(TS_State->touchDetected) - { - for(index=0; index < TS_State->touchDetected; index++) - { - /* Get each touch coordinates */ - ts_driver->GetXY(I2C_Address, &(Raw_x[index]), &(Raw_y[index])); - - if(ts_orientation & TS_SWAP_XY) - { - tmp = Raw_x[index]; - Raw_x[index] = Raw_y[index]; - Raw_y[index] = tmp; - } - - if(ts_orientation & TS_SWAP_X) - { - Raw_x[index] = FT_6206_MAX_WIDTH - 1 - Raw_x[index]; - } - - if(ts_orientation & TS_SWAP_Y) - { - Raw_y[index] = FT_6206_MAX_HEIGHT - 1 - Raw_y[index]; - } - - xDiff = Raw_x[index] > _x[index]? (Raw_x[index] - _x[index]): (_x[index] - Raw_x[index]); - yDiff = Raw_y[index] > _y[index]? (Raw_y[index] - _y[index]): (_y[index] - Raw_y[index]); - - if ((xDiff + yDiff) > 5) - { - _x[index] = Raw_x[index]; - _y[index] = Raw_y[index]; - } - - - TS_State->touchX[index] = _x[index]; - TS_State->touchY[index] = _y[index]; - -#if (TS_MULTI_TOUCH_SUPPORTED == 1) - - /* Get touch info related to the current touch */ - ft6x06_TS_GetTouchInfo(I2C_Address, index, &weight, &area, &event); - - /* Update TS_State structure */ - TS_State->touchWeight[index] = weight; - TS_State->touchArea[index] = area; - - /* Remap touch event */ - switch(event) - { - case FT6206_TOUCH_EVT_FLAG_PRESS_DOWN : - TS_State->touchEventId[index] = TOUCH_EVENT_PRESS_DOWN; - break; - case FT6206_TOUCH_EVT_FLAG_LIFT_UP : - TS_State->touchEventId[index] = TOUCH_EVENT_LIFT_UP; - break; - case FT6206_TOUCH_EVT_FLAG_CONTACT : - TS_State->touchEventId[index] = TOUCH_EVENT_CONTACT; - break; - case FT6206_TOUCH_EVT_FLAG_NO_EVENT : - TS_State->touchEventId[index] = TOUCH_EVENT_NO_EVT; - break; - default : - ts_status = TS_ERROR; - break; - } /* of switch(event) */ - -#endif /* TS_MULTI_TOUCH_SUPPORTED == 1 */ - - } /* of for(index=0; index < TS_State->touchDetected; index++) */ - -#if (TS_MULTI_TOUCH_SUPPORTED == 1) - /* Get gesture Id */ - ts_status = BSP_TS_Get_GestureId(TS_State); -#endif /* TS_MULTI_TOUCH_SUPPORTED == 1 */ - - } /* end of if(TS_State->touchDetected != 0) */ - - return (ts_status); -} - -#if (TS_MULTI_TOUCH_SUPPORTED == 1) -/** - * @brief Update gesture Id following a touch detected. - * @param TS_State: Pointer to touch screen current state structure - * @retval TS_OK if all initializations are OK. Other value if error. - */ -uint8_t BSP_TS_Get_GestureId(TS_StateTypeDef *TS_State) -{ - uint32_t gestureId = 0; - uint8_t ts_status = TS_OK; - - /* Get gesture Id */ - ft6x06_TS_GetGestureID(I2C_Address, &gestureId); - - /* Remap gesture Id to a TS_GestureIdTypeDef value */ - switch(gestureId) - { - case FT6206_GEST_ID_NO_GESTURE : - TS_State->gestureId = GEST_ID_NO_GESTURE; - break; - case FT6206_GEST_ID_MOVE_UP : - TS_State->gestureId = GEST_ID_MOVE_UP; - break; - case FT6206_GEST_ID_MOVE_RIGHT : - TS_State->gestureId = GEST_ID_MOVE_RIGHT; - break; - case FT6206_GEST_ID_MOVE_DOWN : - TS_State->gestureId = GEST_ID_MOVE_DOWN; - break; - case FT6206_GEST_ID_MOVE_LEFT : - TS_State->gestureId = GEST_ID_MOVE_LEFT; - break; - case FT6206_GEST_ID_ZOOM_IN : - TS_State->gestureId = GEST_ID_ZOOM_IN; - break; - case FT6206_GEST_ID_ZOOM_OUT : - TS_State->gestureId = GEST_ID_ZOOM_OUT; - break; - default : - ts_status = TS_ERROR; - break; - } /* of switch(gestureId) */ - - return(ts_status); -} - - -/** @defgroup STM32469I-Discovery_TS_Private_Functions TS Private Functions - * @{ - */ - - -/** - * @brief Function used to reset all touch data before a new acquisition - * of touch information. - * @param TS_State: Pointer to touch screen current state structure - * @retval TS_OK if OK, TE_ERROR if problem found. - */ -uint8_t BSP_TS_ResetTouchData(TS_StateTypeDef *TS_State) -{ - uint8_t ts_status = TS_ERROR; - uint32_t index; - - if (TS_State != (TS_StateTypeDef *)NULL) - { - TS_State->gestureId = GEST_ID_NO_GESTURE; - TS_State->touchDetected = 0; - - for(index = 0; index < TS_MAX_NB_TOUCH; index++) - { - TS_State->touchX[index] = 0; - TS_State->touchY[index] = 0; - TS_State->touchArea[index] = 0; - TS_State->touchEventId[index] = TOUCH_EVENT_NO_EVT; - TS_State->touchWeight[index] = 0; - } - - ts_status = TS_OK; - - } /* of if (TS_State != (TS_StateTypeDef *)NULL) */ - - return (ts_status); -} -#endif /* TS_MULTI_TOUCH_SUPPORTED == 1 */ -/** - * @brief Initializes the TS_INT pin MSP. - * @param None - * @retval None - */ -__weak void BSP_TS_INT_MspInit(void) -{ - GPIO_InitTypeDef gpio_init_structure; - - TS_INT_GPIO_CLK_ENABLE(); - - /* GPIO configuration in input for TouchScreen interrupt signal on TS_INT pin */ - gpio_init_structure.Pin = TS_INT_PIN; - - gpio_init_structure.Mode = GPIO_MODE_INPUT; - gpio_init_structure.Pull = GPIO_PULLUP; - gpio_init_structure.Speed = GPIO_SPEED_HIGH; - HAL_GPIO_Init(TS_INT_GPIO_PORT, &gpio_init_structure); -} - - -/** - * @} - */ - -/** - * @} - */ - -/** - * @} - */ - -/** - * @} - */ - -/** - * @} - */ - -/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
--- a/stm32469i_discovery/stm32469i_discovery_ts.h Mon May 30 11:09:05 2016 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,213 +0,0 @@ -/** - ****************************************************************************** - * @file stm32469i_discovery_ts.h - * @author MCD Application Team - * @version V1.0.1 - * @date 29-September-2015 - * @brief This file contains the common defines and functions prototypes for - * the stm32469i_discovery_ts.c driver. - ****************************************************************************** - * @attention - * - * <h2><center>© COPYRIGHT(c) 2015 STMicroelectronics</center></h2> - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. Neither the name of STMicroelectronics nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - ****************************************************************************** - */ - -/* Define to prevent recursive inclusion -------------------------------------*/ -#ifndef __STM32469I_DISCOVERY_TS_H -#define __STM32469I_DISCOVERY_TS_H - -#ifdef __cplusplus - extern "C" { -#endif - -/* Includes ------------------------------------------------------------------*/ -#include "stm32469i_discovery.h" -#include "stm32469i_discovery_lcd.h" - -/* Include TouchScreen component driver */ -#include "../Components/ft6x06/ft6x06.h" - -/** @addtogroup BSP - * @{ - */ - -/** @addtogroup STM32469I-Discovery - * @{ - */ - -/** @defgroup STM32469I-Discovery_TS STM32469I-Discovery TS - * @{ - */ - - /** @defgroup STM32469I-Discovery_TS_Exported_Constants TS Exported Constants - * @{ - */ -/** @brief With FT6206 : maximum 2 touches detected simultaneously - */ -#define TS_MAX_NB_TOUCH ((uint32_t) FT6206_MAX_DETECTABLE_TOUCH) -#define TS_NO_IRQ_PENDING ((uint8_t) 0) -#define TS_IRQ_PENDING ((uint8_t) 1) - -#define TS_SWAP_NONE ((uint8_t) 0x01) -#define TS_SWAP_X ((uint8_t) 0x02) -#define TS_SWAP_Y ((uint8_t) 0x04) -#define TS_SWAP_XY ((uint8_t) 0x08) - - /** - * @} - */ - -/** @defgroup STM32469I-Discovery_TS_Exported_Types TS Exported Types - * @{ - */ -/** -* @brief TS_StateTypeDef -* Define TS State structure -*/ -typedef struct -{ - uint8_t touchDetected; /*!< Total number of active touches detected at last scan */ - uint16_t touchX[TS_MAX_NB_TOUCH]; /*!< Touch X[0], X[1] coordinates on 12 bits */ - uint16_t touchY[TS_MAX_NB_TOUCH]; /*!< Touch Y[0], Y[1] coordinates on 12 bits */ - -#if (TS_MULTI_TOUCH_SUPPORTED == 1) - uint8_t touchWeight[TS_MAX_NB_TOUCH]; /*!< Touch_Weight[0], Touch_Weight[1] : weight property of touches */ - uint8_t touchEventId[TS_MAX_NB_TOUCH]; /*!< Touch_EventId[0], Touch_EventId[1] : take value of type @ref TS_TouchEventTypeDef */ - uint8_t touchArea[TS_MAX_NB_TOUCH]; /*!< Touch_Area[0], Touch_Area[1] : touch area of each touch */ - uint32_t gestureId; /*!< type of gesture detected : take value of type @ref TS_GestureIdTypeDef */ -#endif /* TS_MULTI_TOUCH_SUPPORTED == 1 */ - -} TS_StateTypeDef; - -/** - * @brief TS_StatusTypeDef - * Define BSP_TS_xxx() functions possible return value, - * when status is returned by those functions. - */ -typedef enum -{ - TS_OK = 0x00, /*!< Touch Ok */ - TS_ERROR = 0x01, /*!< Touch Error */ - TS_TIMEOUT = 0x02, /*!< Touch Timeout */ - TS_DEVICE_NOT_FOUND = 0x03 /*!< Touchscreen device not found */ -} TS_StatusTypeDef; - -/** - * @brief TS_GestureIdTypeDef - * Define Possible managed gesture identification values returned by touch screen - * driver. - */ -typedef enum -{ - GEST_ID_NO_GESTURE = 0x00, /*!< Gesture not defined / recognized */ - GEST_ID_MOVE_UP = 0x01, /*!< Gesture Move Up */ - GEST_ID_MOVE_RIGHT = 0x02, /*!< Gesture Move Right */ - GEST_ID_MOVE_DOWN = 0x03, /*!< Gesture Move Down */ - GEST_ID_MOVE_LEFT = 0x04, /*!< Gesture Move Left */ - GEST_ID_ZOOM_IN = 0x05, /*!< Gesture Zoom In */ - GEST_ID_ZOOM_OUT = 0x06, /*!< Gesture Zoom Out */ - GEST_ID_NB_MAX = 0x07 /*!< max number of gesture id */ -} TS_GestureIdTypeDef; - -/** - * @brief TS_TouchEventTypeDef - * Define Possible touch events kind as returned values - * by touch screen IC Driver. - */ -typedef enum -{ - TOUCH_EVENT_NO_EVT = 0x00, /*!< Touch Event : undetermined */ - TOUCH_EVENT_PRESS_DOWN = 0x01, /*!< Touch Event Press Down */ - TOUCH_EVENT_LIFT_UP = 0x02, /*!< Touch Event Lift Up */ - TOUCH_EVENT_CONTACT = 0x03, /*!< Touch Event Contact */ - TOUCH_EVENT_NB_MAX = 0x04 /*!< max number of touch events kind */ -} TS_TouchEventTypeDef; - -/** - * @} - */ - -/** @defgroup STM32469I-Discovery_TS_Imported_Variables STM32469I Discovery TS Imported Variables - * @{ - */ -/** - * @brief Table for touchscreen event information display on LCD : - * table indexed on enum @ref TS_TouchEventTypeDef information - */ -extern char * ts_event_string_tab[TOUCH_EVENT_NB_MAX]; - -/** - * @brief Table for touchscreen gesture Id information display on LCD : table indexed - * on enum @ref TS_GestureIdTypeDef information - */ -extern char * ts_gesture_id_string_tab[GEST_ID_NB_MAX]; -/** - * @} - */ - -/** @defgroup STM32469I-Discovery_TS_Exported_Functions TS Exported Functions - * @{ - */ -uint8_t BSP_TS_Init(uint16_t ts_SizeX, uint16_t ts_SizeY); -uint8_t BSP_TS_GetState(TS_StateTypeDef *TS_State); - -#if (TS_MULTI_TOUCH_SUPPORTED == 1) -uint8_t BSP_TS_Get_GestureId(TS_StateTypeDef *TS_State); -uint8_t BSP_TS_ResetTouchData(TS_StateTypeDef *TS_State); -#endif /* TS_MULTI_TOUCH_SUPPORTED == 1 */ - -uint8_t BSP_TS_ITConfig(void); - - -/* These __weak function can be surcharged by application code in case the current settings - need to be changed for specific (example GPIO allocation) */ -void BSP_TS_INT_MspInit(void); - -/** - * @} - */ - -/** - * @} - */ - -/** - * @} - */ - -/** - * @} - */ - - -#ifdef __cplusplus -} -#endif - -#endif /* __STM32469I_DISCOVERY_TS_H */ - -/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/