Commit Graph

82 Commits

Author SHA1 Message Date
Jerome Lambourg
114dd979fd Touch_Panel: provide more information on the touch events to the user
This allows in particular in multi-touch panels to keep track of individual
fingers.

Also this improves the performance of reading the touch events on the FT*
drivers, by using batch reading of the touch registers.

Finally this commit also fixes the ft6x06 driver implemented on the F469 and
F769 disco boards.
2017-05-02 14:28:53 +02:00
Jerome Lambourg
746e3a33da HAL: fix the alignment of audio buffers. 2017-05-02 14:28:53 +02:00
Jerome Lambourg
9b591d1480 Refactor and fix the bitmap layers.
This commit provides the following fixes:
* pure LTDC mode: fix the 'copy_back' function when swapping the double
  buffered layers.
* fix the 'swapped' mode, when buffer's internal representation has swapped
  x/y values.

This commit enhances the efficiency of the graphical primitives, by
* better organizing the potentially hardware-optimized primitives
* constantly redirecting the other ones to those hardware-optimized when
  appropriate
* optimize the software-rendered copy_rect
* use direct fields access for values that are used very often (width, height,
  color_mode)
* provide a mean to easily know if a bitmap is a memory buffer or a device
* adds finer control over the potentially DMA-accelerated Fill_Rect primitive.
* add direct access to DMA2D buffers, to prevent too much dispatching
2017-05-02 14:28:53 +02:00
Jerome Lambourg
a1fbb0fc89 In HAL.Bitmap, add control over the data cache manipulation.
In order to copy big chunks of data from buffer to buffer, it is usually
desirable to use DMA and thus we need to ensure that the memory and the cache
are coherent before transfering the data.

This is however a costly operation, that in controlled circumstances is not
needed.

Hence the addition of the Clean_Cache parameter to the Copy_Rect* subprograms.

This also adds a missing variant for Set_Pixel_Blend with color as native
representation, and improves the implementation of
Soft_Drawing_Bitmap.Copy_Rect to ease the implementation of
hardware-accelerated drawing primitives. STM32.DMA2D_Bitmap is simplified
accordingly.
2017-05-02 14:28:53 +02:00
Jerome Lambourg
1fa76dc605 Further refactor the board projects.
This commit in particular removes the need for aggregate projects.
2017-04-23 15:50:27 +02:00
Jerome Lambourg
13ef8db311 Rework the sdcard branch from master.
This merges the various sdcard handling enhancements into a single commit,
the two branches master and sdcard having diverged too much to perform
a simple git merge.
2017-03-28 14:55:52 +02:00
Fabien Chouteau
d8181686c3 Bitmap: Add monochrome support 2017-02-26 20:30:50 +01:00
Fabien Chouteau
632b449d1d HAL types: Revert UInt1 to Bit 2017-02-15 19:04:27 +01:00
Fabien Chouteau
0a804815ae HAL: Make UInt8|16|32 derived from Interfaces types rather than subtypes
This remove the dependency on the Interfaces package which simplify the
use of HAL types.

Also remove Byte and Bit subtype.
2017-02-13 21:18:34 +01:00
Fabien Chouteau
5f61adb313 HAL.GPIO: Fix Set precondition and add comments 2017-02-04 13:40:59 +01:00
Fabien Chouteau
9bfa2bb529 HAL.GPIO: Rename pull-up/pull-down type and primitives 2017-02-03 20:21:47 +01:00
Fabien Chouteau
fd65f49de0 HAL.GPIO: Add pull-up/pull-down control 2017-02-03 00:39:58 +01:00
Fabien Chouteau
b565c81385 HAL.GPIO: Add primitives to control GPIO mode (in, out) 2017-02-03 00:39:58 +01:00
Jerome Lambourg
d47fb57071 Make the HAL.I2C.I2C_Data a subtype of Byte_Array.
This makes the API more consistent with the rest of the HAL.
2017-02-01 15:45:07 +01:00
Fabien Chouteau
d4f5542d87 Merge pull request #115 from AdaCore/hal_config_pragma
Use configuration pragmas to control HAL dependency
2017-01-27 08:14:56 +01:00
Fabien Chouteau
bc2c7f810f HAL.Bitmap: Move color conversion utilities to a dedicated package 2017-01-21 19:50:50 +01:00
Fabien Chouteau
f645d76a3f HAL.Bitmap: Move Draw_Line and Cubic_Bezier with the other drawing primitives 2017-01-21 19:50:50 +01:00
Fabien Chouteau
d44d8f9388 HAL.Bitmap: Finish cleanup of interface 2017-01-21 16:35:53 +01:00
Fabien Chouteau
33488fcc59 HAL.Bitmap: Split interface and implementation 2017-01-21 13:16:48 +01:00
Fabien Chouteau
fdc3ef6e47 HAL.Bitmap: Unify drawing API by using Point and Rect types 2017-01-21 12:49:56 +01:00
Fabien Chouteau
f76a004acb HAL.Bitmap: Move Draw/Fill_Rect with the other drawing primitives 2017-01-21 11:54:14 +01:00
Fabien Chouteau
94fa1bfc31 HAL.Bitmap: Move Draw_Circle and Fill_Circle with the other drawing primitives 2017-01-21 11:54:04 +01:00
Fabien Chouteau
e167eb8a01 HAL.Bitmap: Add two functions that improve the abstraction
The goal is to be able to support bitmap that are stored in an external
device. For example a screen with embedded memory like the ST7735R.
2017-01-21 11:20:51 +01:00
Fabien Chouteau
75f13b8382 HAL.Framebuffer Refactoring: Remove Get_ and Is_ prefixes 2017-01-21 11:11:46 +01:00
Fabien Chouteau
80f15f741b HAL.Bitmap Refactoring: Fix function name Get_Pixel to Pixel 2017-01-21 11:11:15 +01:00