diff --git a/README.md b/README.md index 670aa23c2..27191f78f 100644 --- a/README.md +++ b/README.md @@ -15,6 +15,51 @@ Ada_Drivers_Library provides support for various devices in the ARM Cortex-M and RISC-V architectures. Some devices are only partially supported. Go to the [boards directory](boards/) for a list of supported hardware. +## Board list + +| Arch | Board | +| ------ | --------------------- | +| ARM | [STM32F407_Discovery] | +| ARM | [STM32F429_Discovery] | +| ARM | [STM32F469_Discovery] | +| ARM | [STM32F4XX_M] | +| ARM | [STM32_F4VE] | +| ARM | [STM32F746_Discovery] | +| ARM | [STM32F769_Discovery] | +| ARM | [STM32_H405] | +| ARM | [NUCLEO_F446ZE] | +| ARM | [Crazyflie] | +| ARM | [Feather_STM32F405] | +| ARM | [OpenMV2] | +| ARM | [MicroBit] | +| ARM | [NRF52_DK] | +| RISC-V | [HiFive1] | +| RISC-V | [HiFive1_rev_B] | +| RISC-V | [Unleashed] | +| | [Native] | + + +[HiFive1]: examples/HiFive1/README.md +[HiFive1_rev_B]: examples/HiFive1_rev_B/README.md +[MicroBit]: examples/MicroBit/README.md +[NRF52_DK]: examples/NRF52_DK/README.md +[OpenMV2]: examples/OpenMV2/README.md +[STM32F429_Discovery]: examples/STM32F429_Discovery/README.md +[STM32F469_Discovery]: examples/STM32F469_Discovery/README.md +[STM32F407_Discovery]: examples/STM32F4_DISCO/README.md +[STM32_F4VE]: examples/stm32_f4ve/README.md +[STM32F4XX_M]: examples/stm32f4xx_m/README.md +[STM32F746_Discovery]: examples/STM32F746_Discovery/README.md +[STM32F769_Discovery]: examples/STM32F769_Discovery/README.md + + +[STM32_H405]: examples/stm32_h405/ +[NUCLEO_F446ZE]: examples/nucleo_f446ze/ +[Feather_STM32F405]: examples/feather_stm32f405 +[Crazyflie]: boards/crazyflie/ +[Unleashed]: examples/Unleashed +[Native]: boards/native + # 3. Getting started To start using the Ada_Drivers_Library, please go to the [examples diff --git a/arch/ARM/STM32/drivers/fsmc/README.md b/arch/ARM/STM32/drivers/fsmc/README.md new file mode 100644 index 000000000..2c2ddf758 --- /dev/null +++ b/arch/ARM/STM32/drivers/fsmc/README.md @@ -0,0 +1,43 @@ +# Flexible static memory controller (FSMC) + +This component of STM32F40x/41x processors allows for the management +of static memory, flash memory, and PC Cards. Unlike the FMC in more +advanced MCU models, dynamic memory is not supported. Each type of +memory has its address bank. The controller offers flexible settings +for various operating modes. For instance, extended modes can have +different delays set for read and write operations. It is recommended +to refer to the STM32 Reference Manual (RM0090) for a detailed description +of possible modes and corresponding settings. + +* [Datasheet](https://www.st.com/resource/en/reference_manual/dm00031020-stm32f405-415-stm32f407-417-stm32f427-437-and-stm32f429-439-advanced-arm-based-32-bit-mcus-stmicroelectronics.pdf) - STM32 Reference Manual (RM0090), FSMC chapter. + +* [Configuration example](../../../../../boards/stm32_f4ve/src/display_ili9341.adb) - display_ili9341.adb: + +## Example + +Configuring Bank_1 for ILI9341 LCD controller: + +* half word (16 bit access) +* with write enabled +* distinct read and write timings + +```ada +STM32.FSMC.Configure + (Bank_1 => + (1 => -- TFT is connected to sub-bank 1 + (Is_Set => True, + Value => + (Write_Enable => True, + Bus_Width => STM32.FSMC.Half_Word, + Memory_Type => STM32.FSMC.SRAM, + Bus_Turn => 15, -- 90ns + Data_Setup => 57, -- 342ns + Address_Setup => 0, + Extended => + (STM32.FSMC.Mode_A, + Write_Bus_Turn => 3, -- 18ns + Write_Data_Setup => 2, -- 12ns + Write_Address_Setup => 0), + others => <>)), + others => <>)); +``` \ No newline at end of file diff --git a/components/src/screen/ili9341/README.md b/components/src/screen/ili9341/README.md new file mode 100644 index 000000000..1b2c555d8 --- /dev/null +++ b/components/src/screen/ili9341/README.md @@ -0,0 +1,16 @@ +# ILI9341 + +TFT LCD Single Chip Driver 240RGBx320 Resolution and 262K color. +It has parallel and serial interfaces for MCU. It's also able to +receive data over RGB interface. + +The STM32F429 Discovery board utilizes an RGB interface and stores +graphic data in the main memory. The STM32 F4VE board uses a parallel +interface and employs ILI9341 memory, which significantly slows down +drawing but conserves main memory. When using the parallel interface, +ILI9341 registers are mapped to the MCU's address space through the +memory controller (FSMC), simplifying and speeding up the drawing. + +* [Datasheet](http://www.datasheet-pdf.info/attach/1/3707537954.pdf) +* [Example for RGB interface](../../../../examples/STM32F429_Discovery/draw_stm32f429disco.gpr) for STM32F429 Discovery +* [Example for parallel interface](../../../../examples/stm32_f4ve/lcd) for STM32 F4VE board diff --git a/components/src/touch_panel/xpt2046/README.md b/components/src/touch_panel/xpt2046/README.md new file mode 100644 index 000000000..126c45590 --- /dev/null +++ b/components/src/touch_panel/xpt2046/README.md @@ -0,0 +1,25 @@ +# XPT2046 + +The XPT2046 is a 4-wire resistive touch screen controller that incorporates +a 12-bit 125 kHz sampling SAR type A/D converter. Many cheap LCD displays +contain this controller. Typically, it is connected via SPI. + +To align the touch point with the display coordinates, it might be +necessary to calibrate the touch screen. The XPT2046 sensor provides +raw values within the range of 0 to 4095. If you identify the raw +values associated with the screen edges, you can perform touch +panel calibration by invoking the Calibrate procedure. + +```ada +subtype Sensor_Value is HAL.UInt16 range 0 .. 2 ** 12 - 1; + +procedure Calibrate + (This : in out XPT2046_Device'Class; + Min_X : Sensor_Value; + Max_X : Sensor_Value; + Min_Y : Sensor_Value; + Max_Y : Sensor_Value); +``` + +* [Datasheet](https://www.datasheet-pdf.info/attach/1/3898350023.pdf) +* [Example for STM32 F4VE board](../../../../examples/stm32_f4ve/lcd) diff --git a/examples/stm32_f4ve/draw/README.md b/examples/stm32_f4ve/draw/README.md new file mode 100644 index 000000000..924f24725 --- /dev/null +++ b/examples/stm32_f4ve/draw/README.md @@ -0,0 +1,12 @@ +# Draw on the screen + +This example is a modified version of the draw example for +STM32F429 Discovery. Unlike the original, it does not use +the Framebuffer interface. Touch the screen to draw. The +thickness of points and lines during drawing depends on +the pressure applied and what you touch on the screen. + +Press the K-UP button for a demo of drawing primitives. + +For this demo, you need an LCD with a touch panel, which +is usually sold as part of the STM32 F4VE board kit. diff --git a/examples/stm32_f4ve/lcd/README.md b/examples/stm32_f4ve/lcd/README.md new file mode 100644 index 000000000..0e87fe050 --- /dev/null +++ b/examples/stm32_f4ve/lcd/README.md @@ -0,0 +1,9 @@ +# LCD demo + +This example demonstrates working with the LCD using the +HAL.Bitmap.Bitmap_Buffer interface. +Colorful rectangles are displayed on the screen, and their +colors change based on the X and Y coordinates. + +For this demo, you need an LCD, which is usually sold as +part of the STM32 F4VE board kit.