Compare commits

...

7 Commits

27 changed files with 8932 additions and 87422 deletions

View File

@ -53,7 +53,7 @@ Possible choices :
|------------|----------|------|----------|-------------|--------------|---------| |------------|----------|------|----------|-------------|--------------|---------|
||PB_20|I/O|**UART0_RX**/PWM1/UART1_CTS/I²C_SCL|U/D|**USB/Serial TX flash pin**|| ||PB_20|I/O|**UART0_RX**/PWM1/UART1_CTS/I²C_SCL|U/D|**USB/Serial TX flash pin**||
||PB_19|I/O|**UART0_TX**/PWM0/UART1_RTS/**I²C_SDA**|U/D|**USB/Serial RX flash pin** and **BMA456, Touch Panel, HMC5883L and BMP280 SDA pins**|| ||PB_19|I/O|**UART0_TX**/PWM0/UART1_RTS/**I²C_SDA**|U/D|**USB/Serial RX flash pin** and **BMA456, Touch Panel, HMC5883L and BMP280 SDA pins**||
||WAKEUP|I|**External Wake Up Pin**|D|**BMA456 IRQ line** and **Touch Panel IRQ line**|The chip is waken up when the pin is HIGH| ||WAKEUP|I|**External Wake Up Pin**|D|**BMA456 IRQ line** and **Touch Panel IRQ line** through NAND Gate|The chip is waken up when the pin is HIGH|
||RESET|I|Reset Pin|D|**Micro switch** and **USB/Serial RTS pin**|| ||RESET|I|Reset Pin|D|**Micro switch** and **USB/Serial RTS pin**||
||XTAL_OUT|O|External crystal output|||| ||XTAL_OUT|O|External crystal output||||
||XTAL_IN|I|External crystal input|||| ||XTAL_IN|I|External crystal input||||
@ -63,16 +63,16 @@ Possible choices :
||AVDD3V3|P|Chip power supply, 3.3V||| ||AVDD3V3|P|Chip power supply, 3.3V|||
||AVDD3V3_AUX|P|Chip power supply, 3.3V|||| ||AVDD3V3_AUX|P|Chip power supply, 3.3V||||
||TEST|I|Test function configuration pin|||| ||TEST|I|Test function configuration pin||||
||BOOTMODE|I/O|BOOTMODE and I²S_MCLK/LSPI_CS/PWM2/I²S_DO|U/D||| ||BOOTMODE|**I/O**|BOOTMODE and I²S_MCLK/LSPI_CS/PWM2/I²S_DO|U/D|**Touch Panel Reset line**||
||PA_1|I/O|JTAG_CK/**I²C_SCL**/PWM3/I²S_LRCK/ADC0|U/D|**BMA456, Touch Panel, HMC5883L and BMP280 SCL pins**|| ||PA_1|I/O|JTAG_CK/**I²C_SCL**/PWM3/I²S_LRCK/ADC0|U/D|**BMA456, Touch Panel, HMC5883L and BMP280 SCL pins**||
||PA_4|I/O|JTAG_SWO/I²C_SDA/PWM4/I²S_BCK/**ADC1**|U/D|**Battery resistor voltage divider output**|| ||PA_4|I/O|JTAG_SWO/I²C_SDA/PWM4/I²S_BCK/**ADC1**|U/D|**Battery resistor voltage divider output**||
||PA_7|I/O|**PWM4**/LSPI_MOSI/I²S_MCK/I²S_DI/Touch0|U/D|**LCD backlight N-MOSFET driver**|| ||PA_7|I/O|**PWM4**/LSPI_MOSI/I²S_MCK/I²S_DI/Touch0|U/D|**LCD backlight N-MOSFET driver**||
||VDD3V3IO|P|IO power supply, 3.3V|||| ||VDD3V3IO|P|IO power supply, 3.3V||||
||PB_0|I/O|PWM0/LSPI_MISO/UART3_TX/PSRAM_CK/Touch3|U/D||| ||PB_0|I/O|**PWM0**/LSPI_MISO/UART3_TX/PSRAM_CK/Touch3|U/D|**Vibration motor control pin**||
||PB_1|**I/O**|PWM1/LSPI_CK/UART3_RX/PSRAM_CS/Touch4|U/D|**Touch Panel IRQ line**|| ||PB_1|**I/O**|PWM1/LSPI_CK/UART3_RX/PSRAM_CS/Touch4|U/D|**Touch Panel IRQ line**||
||PB_2|I/O|PWM2/LSPI_CK/**UART2_TX**/PSRAM_D0/Touch5|U/D|**Debug UART serial output**|| ||PB_2|I/O|PWM2/LSPI_CK/**UART2_TX**/PSRAM_D0/Touch5|U/D|**Debug UART serial output**||
||PB_3|I/O|**PWM3**/LSPI_MISO/UART2_RX/PSRAM_D1/Touch6|U/D|**Vibration motor control pin** || ||PB_3|**I/O**|PWM3/LSPI_MISO/UART2_RX/PSRAM_D1/Touch6|U/D|**TP4056A Charging Signal**||
||PB_4|I/O|LSPI_CS/UART2_RTS/UART4_TX/PSRAM_D2/Touch7|U/D||| ||PB_4|**I/O**|LSPI_CS/UART2_RTS/UART4_TX/PSRAM_D2/Touch7|U/D|**TP4056A Charged Signal**||
||PB_5|**I/O**|LSPI_MOSI/UART2_CTS/UART4_RX/PSRAM_D3/Touch8|U/D|**Battery resistor voltage divider enable**|| ||PB_5|**I/O**|LSPI_MOSI/UART2_CTS/UART4_RX/PSRAM_D3/Touch8|U/D|**Battery resistor voltage divider enable**||
||VDD3V3IO|P|IO power supply, 3.3V|||| ||VDD3V3IO|P|IO power supply, 3.3V||||
||CAP|I|External capacitor, 4.7µF|||| ||CAP|I|External capacitor, 4.7µF||||
@ -82,7 +82,7 @@ Possible choices :
||PB_9|**I/O**|I²S_LRCK/MMC_D1/HSPI_CS/SDIO_D1/Touch12|U/D|**LCD Reset Pin**|| ||PB_9|**I/O**|I²S_LRCK/MMC_D1/HSPI_CS/SDIO_D1/Touch12|U/D|**LCD Reset Pin**||
||PB_10|**I/O**|I²S_DI/MMC_D2/HSPI_DI/SDIO_D2|U/D|**LCD Chip Select Pin**|| ||PB_10|**I/O**|I²S_DI/MMC_D2/HSPI_DI/SDIO_D2|U/D|**LCD Chip Select Pin**||
||VDD3V3IO|P|IO power supply, 3.3V|||| ||VDD3V3IO|P|IO power supply, 3.3V||||
||PB_11|I/O|I²S_DO/MMC_D3/HSPI_DO/SDIO_D3|U/D||| ||PB_11|**I/O**|I²S_DO/MMC_D3/HSPI_DO/SDIO_D3|U/D|**BMA456 IRQ 2 line**||
||GND|P|Ground (Central Pad)|||| ||GND|P|Ground (Central Pad)||||
## What is done/working so far : ## What is done/working so far :
@ -126,6 +126,7 @@ Possible choices :
(Need to work on sleep current :-( ) (Need to work on sleep current :-( )
| Mode | Current draw | Estimated battery life (450 mAh lipo) | | Mode | Current draw | Estimated battery life (450 mAh lipo) |
|--------------------------|--------------|---------------------------------------| |--------------------------|--------------|---------------------------------------|
|Active (No BLE / No WiFi) |~52 mA | ~8 hour | |Active (40Mhz clk)<br>(No BLE / No WiFi) |~52 mA | ~8 hour |
|Active (240Mhz clk)<br>(No BLE / No WiFi) |~72 mA | ~6 hour |
|Sleep |~4.5 mA | ~4 days and 4 hours | |Sleep |~4.5 mA | ~4 days and 4 hours |
|Standby |TODO |TODO | |Standby |TODO |TODO |

View File

@ -128,6 +128,149 @@
) )
) )
) )
(symbol "BMA456" (pin_names (offset 1.016)) (in_bom yes) (on_board yes)
(property "Reference" "U" (id 0) (at -6.35 11.43 0)
(effects (font (size 1.27 1.27)) (justify left bottom))
)
(property "Value" "BMA456" (id 1) (at -2.54 11.43 0)
(effects (font (size 1.27 1.27)) (justify left bottom))
)
(property "Footprint" "ICs:XDCR_BMA456" (id 2) (at -1.27 0 0)
(effects (font (size 1.27 1.27)) (justify bottom) hide)
)
(property "Datasheet" "" (id 3) (at -1.27 -1.27 0)
(effects (font (size 1.27 1.27)) hide)
)
(property "MANUFACTURER" "Bosch" (id 4) (at -1.27 -1.27 0)
(effects (font (size 1.27 1.27)) (justify bottom) hide)
)
(property "MAXIMUM_PACKAGE_HEIGHT" "0.70 mm" (id 5) (at -1.27 -1.27 0)
(effects (font (size 1.27 1.27)) (justify bottom) hide)
)
(property "STANDARD" "Manufacturer Recommendation" (id 6) (at 0 0 0)
(effects (font (size 1.27 1.27)) (justify bottom) hide)
)
(property "PARTREV" "2.0" (id 7) (at -1.27 -1.27 0)
(effects (font (size 1.27 1.27)) (justify bottom) hide)
)
(symbol "BMA456_0_0"
(rectangle (start -6.35 10.16) (end 6.35 -10.16)
(stroke (width 0.254) (type default) (color 0 0 0 0))
(fill (type background))
)
(pin bidirectional line (at -11.43 0 0) (length 5.08)
(name "SDO" (effects (font (size 1.016 1.016))))
(number "1" (effects (font (size 1.016 1.016))))
)
(pin input line (at -11.43 7.62 0) (length 5.08)
(name "~{CS}" (effects (font (size 1.016 1.016))))
(number "10" (effects (font (size 1.016 1.016))))
)
(pin output clock (at -11.43 -5.08 0) (length 5.08)
(name "ASCL" (effects (font (size 1.016 1.016))))
(number "11" (effects (font (size 1.016 1.016))))
)
(pin input clock (at -11.43 5.08 0) (length 5.08)
(name "SCX" (effects (font (size 1.016 1.016))))
(number "12" (effects (font (size 1.016 1.016))))
)
(pin bidirectional line (at -11.43 2.54 0) (length 5.08)
(name "SDX" (effects (font (size 1.016 1.016))))
(number "2" (effects (font (size 1.016 1.016))))
)
(pin power_in line (at 11.43 5.08 180) (length 5.08)
(name "VDDIO" (effects (font (size 1.016 1.016))))
(number "3" (effects (font (size 1.016 1.016))))
)
(pin bidirectional line (at -11.43 -7.62 0) (length 5.08)
(name "ASDA" (effects (font (size 1.016 1.016))))
(number "4" (effects (font (size 1.016 1.016))))
)
(pin bidirectional line (at 11.43 1.27 180) (length 5.08)
(name "INT1" (effects (font (size 1.016 1.016))))
(number "5" (effects (font (size 1.016 1.016))))
)
(pin bidirectional line (at 11.43 -1.27 180) (length 5.08)
(name "INT2" (effects (font (size 1.016 1.016))))
(number "6" (effects (font (size 1.016 1.016))))
)
(pin power_in line (at 11.43 7.62 180) (length 5.08)
(name "VDD" (effects (font (size 1.016 1.016))))
(number "7" (effects (font (size 1.016 1.016))))
)
(pin power_in line (at 11.43 -5.08 180) (length 5.08)
(name "GNDIO" (effects (font (size 1.016 1.016))))
(number "8" (effects (font (size 1.016 1.016))))
)
(pin power_in line (at 11.43 -7.62 180) (length 5.08)
(name "GND" (effects (font (size 1.016 1.016))))
(number "9" (effects (font (size 1.016 1.016))))
)
)
)
(symbol "BMP280" (in_bom yes) (on_board yes)
(property "Reference" "U" (id 0) (at -7.62 10.16 0)
(effects (font (size 1.27 1.27)) (justify left top))
)
(property "Value" "BMP280" (id 1) (at 5.08 10.16 0)
(effects (font (size 1.27 1.27)) (justify left top))
)
(property "Footprint" "Package_LGA:Bosch_LGA-8_2x2.5mm_P0.65mm_ClockwisePinNumbering" (id 2) (at 0 -17.78 0)
(effects (font (size 1.27 1.27)) hide)
)
(property "Datasheet" "https://ae-bst.resource.bosch.com/media/_tech/media/datasheets/BST-BMP280-DS001.pdf" (id 3) (at 0 0 0)
(effects (font (size 1.27 1.27)) hide)
)
(property "ki_keywords" "I2C, SPI, pressure, temperature, sensor" (id 4) (at 0 0 0)
(effects (font (size 1.27 1.27)) hide)
)
(property "ki_description" "Absolute Barometric Pressure Sensor, LGA-8" (id 5) (at 0 0 0)
(effects (font (size 1.27 1.27)) hide)
)
(property "ki_fp_filters" "Bosch*LGA*2x2.5mm*P0.65mm*" (id 6) (at 0 0 0)
(effects (font (size 1.27 1.27)) hide)
)
(symbol "BMP280_0_1"
(rectangle (start -7.62 -5.08) (end 5.08 7.62)
(stroke (width 0.254) (type default) (color 0 0 0 0))
(fill (type background))
)
)
(symbol "BMP280_1_1"
(pin power_in line (at 0 -7.62 90) (length 2.54)
(name "GND" (effects (font (size 1.27 1.27))))
(number "1" (effects (font (size 1.27 1.27))))
)
(pin input line (at -10.16 -2.54 0) (length 2.54)
(name "CSB" (effects (font (size 1.27 1.27))))
(number "2" (effects (font (size 1.27 1.27))))
)
(pin bidirectional line (at -10.16 2.54 0) (length 2.54)
(name "SDI" (effects (font (size 1.27 1.27))))
(number "3" (effects (font (size 1.27 1.27))))
)
(pin input line (at -10.16 5.08 0) (length 2.54)
(name "SCK" (effects (font (size 1.27 1.27))))
(number "4" (effects (font (size 1.27 1.27))))
)
(pin bidirectional line (at -10.16 0 0) (length 2.54)
(name "SDO" (effects (font (size 1.27 1.27))))
(number "5" (effects (font (size 1.27 1.27))))
)
(pin power_in line (at 0 10.16 270) (length 2.54)
(name "VDDIO" (effects (font (size 1.27 1.27))))
(number "6" (effects (font (size 1.27 1.27))))
)
(pin power_in line (at 2.54 -7.62 90) (length 2.54)
(name "GND" (effects (font (size 1.27 1.27))))
(number "7" (effects (font (size 1.27 1.27))))
)
(pin power_in line (at 2.54 10.16 270) (length 2.54)
(name "VDD" (effects (font (size 1.27 1.27))))
(number "8" (effects (font (size 1.27 1.27))))
)
)
)
(symbol "DW01A" (in_bom yes) (on_board yes) (symbol "DW01A" (in_bom yes) (on_board yes)
(property "Reference" "U" (id 0) (at -3.81 5.08 0) (property "Reference" "U" (id 0) (at -3.81 5.08 0)
(effects (font (size 1.27 1.27))) (effects (font (size 1.27 1.27)))
@ -234,6 +377,394 @@
) )
) )
) )
(symbol "IRLML2502" (pin_names hide) (in_bom yes) (on_board yes)
(property "Reference" "Q" (id 0) (at 5.08 1.905 0)
(effects (font (size 1.27 1.27)) (justify left))
)
(property "Value" "IRLML2502" (id 1) (at 5.08 0 0)
(effects (font (size 1.27 1.27)) (justify left))
)
(property "Footprint" "Package_TO_SOT_SMD:SOT-23" (id 2) (at 5.08 -1.905 0)
(effects (font (size 1.27 1.27) italic) (justify left) hide)
)
(property "Datasheet" "https://www.infineon.com/dgdl/irlml2502pbf.pdf?fileId=5546d462533600a401535668048e2606" (id 3) (at 0 0 0)
(effects (font (size 1.27 1.27)) (justify left) hide)
)
(property "ki_keywords" "N-Channel HEXFET MOSFET" (id 4) (at 0 0 0)
(effects (font (size 1.27 1.27)) hide)
)
(property "ki_description" "4.2A Id, 20V Vds, 450mOhm Rds, N-Channel HEXFET Power MOSFET, SOT-23" (id 5) (at 0 0 0)
(effects (font (size 1.27 1.27)) hide)
)
(property "ki_fp_filters" "SOT?23*" (id 6) (at 0 0 0)
(effects (font (size 1.27 1.27)) hide)
)
(symbol "IRLML2502_0_1"
(polyline
(pts
(xy 0.254 0)
(xy -2.54 0)
)
(stroke (width 0) (type default) (color 0 0 0 0))
(fill (type none))
)
(polyline
(pts
(xy 0.254 1.905)
(xy 0.254 -1.905)
)
(stroke (width 0.254) (type default) (color 0 0 0 0))
(fill (type none))
)
(polyline
(pts
(xy 0.762 -1.27)
(xy 0.762 -2.286)
)
(stroke (width 0.254) (type default) (color 0 0 0 0))
(fill (type none))
)
(polyline
(pts
(xy 0.762 0.508)
(xy 0.762 -0.508)
)
(stroke (width 0.254) (type default) (color 0 0 0 0))
(fill (type none))
)
(polyline
(pts
(xy 0.762 2.286)
(xy 0.762 1.27)
)
(stroke (width 0.254) (type default) (color 0 0 0 0))
(fill (type none))
)
(polyline
(pts
(xy 2.54 2.54)
(xy 2.54 1.778)
)
(stroke (width 0) (type default) (color 0 0 0 0))
(fill (type none))
)
(polyline
(pts
(xy 2.54 -2.54)
(xy 2.54 0)
(xy 0.762 0)
)
(stroke (width 0) (type default) (color 0 0 0 0))
(fill (type none))
)
(polyline
(pts
(xy 0.762 -1.778)
(xy 3.302 -1.778)
(xy 3.302 1.778)
(xy 0.762 1.778)
)
(stroke (width 0) (type default) (color 0 0 0 0))
(fill (type none))
)
(polyline
(pts
(xy 1.016 0)
(xy 2.032 0.381)
(xy 2.032 -0.381)
(xy 1.016 0)
)
(stroke (width 0) (type default) (color 0 0 0 0))
(fill (type outline))
)
(polyline
(pts
(xy 2.794 0.508)
(xy 2.921 0.381)
(xy 3.683 0.381)
(xy 3.81 0.254)
)
(stroke (width 0) (type default) (color 0 0 0 0))
(fill (type none))
)
(polyline
(pts
(xy 3.302 0.381)
(xy 2.921 -0.254)
(xy 3.683 -0.254)
(xy 3.302 0.381)
)
(stroke (width 0) (type default) (color 0 0 0 0))
(fill (type none))
)
(circle (center 1.651 0) (radius 2.794)
(stroke (width 0.254) (type default) (color 0 0 0 0))
(fill (type none))
)
(circle (center 2.54 -1.778) (radius 0.254)
(stroke (width 0) (type default) (color 0 0 0 0))
(fill (type outline))
)
(circle (center 2.54 1.778) (radius 0.254)
(stroke (width 0) (type default) (color 0 0 0 0))
(fill (type outline))
)
)
(symbol "IRLML2502_1_1"
(pin input line (at -5.08 0 0) (length 2.54)
(name "G" (effects (font (size 1.27 1.27))))
(number "1" (effects (font (size 1.27 1.27))))
)
(pin passive line (at 2.54 -5.08 90) (length 2.54)
(name "S" (effects (font (size 1.27 1.27))))
(number "2" (effects (font (size 1.27 1.27))))
)
(pin passive line (at 2.54 5.08 270) (length 2.54)
(name "D" (effects (font (size 1.27 1.27))))
(number "3" (effects (font (size 1.27 1.27))))
)
)
)
(symbol "IRLML6402" (pin_names hide) (in_bom yes) (on_board yes)
(property "Reference" "Q" (id 0) (at 5.08 1.905 0)
(effects (font (size 1.27 1.27)) (justify left))
)
(property "Value" "IRLML6402" (id 1) (at 5.08 0 0)
(effects (font (size 1.27 1.27)) (justify left))
)
(property "Footprint" "Package_TO_SOT_SMD:SOT-23" (id 2) (at 5.08 -1.905 0)
(effects (font (size 1.27 1.27) italic) (justify left) hide)
)
(property "Datasheet" "https://www.infineon.com/dgdl/irlml6402pbf.pdf?fileId=5546d462533600a401535668d5c2263c" (id 3) (at 0 0 0)
(effects (font (size 1.27 1.27)) (justify left) hide)
)
(property "ki_keywords" "P-Channel HEXFET MOSFET" (id 4) (at 0 0 0)
(effects (font (size 1.27 1.27)) hide)
)
(property "ki_description" "-3.7A Id, -20V Vds, 65mOhm Rds, P-Channel HEXFET Power MOSFET, SOT-23" (id 5) (at 0 0 0)
(effects (font (size 1.27 1.27)) hide)
)
(property "ki_fp_filters" "SOT?23*" (id 6) (at 0 0 0)
(effects (font (size 1.27 1.27)) hide)
)
(symbol "IRLML6402_0_1"
(polyline
(pts
(xy 0.254 0)
(xy -2.54 0)
)
(stroke (width 0) (type default) (color 0 0 0 0))
(fill (type none))
)
(polyline
(pts
(xy 0.254 1.905)
(xy 0.254 -1.905)
)
(stroke (width 0.254) (type default) (color 0 0 0 0))
(fill (type none))
)
(polyline
(pts
(xy 0.762 -1.27)
(xy 0.762 -2.286)
)
(stroke (width 0.254) (type default) (color 0 0 0 0))
(fill (type none))
)
(polyline
(pts
(xy 0.762 0.508)
(xy 0.762 -0.508)
)
(stroke (width 0.254) (type default) (color 0 0 0 0))
(fill (type none))
)
(polyline
(pts
(xy 0.762 2.286)
(xy 0.762 1.27)
)
(stroke (width 0.254) (type default) (color 0 0 0 0))
(fill (type none))
)
(polyline
(pts
(xy 2.54 2.54)
(xy 2.54 1.778)
)
(stroke (width 0) (type default) (color 0 0 0 0))
(fill (type none))
)
(polyline
(pts
(xy 2.54 -2.54)
(xy 2.54 0)
(xy 0.762 0)
)
(stroke (width 0) (type default) (color 0 0 0 0))
(fill (type none))
)
(polyline
(pts
(xy 0.762 1.778)
(xy 3.302 1.778)
(xy 3.302 -1.778)
(xy 0.762 -1.778)
)
(stroke (width 0) (type default) (color 0 0 0 0))
(fill (type none))
)
(polyline
(pts
(xy 2.286 0)
(xy 1.27 0.381)
(xy 1.27 -0.381)
(xy 2.286 0)
)
(stroke (width 0) (type default) (color 0 0 0 0))
(fill (type outline))
)
(polyline
(pts
(xy 2.794 -0.508)
(xy 2.921 -0.381)
(xy 3.683 -0.381)
(xy 3.81 -0.254)
)
(stroke (width 0) (type default) (color 0 0 0 0))
(fill (type none))
)
(polyline
(pts
(xy 3.302 -0.381)
(xy 2.921 0.254)
(xy 3.683 0.254)
(xy 3.302 -0.381)
)
(stroke (width 0) (type default) (color 0 0 0 0))
(fill (type none))
)
(circle (center 1.651 0) (radius 2.794)
(stroke (width 0.254) (type default) (color 0 0 0 0))
(fill (type none))
)
(circle (center 2.54 -1.778) (radius 0.254)
(stroke (width 0) (type default) (color 0 0 0 0))
(fill (type outline))
)
(circle (center 2.54 1.778) (radius 0.254)
(stroke (width 0) (type default) (color 0 0 0 0))
(fill (type outline))
)
)
(symbol "IRLML6402_1_1"
(pin input line (at -5.08 0 0) (length 2.54)
(name "G" (effects (font (size 1.27 1.27))))
(number "1" (effects (font (size 1.27 1.27))))
)
(pin passive line (at 2.54 -5.08 90) (length 2.54)
(name "S" (effects (font (size 1.27 1.27))))
(number "2" (effects (font (size 1.27 1.27))))
)
(pin passive line (at 2.54 5.08 270) (length 2.54)
(name "D" (effects (font (size 1.27 1.27))))
(number "3" (effects (font (size 1.27 1.27))))
)
)
)
(symbol "MAGNETIC-QMC5883L(PLCC16)" (pin_names (offset 1.016)) (in_bom yes) (on_board yes)
(property "Reference" "U" (id 0) (at -12.7 12.7 0)
(effects (font (size 1.27 1.27)) (justify left bottom))
)
(property "Value" "MAGNETIC-QMC5883L(PLCC16)" (id 1) (at -34.29 16.51 0)
(effects (font (size 1.27 1.27)) (justify left bottom))
)
(property "Footprint" "ICs:PLCC16-0.5-3X3MM" (id 2) (at -25.4 -13.97 0)
(effects (font (size 1.27 1.27)) (justify bottom) hide)
)
(property "Datasheet" "" (id 3) (at 0 -1.27 0)
(effects (font (size 1.27 1.27)) hide)
)
(property "MPN" "QMC5883L" (id 4) (at 0 0 0)
(effects (font (size 1.27 1.27)) (justify bottom) hide)
)
(property "VALUE" "QMC5883L" (id 5) (at 0 -2.54 0)
(effects (font (size 1.27 1.27)) (justify bottom) hide)
)
(symbol "MAGNETIC-QMC5883L(PLCC16)_0_0"
(pin bidirectional line (at -15.24 3.81 0) (length 2.54)
(name "1(SCL)" (effects (font (size 1.016 1.016))))
(number "1" (effects (font (size 1.016 1.016))))
)
(pin bidirectional line (at 15.24 -1.27 180) (length 2.54)
(name "10(C1)" (effects (font (size 1.016 1.016))))
(number "10" (effects (font (size 1.016 1.016))))
)
(pin power_in line (at 15.24 1.27 180) (length 2.54)
(name "11(GND)" (effects (font (size 1.016 1.016))))
(number "11" (effects (font (size 1.016 1.016))))
)
(pin bidirectional line (at 15.24 3.81 180) (length 2.54)
(name "12(SETC)" (effects (font (size 1.016 1.016))))
(number "12" (effects (font (size 1.016 1.016))))
)
(pin power_in line (at 3.81 15.24 270) (length 2.54)
(name "13(VDDIO)" (effects (font (size 1.016 1.016))))
(number "13" (effects (font (size 1.016 1.016))))
)
(pin no_connect line (at 1.27 15.24 270) (length 2.54)
(name "14(NC)" (effects (font (size 1.016 1.016))))
(number "14" (effects (font (size 1.016 1.016))))
)
(pin bidirectional line (at -1.27 15.24 270) (length 2.54)
(name "15(DRDY)" (effects (font (size 1.016 1.016))))
(number "15" (effects (font (size 1.016 1.016))))
)
(pin bidirectional line (at -3.81 15.24 270) (length 2.54)
(name "16(SDA)" (effects (font (size 1.016 1.016))))
(number "16" (effects (font (size 1.016 1.016))))
)
(pin power_in line (at -15.24 1.27 0) (length 2.54)
(name "2(VDD)" (effects (font (size 1.016 1.016))))
(number "2" (effects (font (size 1.016 1.016))))
)
(pin no_connect line (at -15.24 -1.27 0) (length 2.54)
(name "3(NC)" (effects (font (size 1.016 1.016))))
(number "3" (effects (font (size 1.016 1.016))))
)
(pin bidirectional line (at -15.24 -3.81 0) (length 2.54)
(name "4(S1)" (effects (font (size 1.016 1.016))))
(number "4" (effects (font (size 1.016 1.016))))
)
(pin no_connect line (at -3.81 -15.24 90) (length 2.54)
(name "5(NC)" (effects (font (size 1.016 1.016))))
(number "5" (effects (font (size 1.016 1.016))))
)
(pin no_connect line (at -1.27 -15.24 90) (length 2.54)
(name "6(NC)" (effects (font (size 1.016 1.016))))
(number "6" (effects (font (size 1.016 1.016))))
)
(pin no_connect line (at 1.27 -15.24 90) (length 2.54)
(name "7(NC)" (effects (font (size 1.016 1.016))))
(number "7" (effects (font (size 1.016 1.016))))
)
(pin bidirectional line (at 3.81 -15.24 90) (length 2.54)
(name "8(SETP)" (effects (font (size 1.016 1.016))))
(number "8" (effects (font (size 1.016 1.016))))
)
(pin power_in line (at 15.24 -3.81 180) (length 2.54)
(name "9(GND)" (effects (font (size 1.016 1.016))))
(number "9" (effects (font (size 1.016 1.016))))
)
)
(symbol "MAGNETIC-QMC5883L(PLCC16)_0_1"
(rectangle (start -12.7 12.7) (end 12.7 -12.7)
(stroke (width 0.254) (type default) (color 0 0 0 0))
(fill (type background))
)
)
)
(symbol "RT9013" (in_bom yes) (on_board yes) (symbol "RT9013" (in_bom yes) (on_board yes)
(property "Reference" "U" (id 0) (at -3.81 6.35 0) (property "Reference" "U" (id 0) (at -3.81 6.35 0)
(effects (font (size 1.27 1.27))) (effects (font (size 1.27 1.27)))

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,23 @@
(footprint "Custom_4_Pads_SMD" (version 20211014) (generator pcbnew)
(layer "F.Cu")
(tedit 59FED6E3)
(descr "SMD pads to solder wires")
(tags "SMD pads to solder wires")
(attr smd)
(fp_text reference "REF**" (at 0 -5) (layer "F.SilkS")
(effects (font (size 1 1) (thickness 0.15)))
(tstamp 54ca18ed-fc91-4e6a-97f0-bc1ea32de3b8)
)
(fp_text value "Custom_4_Pads_SMD" (at 0 5) (layer "F.Fab")
(effects (font (size 1 1) (thickness 0.15)))
(tstamp 53cf90ed-75fa-4692-8479-951cbed69bdd)
)
(fp_line (start -1 -4) (end 1 -4) (layer "F.SilkS") (width 0.12) (tstamp 2de97e2b-e959-48cb-aa49-7c757d7a4539))
(fp_line (start 1 4) (end -1 4) (layer "F.SilkS") (width 0.12) (tstamp b46339cc-0ad1-4122-8cd5-5ea02867ec5b))
(fp_line (start -1 4) (end -1 -4) (layer "F.SilkS") (width 0.12) (tstamp d14cd274-8381-4cc4-84c6-1c62c2ef5db4))
(fp_line (start 1 -4) (end 1 4) (layer "F.SilkS") (width 0.12) (tstamp e656558a-3af6-431a-a368-e92c85aec4e8))
(pad "1" smd circle (at 0 -2.505) (size 1 1) (layers "F.Cu" "F.Paste" "F.Mask") (tstamp 3c75a4b7-5cf0-4512-92bc-18298667381b))
(pad "2" smd circle (at 0 -0.835) (size 1 1) (layers "F.Cu" "F.Paste" "F.Mask") (tstamp a6865be0-a7a5-481d-a4b1-874a369983e4))
(pad "3" smd circle (at 0 0.835) (size 1 1) (layers "F.Cu" "F.Paste" "F.Mask") (tstamp a4285eff-61ae-4d6e-a550-44c952d0beea))
(pad "4" smd circle (at 0 2.505) (size 1 1) (layers "F.Cu" "F.Paste" "F.Mask") (tstamp c27ff6ee-455c-4088-b880-3638aa3d4aea))
)

View File

@ -0,0 +1,39 @@
(footprint "PLCC16-0.5-3X3MM" (version 20211014) (generator pcbnew)
(layer "F.Cu")
(tedit 63C5C674)
(attr through_hole)
(fp_text reference "REF**" (at 1.52657 -4.121744) (layer "F.SilkS")
(effects (font (size 0.480809 0.480809) (thickness 0.15)))
(tstamp fb874d1d-251b-4afc-8398-5aaff4b08f33)
)
(fp_text value "PLCC16-0.5-3X3MM" (at 4.877824 0.965406) (layer "F.SilkS")
(effects (font (size 0.480101 0.480101) (thickness 0.15)))
(tstamp ae794282-8cf0-4a0b-ba6f-3ebdb1ee7526)
)
(fp_line (start 2.6 -3) (end 3 -3) (layer "F.SilkS") (width 0.127) (tstamp 2fe86a6e-eda1-460d-9981-f148771c7139))
(fp_line (start 0 0) (end 0 -0.4) (layer "F.SilkS") (width 0.127) (tstamp 34a07bc0-54fb-4c82-aeec-5f53841e5336))
(fp_line (start 0.25 -3) (end 0 -2.75) (layer "F.SilkS") (width 0.127) (tstamp 49576f6d-6c60-4632-bba6-31e3867b8a35))
(fp_line (start 0.5 -3) (end 0.25 -3) (layer "F.SilkS") (width 0.127) (tstamp 8d246ee1-dde2-4296-80c5-9ac81a2dfb9f))
(fp_line (start 0 -2.75) (end 0 -2.5) (layer "F.SilkS") (width 0.127) (tstamp d2fe9b3b-673f-4c0e-a5bb-5a37c8d71c3a))
(fp_line (start 3 -0.4) (end 3 0) (layer "F.SilkS") (width 0.127) (tstamp d486c12e-6bec-4580-b65c-eeea776f7f56))
(fp_line (start 3 0) (end 2.6 0) (layer "F.SilkS") (width 0.127) (tstamp e5688b8c-c097-46e5-b2a6-005c5c880b5a))
(fp_line (start 0.4 0) (end 0 0) (layer "F.SilkS") (width 0.127) (tstamp e9a23f54-9981-4c92-bb2e-9141118ac08e))
(fp_line (start 3 -2.6) (end 3 -3) (layer "F.SilkS") (width 0.127) (tstamp f71ee18e-53b2-4ba5-8e31-a9e8654c2472))
(fp_circle (center -0.5 -2.9) (end -0.4 -2.9) (layer "F.SilkS") (width 0.254) (fill none) (tstamp 83a4626e-5359-43eb-8f26-5f100f3bec9f))
(pad "1" smd rect (at 0.2375 -2.25) (size 0.325 0.25) (layers "F.Cu" "F.Paste" "F.Mask") (tstamp 7906f849-d6e5-412c-9f33-1fa87544a4fb))
(pad "2" smd rect (at 0.2375 -1.75) (size 0.325 0.25) (layers "F.Cu" "F.Paste" "F.Mask") (tstamp 92a6d84a-beb0-4f1d-9d80-f1410a2fe448))
(pad "3" smd rect (at 0.2375 -1.25) (size 0.325 0.25) (layers "F.Cu" "F.Paste" "F.Mask") (tstamp d6f83970-ae7b-4d3a-8744-a089e132ce41))
(pad "4" smd rect (at 0.2375 -0.75) (size 0.325 0.25) (layers "F.Cu" "F.Paste" "F.Mask") (tstamp 569f3a3b-5f44-4391-8ebf-7a0ccfe41440))
(pad "5" smd rect (at 0.75 -0.2375 90) (size 0.325 0.25) (layers "F.Cu" "F.Paste" "F.Mask") (tstamp 5fb5e127-796d-4170-a2b3-d8d99ad4002d))
(pad "6" smd rect (at 1.25 -0.2375 90) (size 0.325 0.25) (layers "F.Cu" "F.Paste" "F.Mask") (tstamp e341deff-86be-4ccf-96bd-87f3c5935479))
(pad "7" smd rect (at 1.75 -0.2375 90) (size 0.325 0.25) (layers "F.Cu" "F.Paste" "F.Mask") (tstamp 80f40c8b-5946-4c73-a812-33ff786a0122))
(pad "8" smd rect (at 2.25 -0.2375 90) (size 0.325 0.25) (layers "F.Cu" "F.Paste" "F.Mask") (tstamp 43f40340-e722-43c0-aecd-12086942641d))
(pad "9" smd rect (at 2.7625 -0.75) (size 0.325 0.25) (layers "F.Cu" "F.Paste" "F.Mask") (tstamp 36ce7ce8-f8a1-4984-b777-8d7bda230e2b))
(pad "10" smd rect (at 2.7625 -1.25) (size 0.325 0.25) (layers "F.Cu" "F.Paste" "F.Mask") (tstamp 6d05890d-5089-4242-92ab-696ab35e7de2))
(pad "11" smd rect (at 2.7625 -1.75) (size 0.325 0.25) (layers "F.Cu" "F.Paste" "F.Mask") (tstamp fb49a95b-633c-407f-8ad5-cfd0d478533e))
(pad "12" smd rect (at 2.7625 -2.25) (size 0.325 0.25) (layers "F.Cu" "F.Paste" "F.Mask") (tstamp 1f6bcc5a-98cc-47ac-93bc-146d75daced7))
(pad "13" smd rect (at 2.25 -2.7625 90) (size 0.325 0.25) (layers "F.Cu" "F.Paste" "F.Mask") (tstamp 5e1ee7f4-3f56-4064-b93c-e603158cf381))
(pad "14" smd rect (at 1.75 -2.7625 90) (size 0.325 0.25) (layers "F.Cu" "F.Paste" "F.Mask") (tstamp a3f32736-c9f1-4acc-aa18-9b847ddb085e))
(pad "15" smd rect (at 1.25 -2.7625 90) (size 0.325 0.25) (layers "F.Cu" "F.Paste" "F.Mask") (tstamp 382589b2-cf9d-42ac-92c7-be198abaed74))
(pad "16" smd rect (at 0.75 -2.7625 90) (size 0.325 0.25) (layers "F.Cu" "F.Paste" "F.Mask") (tstamp 321b34a6-9c1f-4bb2-8117-95b5b15beb62))
)

View File

@ -0,0 +1,20 @@
(footprint "SW_Push_4mm_2mm" (version 20211014) (generator pcbnew)
(layer "F.Cu")
(tedit 0)
(attr smd)
(fp_text reference "REF**" (at 0 -2.54 unlocked) (layer "F.SilkS")
(effects (font (size 1 1) (thickness 0.15)))
(tstamp adcc9cdb-5916-4938-af20-6ee1eab67f92)
)
(fp_text value "SW_Push_4mm_2mm" (at 0 5.08 unlocked) (layer "F.Fab")
(effects (font (size 1 1) (thickness 0.15)))
(tstamp e3ab55c9-7769-4dfa-a9dc-7e2b70b64d01)
)
(fp_text user "${REFERENCE}" (at 0 2.5 unlocked) (layer "F.Fab")
(effects (font (size 1 1) (thickness 0.15)))
(tstamp 6596efb2-b6f1-4761-9d4a-e4afca30b618)
)
(fp_rect (start -1 -1.5) (end 1 1.5) (layer "F.SilkS") (width 0.12) (fill none) (tstamp 2a1a52bd-a677-4aaa-8a9e-952ca9ad1dc0))
(pad "1" smd rect (at -1.75 0) (size 1.2 1.5) (layers "F.Cu" "F.Paste" "F.Mask") (tstamp 9343715e-22e9-4cd5-b498-e4bae5458c6d))
(pad "2" smd rect (at 1.75 0) (size 1.2 1.5) (layers "F.Cu" "F.Paste" "F.Mask") (tstamp 454e1b27-9197-407b-904f-95f4e27f7d65))
)

View File

@ -0,0 +1,140 @@
(footprint "XDCR_BMA456" (version 20211014) (generator pcbnew)
(layer "F.Cu")
(tedit 63C5BEED)
(attr through_hole)
(fp_text reference "REF**" (at 0.016 -1.5032) (layer "F.SilkS")
(effects (font (size 0.32 0.32) (thickness 0.15)))
(tstamp f8b38438-e0c8-4ac2-a774-579caa446ca4)
)
(fp_text value "XDCR_BMA456" (at 1.2352 1.5468) (layer "F.Fab")
(effects (font (size 0.32 0.32) (thickness 0.15)))
(tstamp d666ea1e-e70f-481d-94f5-b0c911d8c299)
)
(fp_circle (center -1.5 -0.75) (end -1.45 -0.75) (layer "F.SilkS") (width 0.1) (fill none) (tstamp aaa9f930-0540-4ce5-a3fd-e9f1b773085b))
(fp_poly (pts
(xy 0.55 0.55)
(xy 1 0.55)
(xy 1 0.95)
(xy 0.55 0.95)
) (layer "F.Mask") (width 0.01) (fill solid) (tstamp 4c807739-d9a1-4040-b150-228ecb63dbe2))
(fp_poly (pts
(xy 0.55 0.05)
(xy 1 0.05)
(xy 1 0.45)
(xy 0.55 0.45)
) (layer "F.Mask") (width 0.01) (fill solid) (tstamp 544ab3f1-893c-4d97-b8f2-c4ec70f85295))
(fp_poly (pts
(xy 0.55 -0.95)
(xy 1 -0.95)
(xy 1 -0.55)
(xy 0.55 -0.55)
) (layer "F.Mask") (width 0.01) (fill solid) (tstamp 803a19f6-caa7-45f4-a506-117c7ef486c9))
(fp_poly (pts
(xy 0.075 0.6)
(xy 0.425 0.6)
(xy 0.425 1)
(xy 0.075 1)
) (layer "F.Mask") (width 0.01) (fill solid) (tstamp 881c1f4f-b79c-4106-b221-7375a1ba093c))
(fp_poly (pts
(xy -0.425 0.6)
(xy -0.075 0.6)
(xy -0.075 1)
(xy -0.425 1)
) (layer "F.Mask") (width 0.01) (fill solid) (tstamp 890646dd-a4b5-48db-8604-f63038fcb837))
(fp_poly (pts
(xy 0.55 -0.45)
(xy 1 -0.45)
(xy 1 -0.05)
(xy 0.55 -0.05)
) (layer "F.Mask") (width 0.01) (fill solid) (tstamp 91a44037-ccd7-4183-9740-b4de5fd4c30a))
(fp_poly (pts
(xy -1 0.55)
(xy -0.55 0.55)
(xy -0.55 0.95)
(xy -1 0.95)
) (layer "F.Mask") (width 0.01) (fill solid) (tstamp 9edb6839-d2e8-44ec-abf7-65b516c79b86))
(fp_poly (pts
(xy -1 -0.95)
(xy -0.55 -0.95)
(xy -0.55 -0.55)
(xy -1 -0.55)
) (layer "F.Mask") (width 0.01) (fill solid) (tstamp b7bcea48-0cf5-49b5-9f55-ad9c29fbb6c4))
(fp_poly (pts
(xy -1 0.05)
(xy -0.55 0.05)
(xy -0.55 0.45)
(xy -1 0.45)
) (layer "F.Mask") (width 0.01) (fill solid) (tstamp cf2d8377-fe74-49d6-9eb5-3439fa3ce79c))
(fp_poly (pts
(xy -0.425 -1)
(xy -0.075 -1)
(xy -0.075 -0.6)
(xy -0.425 -0.6)
) (layer "F.Mask") (width 0.01) (fill solid) (tstamp cf91f6eb-d928-43c9-bb16-815b097be98c))
(fp_poly (pts
(xy 0.075 -1)
(xy 0.425 -1)
(xy 0.425 -0.6)
(xy 0.075 -0.6)
) (layer "F.Mask") (width 0.01) (fill solid) (tstamp d08033f8-358a-4ffd-8279-bb7413762864))
(fp_poly (pts
(xy -1 -0.45)
(xy -0.55 -0.45)
(xy -0.55 -0.05)
(xy -1 -0.05)
) (layer "F.Mask") (width 0.01) (fill solid) (tstamp f4332b8b-eaf9-4d86-bf48-5fb75f87384c))
(fp_line (start -1.25 -1.25) (end 1.25 -1.25) (layer "F.CrtYd") (width 0.05) (tstamp 9195bca8-03db-492a-81c5-3d3002278bd7))
(fp_line (start -1.25 1.25) (end -1.25 -1.25) (layer "F.CrtYd") (width 0.05) (tstamp 9a300b06-d384-48af-bb39-aafd1eb10894))
(fp_line (start 1.25 -1.25) (end 1.25 1.25) (layer "F.CrtYd") (width 0.05) (tstamp bda893db-20f1-4efb-9651-b138c03aca12))
(fp_line (start 1.25 1.25) (end -1.25 1.25) (layer "F.CrtYd") (width 0.05) (tstamp d1957bd5-76fb-4211-861f-4b49415134ed))
(fp_line (start -1 1) (end -1 -1) (layer "F.Fab") (width 0.127) (tstamp 039a27ae-6750-4159-a665-07bdc308dcfc))
(fp_line (start -1 -1) (end 1 -1) (layer "F.Fab") (width 0.127) (tstamp 2d372776-c9d8-48df-bbc0-4ea34faf438d))
(fp_line (start 1 1) (end -1 1) (layer "F.Fab") (width 0.127) (tstamp 50a1e710-b229-41e6-b9e0-2272da4f3b62))
(fp_line (start 1 -1) (end 1 1) (layer "F.Fab") (width 0.127) (tstamp f002c72e-e994-4180-81ab-80d4d51cd342))
(fp_circle (center -1.5 -0.75) (end -1.45 -0.75) (layer "F.Fab") (width 0.1) (fill none) (tstamp da91aa4d-fba8-4b16-93cc-b1a3966b3aee))
(pad "1" smd rect (at -0.775 -0.75) (size 0.35 0.3) (layers "F.Cu" "F.Paste") (tstamp a5f58443-f313-496c-9bea-eb0f69539295))
(pad "2" smd rect (at -0.775 -0.25) (size 0.35 0.3) (layers "F.Cu" "F.Paste") (tstamp f6f20467-cf34-4b31-9c60-1f8bef6e567b))
(pad "3" smd rect (at -0.775 0.25) (size 0.35 0.3) (layers "F.Cu" "F.Paste") (tstamp 971b87a6-9156-40d4-b859-50af19fbdb99))
(pad "4" smd rect (at -0.775 0.75) (size 0.35 0.3) (layers "F.Cu" "F.Paste") (tstamp 6ec18a9e-840d-4f28-93ab-22a3671d5219))
(pad "5" smd rect (at -0.25 0.8 270) (size 0.3 0.25) (layers "F.Cu" "F.Paste") (tstamp 0df174b3-af1f-45c1-8375-e7f40a9d9d4a))
(pad "6" smd rect (at 0.25 0.8 270) (size 0.3 0.25) (layers "F.Cu" "F.Paste") (tstamp 485becc9-0153-42dd-b648-d602f784e290))
(pad "7" smd rect (at 0.775 0.75 180) (size 0.35 0.3) (layers "F.Cu" "F.Paste") (tstamp 781438dc-7376-4b40-9453-c4037d4f715d))
(pad "8" smd rect (at 0.775 0.25 180) (size 0.35 0.3) (layers "F.Cu" "F.Paste") (tstamp 40fe0490-0104-4794-b49b-660f3155e597))
(pad "9" smd rect (at 0.775 -0.25 180) (size 0.35 0.3) (layers "F.Cu" "F.Paste") (tstamp 3425143c-8e82-45fb-95c1-7dcc079d4290))
(pad "10" smd rect (at 0.775 -0.75 180) (size 0.35 0.3) (layers "F.Cu" "F.Paste") (tstamp 3ba35676-21f8-4c3e-8b3f-ab8b6eec741d))
(pad "11" smd rect (at 0.25 -0.8 90) (size 0.3 0.25) (layers "F.Cu" "F.Paste") (tstamp d21f229b-e133-4843-84cd-2af63140d497))
(pad "12" smd rect (at -0.25 -0.8 90) (size 0.3 0.25) (layers "F.Cu" "F.Paste") (tstamp c4e1852b-577d-4be7-a164-3314d7fcbda2))
(zone (net 0) (net_name "") (layers *.Cu) (tstamp 331cbbf2-c2e9-4cbb-a06e-9c8a61ad2a15) (hatch full 0.508)
(connect_pads (clearance 0))
(min_thickness 0.01)
(keepout (tracks allowed) (vias not_allowed) (pads allowed) (copperpour allowed) (footprints allowed))
(fill (thermal_gap 0.508) (thermal_bridge_width 0.508))
(polygon
(pts
(xy -0.375 -0.4)
(xy 0.375 -0.4)
(xy 0.375 0.4)
(xy -0.375 0.4)
)
)
)
(zone (net 0) (net_name "") (layer "F.Cu") (tstamp 7e67544a-c4d5-4585-bc50-4535d85ff3be) (hatch full 0.508)
(connect_pads (clearance 0))
(min_thickness 0.01)
(keepout (tracks not_allowed) (vias not_allowed) (pads not_allowed) (copperpour not_allowed) (footprints allowed))
(fill (thermal_gap 0.508) (thermal_bridge_width 0.508))
(polygon
(pts
(xy -0.375 -0.4)
(xy 0.375 -0.4)
(xy 0.375 0.4)
(xy -0.375 0.4)
)
)
)
(model "${KIPRJMOD}/ICs.pretty/BMA456.step"
(offset (xyz 0 0 0))
(scale (xyz 1 1 1))
(rotate (xyz -90 0 0))
)
)

View File

@ -1,6 +1,6 @@
{ {
"board": { "board": {
"active_layer": 0, "active_layer": 44,
"active_layer_preset": "All Layers", "active_layer_preset": "All Layers",
"auto_track_width": true, "auto_track_width": true,
"hidden_nets": [], "hidden_nets": [],

View File

@ -2,26 +2,120 @@
"board": { "board": {
"design_settings": { "design_settings": {
"defaults": { "defaults": {
"board_outline_line_width": 0.1, "board_outline_line_width": 0.09999999999999999,
"copper_line_width": 0.2, "copper_line_width": 0.19999999999999998,
"copper_text_italic": false,
"copper_text_size_h": 1.5, "copper_text_size_h": 1.5,
"copper_text_size_v": 1.5, "copper_text_size_v": 1.5,
"copper_text_thickness": 0.3, "copper_text_thickness": 0.3,
"copper_text_upright": false,
"courtyard_line_width": 0.049999999999999996,
"dimension_precision": 4,
"dimension_units": 3,
"dimensions": {
"arrow_length": 1270000,
"extension_offset": 500000,
"keep_text_aligned": true,
"suppress_zeroes": false,
"text_position": 0,
"units_format": 1
},
"fab_line_width": 0.09999999999999999,
"fab_text_italic": false,
"fab_text_size_h": 1.0,
"fab_text_size_v": 1.0,
"fab_text_thickness": 0.15,
"fab_text_upright": false,
"other_line_width": 0.15, "other_line_width": 0.15,
"other_text_italic": false,
"other_text_size_h": 1.0,
"other_text_size_v": 1.0,
"other_text_thickness": 0.15,
"other_text_upright": false,
"pads": {
"drill": 0.762,
"height": 1.524,
"width": 1.524
},
"silk_line_width": 0.15, "silk_line_width": 0.15,
"silk_text_italic": false,
"silk_text_size_h": 1.0, "silk_text_size_h": 1.0,
"silk_text_size_v": 1.0, "silk_text_size_v": 1.0,
"silk_text_thickness": 0.15 "silk_text_thickness": 0.15,
"silk_text_upright": false,
"zones": {
"45_degree_only": false,
"min_clearance": 0.0
}
}, },
"diff_pair_dimensions": [], "diff_pair_dimensions": [],
"drc_exclusions": [], "drc_exclusions": [],
"meta": {
"version": 2
},
"rule_severities": {
"annular_width": "error",
"clearance": "error",
"copper_edge_clearance": "error",
"courtyards_overlap": "error",
"diff_pair_gap_out_of_range": "error",
"diff_pair_uncoupled_length_too_long": "error",
"drill_out_of_range": "error",
"duplicate_footprints": "warning",
"extra_footprint": "warning",
"footprint_type_mismatch": "error",
"hole_clearance": "error",
"hole_near_hole": "error",
"invalid_outline": "error",
"item_on_disabled_layer": "error",
"items_not_allowed": "error",
"length_out_of_range": "error",
"malformed_courtyard": "error",
"microvia_drill_out_of_range": "error",
"missing_courtyard": "ignore",
"missing_footprint": "warning",
"net_conflict": "warning",
"npth_inside_courtyard": "ignore",
"padstack": "error",
"pth_inside_courtyard": "ignore",
"shorting_items": "error",
"silk_over_copper": "warning",
"silk_overlap": "warning",
"skew_out_of_range": "error",
"through_hole_pad_without_hole": "error",
"too_many_vias": "error",
"track_dangling": "warning",
"track_width": "error",
"tracks_crossing": "error",
"unconnected_items": "error",
"unresolved_variable": "error",
"via_dangling": "warning",
"zone_has_empty_net": "error",
"zones_intersect": "error"
},
"rules": { "rules": {
"allow_blind_buried_vias": false,
"allow_microvias": false,
"max_error": 0.005,
"min_clearance": 0.0,
"min_copper_edge_clearance": 0.0, "min_copper_edge_clearance": 0.0,
"min_hole_clearance": 0.25,
"min_hole_to_hole": 0.25,
"min_microvia_diameter": 0.19999999999999998,
"min_microvia_drill": 0.09999999999999999,
"min_silk_clearance": 0.0,
"min_through_hole_diameter": 0.3,
"min_track_width": 0.19999999999999998,
"min_via_annular_width": 0.049999999999999996,
"min_via_diameter": 0.39999999999999997,
"solder_mask_clearance": 0.0, "solder_mask_clearance": 0.0,
"solder_mask_min_width": 0.0 "solder_mask_min_width": 0.0,
"use_height_for_length_calcs": true
}, },
"track_widths": [], "track_widths": [],
"via_dimensions": [] "via_dimensions": [],
"zones_allow_external_fillets": false,
"zones_use_no_outline": true
}, },
"layer_presets": [] "layer_presets": []
}, },

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

Binary file not shown.

View File

@ -45,7 +45,7 @@
#define LCD_DATA_COMMAND WM_IO_PB_08 #define LCD_DATA_COMMAND WM_IO_PB_08
#define LCD_RESET WM_IO_PB_09 #define LCD_RESET WM_IO_PB_09
#define LCD_PWM_BACKLIGHT WM_IO_PA_07 #define LCD_PWM_BACKLIGHT WM_IO_PA_07
#define LCD_PWM_CHANNEL 4 #define LCD_PWM_CHANNEL (4)
/** /**
* @brief lcd touch panel * @brief lcd touch panel
@ -75,6 +75,7 @@
* @brief vibration motor control pin * @brief vibration motor control pin
* *
*/ */
#define VIBRATION_MOTOR_ENABLE WM_IO_PB_03 #define VIBRATION_MOTOR_ENABLE WM_IO_PB_00
#define VIBRATION_MOTOR_PWM_CHANNEL (0)
#endif //APPCONFIG_H #endif //APPCONFIG_H

View File

@ -1,4 +1,7 @@
#include "i2c.h" #include "i2c.h"
#include "wm_gpio.h"
#include "FreeRTOS.h"
#include "app_log.h"
#include "CST816D.h" #include "CST816D.h"
bool CST816D_read_touch_event(CST816D_Touch_Data_t * const touch_data) bool CST816D_read_touch_event(CST816D_Touch_Data_t * const touch_data)
@ -22,3 +25,20 @@ bool CST816D_read_touch_event(CST816D_Touch_Data_t * const touch_data)
touch_data->isValid = false; touch_data->isValid = false;
return false; return false;
} }
bool CST816D_set_power_mode(void)
{
tls_gpio_cfg(WM_IO_PA_00, WM_GPIO_DIR_OUTPUT, WM_GPIO_ATTR_FLOATING);
tls_gpio_write(WM_IO_PA_00, 0);
tls_os_time_delay(pdMS_TO_TICKS(5));
tls_gpio_write(WM_IO_PA_00, 1);
tls_os_time_delay(pdMS_TO_TICKS(50));
uint8_t data;
i2c_read_reg(CST816D_I2C_ADDR, 0xA5, &data);
i2c_write_reg(CST816D_I2C_ADDR, 0xA5, 0x03);
APP_LOG_DEBUG("CST 0xA5 : %u", data);
}

View File

@ -56,4 +56,6 @@ typedef struct CST816D_Touch_Data
*/ */
bool CST816D_read_touch_event(CST816D_Touch_Data_t * const touch_data); bool CST816D_read_touch_event(CST816D_Touch_Data_t * const touch_data);
bool CST816D_set_power_mode(void);
#endif //CST816D_H #endif //CST816D_H

View File

@ -222,6 +222,7 @@ void lcd_config_init(LCDConfig_t * const LCDConfig)
LCDConfig->LCDChipSelectPin = -1; LCDConfig->LCDChipSelectPin = -1;
LCDConfig->LCDDataCommandPin = -1; LCDConfig->LCDDataCommandPin = -1;
LCDConfig->LCDResetPin = -1; LCDConfig->LCDResetPin = -1;
LCDConfig->LCDOrientation = LCD_ORIENTATION_DEFAULT;
} }
@ -415,6 +416,41 @@ void lcd_sleep(LCDConfig_t *const LCDConfig, bool state)
lcd_set_data_command(LCDConfig, LCD_DATA); lcd_set_data_command(LCDConfig, LCD_DATA);
} }
void lcd_orientation(LCDConfig_t *const LCDConfig, LCDOrientation_t orientation)
{
if(!LCDConfig) return;
//No need to apply the same config again
if(orientation == LCDConfig->LCDOrientation || orientation > LCD_ORIENTATION_270) return;
lcd_set_data_command(LCDConfig, LCD_COMMAND);
lcd_set_cs(LCDConfig, LCD_SELECTED);
mmc_sdio_driver_write_one(0x36);
lcd_set_data_command(LCDConfig, LCD_DATA);
LCDConfig->LCDOrientation = orientation;
switch(orientation)
{
case LCD_ORIENTATION_90:
mmc_sdio_driver_write_one(0xE8);
break;
case LCD_ORIENTATION_180:
mmc_sdio_driver_write_one(0x48);
break;
case LCD_ORIENTATION_270:
mmc_sdio_driver_write_one(0x28);
break;
default: //Is default orientation eg : 0
mmc_sdio_driver_write_one(0x88);
}
lcd_set_cs(LCDConfig, LCD_RELEASED);
lcd_set_data_command(LCDConfig, LCD_DATA);
}
static void lcd_write_cmd_data_bytes(LCDConfig_t * const LCDConfig, const uint8_t *cmdAndData, uint32_t dataLengthInBytes) static void lcd_write_cmd_data_bytes(LCDConfig_t * const LCDConfig, const uint8_t *cmdAndData, uint32_t dataLengthInBytes)
{ {
// Select the slave CS line and tell him that he will receive a command ! // Select the slave CS line and tell him that he will receive a command !

View File

@ -35,6 +35,19 @@ typedef enum LCDSelect
*/ */
typedef void (*DrawFinishedCb_t)(void *arg); typedef void (*DrawFinishedCb_t)(void *arg);
/**
* @brief
*
*/
typedef enum LCDOrientation
{
LCD_ORIENTATION_0 = 0,
LCD_ORIENTATION_DEFAULT = LCD_ORIENTATION_0,
LCD_ORIENTATION_90,
LCD_ORIENTATION_180,
LCD_ORIENTATION_270,
} LCDOrientation_t;
/** /**
* @brief * @brief
* *
@ -49,6 +62,7 @@ typedef struct LCDConfig
enum tls_io_name LCDResetPin; enum tls_io_name LCDResetPin;
DrawFinishedCb_t drawFinishedCb; DrawFinishedCb_t drawFinishedCb;
void *cbArg; void *cbArg;
LCDOrientation_t LCDOrientation;
} LCDConfig_t; } LCDConfig_t;
/** /**
@ -121,4 +135,12 @@ void lcd_on(LCDConfig_t * const LCDConfig, bool state);
*/ */
void lcd_sleep(LCDConfig_t * const LCDConfig, bool state); void lcd_sleep(LCDConfig_t * const LCDConfig, bool state);
/**
* @brief Sets the LCD orientation.
*
* @param LCDConfig a pointer a user allocated LCDConfig_t structure
* @param orientation the value of the orientation to set
*/
void lcd_orientation(LCDConfig_t * const LCDConfig, LCDOrientation_t orientation);
#endif //LCD_H #endif //LCD_H

View File

@ -14,7 +14,7 @@ static void vibration_motor_timer_irq_cb(void *p)
{ {
(void)p; (void)p;
//tls_gpio_write(VIBRATION_MOTOR_ENABLE, 0); //tls_gpio_write(VIBRATION_MOTOR_ENABLE, 0);
tls_pwm_stop(3); tls_pwm_stop(VIBRATION_MOTOR_PWM_CHANNEL);
tls_gpio_cfg(VIBRATION_MOTOR_ENABLE, WM_GPIO_DIR_OUTPUT, WM_GPIO_ATTR_FLOATING); tls_gpio_cfg(VIBRATION_MOTOR_ENABLE, WM_GPIO_DIR_OUTPUT, WM_GPIO_ATTR_FLOATING);
tls_gpio_write(VIBRATION_MOTOR_ENABLE, 0); tls_gpio_write(VIBRATION_MOTOR_ENABLE, 0);
APP_LOG_DEBUG("Vibration stopped"); APP_LOG_DEBUG("Vibration stopped");
@ -69,9 +69,8 @@ void watch_peripherals_vibrate(uint8_t strength, uint32_t durationMs)
APP_LOG_DEBUG("Vibration started"); APP_LOG_DEBUG("Vibration started");
/* We start the timer which will stop the vibration after durationMs time */ /* We start the timer which will stop the vibration after durationMs time */
tls_timer_change(_vibration_motor_timer_id, durationMs); tls_timer_change(_vibration_motor_timer_id, durationMs);
//tls_gpio_write(VIBRATION_MOTOR_ENABLE, 1); wm_pwm0_config(VIBRATION_MOTOR_ENABLE);
wm_pwm3_config(VIBRATION_MOTOR_ENABLE); tls_pwm_init(VIBRATION_MOTOR_PWM_CHANNEL, 10000, 0, 0);
tls_pwm_init(3, 10000, 0, 0); tls_pwm_duty_set(VIBRATION_MOTOR_PWM_CHANNEL, strength);
tls_pwm_duty_set(3, strength);
tls_timer_start(_vibration_motor_timer_id); tls_timer_start(_vibration_motor_timer_id);
} }

View File

@ -80,11 +80,21 @@ static void setTimeoutCb(uint8_t timeout)
persistency_get_settings()->display.sleep_timeout = timeout; persistency_get_settings()->display.sleep_timeout = timeout;
} }
static void setOrientationCb(uint8_t orientation)
{
extern LCDConfig_t LCDConfig;
lcd_orientation(&LCDConfig, orientation);
persistency_get_settings()->display.orientation = orientation;
// Forces to redraw the full screen to avoid strange artifact
lv_obj_invalidate(lv_scr_act());
}
SettingsScreenAPIInterface_t settingsScreenAPIInterface = SettingsScreenAPIInterface_t settingsScreenAPIInterface =
{ {
.setBrightnessSettingsCb = setBrightnessCb, .setBrightnessSettingsCb = setBrightnessCb,
.setTimeSettingsCb = setTimeCb, .setTimeSettingsCb = setTimeCb,
.setTimeoutSettingsCb = setTimeoutCb, .setTimeoutSettingsCb = setTimeoutCb,
.setOrientationSettingsCb = setOrientationCb,
}; };
static uint16_t angle_with_offset(uint16_t angle, uint16_t offset) static uint16_t angle_with_offset(uint16_t angle, uint16_t offset)
@ -302,6 +312,7 @@ void gfx_task(void *param)
//lcd_on(&LCDConfig, false); //lcd_on(&LCDConfig, false);
lcd_sleep(&LCDConfig, true); lcd_sleep(&LCDConfig, true);
QMC5883L_set_power_mode(Standby); QMC5883L_set_power_mode(Standby);
CST816D_set_power_mode();
// Let's sleep // Let's sleep
tls_pmu_sleep_start(); tls_pmu_sleep_start();
// On wake up, we force the watch face to sync up with the rtc /!\ RTC update delay WTF ? // On wake up, we force the watch face to sync up with the rtc /!\ RTC update delay WTF ?
@ -313,5 +324,27 @@ void gfx_task(void *param)
lcd_sleep(&LCDConfig, false); lcd_sleep(&LCDConfig, false);
setBrightness(persistency_get_settings()->display.brightness); setBrightness(persistency_get_settings()->display.brightness);
} }
/* Throttle CPU freq down when inactive to save power or to increase responsiveness */
tls_sys_clk clk;
tls_sys_clk_get(&clk);
if(lv_disp_get_inactive_time(NULL) > 5000)
{
if(clk.cpuclk != 40)
{
tls_sys_clk_set(CPU_CLK_40M);
APP_LOG_DEBUG("CPU 40Mhz");
}
}
else
{
if(clk.cpuclk != 160)
{
tls_sys_clk_set(CPU_CLK_160M);
APP_LOG_DEBUG("CPU 160Mhz");
}
}
} }
} }

View File

@ -6,13 +6,12 @@
static const char *day_options = "01\n02\n03\n04\n05\n06\n07\n08\n09\n10\n11\n12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23\n24\n25\n26\n27\n28\n29\n30\n31"; static const char *day_options = "01\n02\n03\n04\n05\n06\n07\n08\n09\n10\n11\n12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23\n24\n25\n26\n27\n28\n29\n30\n31";
static const char *month_options = "01\n02\n03\n04\n05\n06\n07\n08\n09\n10\n11\n12"; static const char *month_options = "01\n02\n03\n04\n05\n06\n07\n08\n09\n10\n11\n12";
static const char *year_options = "22\n23\n24\n25\n26\n27\n28\n29\n30"; static const char *year_options = "22\n23\n24\n25\n26\n27\n28\n29\n30";
static const char *hour_options = "00\n01\n02\n03\n04\n05\n06\n07\n08\n09\n10\n11\n12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23"; static const char *hour_options = "00\n01\n02\n03\n04\n05\n06\n07\n08\n09\n10\n11\n12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23";
static const char *second_minute_options = "00\n01\n02\n03\n04\n05\n06\n07\n08\n09\n10\n11\n12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23\n24\n25\n26\n27\n28\n29\n30\n31\n32\n33\n34\n35\n36\n37\n38\n39\n40\n41\n42\n43\n44\n45\n46\n47\n48\n49\n50\n51\n52\n53\n54\n55\n56\n57\n58\n59"; static const char *second_minute_options = "00\n01\n02\n03\n04\n05\n06\n07\n08\n09\n10\n11\n12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23\n24\n25\n26\n27\n28\n29\n30\n31\n32\n33\n34\n35\n36\n37\n38\n39\n40\n41\n42\n43\n44\n45\n46\n47\n48\n49\n50\n51\n52\n53\n54\n55\n56\n57\n58\n59";
static const char *date_format = "dd/mm/yyyy\ndd/mm/yy\nyyyy/mm/dd\nyy/mm/dd";
static const char *timeout_options = "0\n5\n10\n15\n20\n25\n30\n35\n40\n45\n50\n55\n60"; static const char *timeout_options = "0\n5\n10\n15\n20\n25\n30\n35\n40\n45\n50\n55\n60";
static const char *orientation_format = "Default\n90°\n180°\n270°";
const char *date_format = "dd/mm/yyyy\ndd/mm/yy\nyyyy/mm/dd\nyy/mm/dd";
static void gesture_event_cb(lv_event_t * e) static void gesture_event_cb(lv_event_t * e)
{ {
@ -106,6 +105,18 @@ static void timeout_roller_cb(lv_event_t * e)
settingsScreen->settingsScreenAPIInterface.setTimeoutSettingsCb(timeout); settingsScreen->settingsScreenAPIInterface.setTimeoutSettingsCb(timeout);
} }
static void orientation_dropdown_cb(lv_event_t * e)
{
SettingsScreen_t *settingsScreen = e->user_data;
if(!settingsScreen->settingsScreenAPIInterface.setOrientationSettingsCb) return;
lv_obj_t *dropdown = lv_event_get_target(e);
uint8_t orientation = lv_dropdown_get_selected(dropdown);
settingsScreen->settingsScreenAPIInterface.setOrientationSettingsCb(orientation);
}
static lv_obj_t* add_sidebar_entry_to_menu(lv_obj_t *parent, const char *title, lv_obj_t *menu, lv_obj_t *pageToShow) static lv_obj_t* add_sidebar_entry_to_menu(lv_obj_t *parent, const char *title, lv_obj_t *menu, lv_obj_t *pageToShow)
{ {
lv_obj_t *container = lv_menu_cont_create(parent); lv_obj_t *container = lv_menu_cont_create(parent);
@ -288,7 +299,6 @@ void settings_screen_create(SettingsScreen_t * const settingsScreen)
lv_obj_t *date_dropdown = lv_dropdown_create(container); lv_obj_t *date_dropdown = lv_dropdown_create(container);
lv_dropdown_set_options_static(date_dropdown, date_format); lv_dropdown_set_options_static(date_dropdown, date_format);
//We create the menu page for the display settings //We create the menu page for the display settings
lv_obj_t *menu_page_2 = lv_menu_page_create(menu, NULL); lv_obj_t *menu_page_2 = lv_menu_page_create(menu, NULL);
@ -317,6 +327,14 @@ void settings_screen_create(SettingsScreen_t * const settingsScreen)
lv_label_set_text_static(timeout_label, "Second(s)"); lv_label_set_text_static(timeout_label, "Second(s)");
lv_obj_set_style_pad_top(timeout_label, 25, LV_PART_MAIN); lv_obj_set_style_pad_top(timeout_label, 25, LV_PART_MAIN);
menu_page_label = lv_label_create(section);
lv_label_set_text_static(menu_page_label, "Orientation :");
container = create_section_container(section);
lv_obj_t *orientation_dropdown = lv_dropdown_create(container);
lv_dropdown_set_options_static(orientation_dropdown, orientation_format);
lv_obj_add_event_cb(orientation_dropdown, &(orientation_dropdown_cb), LV_EVENT_VALUE_CHANGED, settingsScreen);
//We create the side bar page //We create the side bar page
lv_obj_t *sidebar_page = lv_menu_page_create(menu, NULL); lv_obj_t *sidebar_page = lv_menu_page_create(menu, NULL);
lv_obj_t *settings_section_1 = lv_menu_section_create(sidebar_page); lv_obj_t *settings_section_1 = lv_menu_section_create(sidebar_page);

View File

@ -8,6 +8,7 @@ typedef struct SettingsScreenAPIInterface
void (*setBrightnessSettingsCb)(uint8_t brightness); void (*setBrightnessSettingsCb)(uint8_t brightness);
void (*setTimeSettingsCb)(uint8_t hour, uint8_t minute, uint8_t second, uint8_t day, uint8_t month, uint8_t year); void (*setTimeSettingsCb)(uint8_t hour, uint8_t minute, uint8_t second, uint8_t day, uint8_t month, uint8_t year);
void (*setTimeoutSettingsCb)(uint8_t timeout); void (*setTimeoutSettingsCb)(uint8_t timeout);
void (*setOrientationSettingsCb)(uint8_t orientation);
} SettingsScreenAPIInterface_t; } SettingsScreenAPIInterface_t;
typedef struct SettingsScreen typedef struct SettingsScreen

View File

@ -32,14 +32,17 @@ void user_task_main(void *param)
TickType_t time_ref = tls_os_get_time(); TickType_t time_ref = tls_os_get_time();
for(;;) for(;;)
{ {
tls_sys_clk clk;
tls_sys_clk_get(&clk);
char *buf = tls_mem_alloc(800); char *buf = tls_mem_alloc(800);
if(buf) if(buf)
{ {
UBaseType_t writtenSize = vTaskList((char *)buf, 800); UBaseType_t writtenSize = vTaskList((char *)buf, 800);
APP_LOG_INFO("Available RAM (bytes)/Total RAM (bytes) : %u/%u"NEW_LINE"Reset reason : %d"NEW_LINE"Tasks (%lu) :"NEW_LINE, APP_LOG_INFO("Available RAM (bytes)/Total RAM (bytes) : %u/%u"NEW_LINE"Reset reason : %d"NEW_LINE"Clk : apb(%u), cpu(%u), wlan(%u)"NEW_LINE"Tasks (%lu) :"NEW_LINE,
tls_mem_get_avail_heapsize(), tls_mem_get_avail_heapsize(),
total_mem_size, total_mem_size,
tls_sys_get_reboot_reason(), tls_sys_get_reboot_reason(),
clk.apbclk, clk.cpuclk, clk.wlanclk,
writtenSize); writtenSize);
printf("\n%s", buf); printf("\n%s", buf);
tls_mem_free(buf); tls_mem_free(buf);

View File

@ -3,7 +3,7 @@
/* WatchSetting object with default values */ /* WatchSetting object with default values */
static WatchSettings_t watchSettings = static WatchSettings_t watchSettings =
{ {
.timeAndDate = {.config = 0}, .timeAndDate = {.hour_format = 0, .date_format = 0, .automatic_time_and_date = 0},
.display = {.brightness = 255, .sleep_timeout = 0,}, .display = {.brightness = 255, .sleep_timeout = 0,},
}; };

View File

@ -3,14 +3,12 @@
#include "wm_type_def.h" #include "wm_type_def.h"
#define HOUR_FORMAT(X) ((X) & 0x01)
#define DATE_FORMAT(X) (((X) & 0x0E) >> 1)
#define AUTOMATIC_TIME_AND_DATE(X) (((X) & 0x10) >> 4)
/* Time and Date Settings */ /* Time and Date Settings */
typedef struct TimeAndDate typedef struct TimeAndDate
{ {
uint32_t config; uint32_t hour_format:1;
uint32_t date_format:2;
uint32_t automatic_time_and_date:1;
} TimeAndDate_t; } TimeAndDate_t;
/* Display Settings */ /* Display Settings */
@ -18,6 +16,7 @@ typedef struct Display
{ {
uint8_t brightness; uint8_t brightness;
uint8_t sleep_timeout; uint8_t sleep_timeout;
uint8_t orientation:2;
} Display_t; } Display_t;
/* Connectivity Settings */ /* Connectivity Settings */

View File

@ -12,6 +12,7 @@
#include "lv_port_indev.h" #include "lv_port_indev.h"
#include "wm_gpio.h" #include "wm_gpio.h"
#include "app_config.h" #include "app_config.h"
#include "lcd.h"
#include "CST816D.h" #include "CST816D.h"
#include "watch_peripherals.h" #include "watch_peripherals.h"
@ -115,6 +116,7 @@ void lv_port_indev_init(void)
static void touchpad_read(lv_indev_drv_t * indev_drv, lv_indev_data_t * data) static void touchpad_read(lv_indev_drv_t * indev_drv, lv_indev_data_t * data)
{ {
extern LCDConfig_t LCDConfig;
static lv_coord_t last_x = 0; static lv_coord_t last_x = 0;
static lv_coord_t last_y = 0; static lv_coord_t last_y = 0;
@ -130,9 +132,26 @@ static void touchpad_read(lv_indev_drv_t * indev_drv, lv_indev_data_t * data)
data->state = LV_INDEV_STATE_REL; data->state = LV_INDEV_STATE_REL;
} }
// Set the last pressed coordinates // Set the last pressed coordinates taking into account the current display orientation
switch(LCDConfig.LCDOrientation)
{
case LCD_ORIENTATION_90:
data->point.x = 239-last_y;
data->point.y = last_x;
break;
case LCD_ORIENTATION_180:
data->point.x = last_x;
data->point.y = last_y;
break;
case LCD_ORIENTATION_270:
data->point.x = last_y;
data->point.y = 239-last_x;
break;
default:
data->point.x = 239-last_x; data->point.x = 239-last_x;
data->point.y = 239-last_y; data->point.y = 239-last_y;
break;
}
} }
#else /*Enable this file at the top*/ #else /*Enable this file at the top*/