;PlatformIO Project Configuration File
;
;   Build options: build flags, source filter
;   Upload options: custom upload port, speed and extra flags
;   Library options: dependencies, extra library storages
;   Advanced options: extra scripting
;
; Please visit documentation for the other options and examples
; https://docs.platformio.org/page/projectconf.html

[platformio]
; !LedDriver
; src_dir = examples/AW9364_LedDriver

; !Fuel gauge
; src_dir = examples/BQ27220_GaugeExample

; !Haptic Driver
; src_dir = examples/DRV2605_Basic

; !Light Sensor
; src_dir = examples/LTR553ALS_Sensor
; src_dir = examples/CM32181_LightSensor
; src_dir = examples/CM32181_LightSensorInterrupt

; !Real-time clock
; src_dir = examples/PCF85063_AlarmByUnits
; src_dir = examples/PCF85063_ClockOutput
; src_dir = examples/PCF85063_SimpleTime

; src_dir = examples/PCF8563_AlarmByUnits
; src_dir = examples/PCF8563_ClockOutput
; src_dir = examples/PCF8563_SimpleTime
; src_dir = examples/PCF8563_TimeLib
; src_dir = examples/PCF8563_TimeSynchronization

; !IMU examples
src_dir = examples/BHI260AP_6DoF
; src_dir = examples/BHI260AP_Orientation
; src_dir = examples/BHI260AP_StepCounter
; src_dir = examples/BHI260AP_aux_BMM150
; src_dir = examples/BHI260AP_aux_BMM150_BME280
; src_dir = examples/BHI260AP_aux_BMM150_euler
; src_dir = examples/BHI260AP_aux_BMM150_quaternion
; src_dir = examples/BHI260AP_aux_BMM150_BME280_Expand_GPIO
; src_dir = examples/BHI260AP_Activity
; src_dir = examples/BHI260AP_Euler

; src_dir = examples/BHI260AP_Expand_GPIO
; src_dir = examples/BHI260AP_UpdateFirmware
; src_dir = examples/BHI260AP_Debug
; src_dir = examples/BHI260AP_Commander
; src_dir = examples/BHI260AP_Klio_RecognizeMultiple
; src_dir = examples/BHI260AP_Klio_Recognition
; src_dir = examples/BHI260AP_Klio_Selflearning


; src_dir = examples/QMI8658_BlockExample
; src_dir = examples/QMI8658_CalibrationExample
; src_dir = examples/QMI8658_GetDataExample
; src_dir = examples/QMI8658_InterruptBlockExample
; src_dir = examples/QMI8658_InterruptExample
; src_dir = examples/QMI8658_LockingMechanismExample
; src_dir = examples/QMI8658_MadgwickAHRS
; src_dir = examples/QMI8658_MotionDetectionExample
; src_dir = examples/QMI8658_PedometerExample
; src_dir = examples/QMI8658_ReadFromFifoExample
; src_dir = examples/QMI8658_TapDetectionExample
; src_dir = examples/QMI8658_WakeOnMotion
; src_dir = examples/QMI8658_WakeOnMotionCallBackExample

; !Magnetometer
; src_dir = examples/QMC6310_CalibrateExample
; src_dir = examples/QMC6310_CompassExample
; src_dir = examples/QMC6310_GetDataExample
; src_dir = examples/QMC6310_GetPolarExample

; src_dir = examples/BMM150_GetDataExample

; !Accelerometer
; src_dir = examples/BMA423_Accelerometer
; src_dir = examples/BMA423_Feature
; src_dir = examples/BMA423_Orientation
; src_dir = examples/BMA423_Temperature

; !GPIO Expansion examples
; src_dir = examples/XL9555_AdjustBacklight
; src_dir = examples/XL9555_ExtensionIOInterrupt
; src_dir = examples/XL9555_ExtensionIORead
; src_dir = examples/XL9555_ExtensionIOWrite
; src_dir = examples/XL9555_ioEvent
; src_dir = examples/XL9555_ExtensionSPI



; src_dir = examples/CustomCallbackTouchDrvInterface
; src_dir = examples/CustomCallbackUsageExamples
; src_dir = examples/SensorWireHelper

; !Touch devices support list
; src_dir = examples/TouchDrvInterface_Example
; src_dir = examples/TouchDrv_CHSC5816_GetPoint
; src_dir = examples/TouchDrv_CST9217_GetPoint
; src_dir = examples/TouchDrv_CSTxxx_GetPoint
; src_dir = examples/TouchDrv_FT6232_GetPoint
; src_dir = examples/TouchDrv_GT911_GetPoint
; src_dir = examples/TouchDrv_GT9895_GetPoint

; default_envs = esp32dev_arduino
; default_envs = esp32s3_arduino
; default_envs = esp32c3_arduino
; default_envs = rp2040_arduino
; default_envs = nrf52840_arduino
; default_envs = stm32_arduino
default_envs = pico_mbed

; src_dir =examples/mbed
; boards_dir = test/board

[env]
lib_extra_dirs = .

monitor_speed = 115200

build_flags =
    ; -DSENSOR_SDA=8
    ; -DSENSOR_SCL=9
    ; -DSENSOR_IRQ=3

    ; -DARDUINO_T_DECK
    ; -DARDUINO_T_AMOLED_191
    ; -DARDUINO_T_AMOLED_191_QWIIC
    ; -DARDUINO_T_AMOLED_241
    ; -DARDUINO_T_AMOLED_147
    ; -DARDUINO_T_DISPLAY_S3_PRO
    ; -DARDUINO_T_DISPLAY_S3
    ; -DARDUINO_T_EPD47_S3
    ; -DARDUINO_T_WATCH_S3_U
    ; -DARDUINO_T_ULTIMA
    ; -DUSE_SPI_INTERFACE=1
    ; -DLOG_PORT=Serial
    ; -DBHI260AP_PARSE_DATA_DUMP
    -Wignored-qualifiers
    -Wnarrowing
    -Wtype-limits
    ; -Werror
    -Wall
    -Wunused-variable
    -Werror=format
    -Wmissing-field-initializers
    -std=c++11

lib_deps = 
    creativerobotics/Commander @ ^4.3.0

[env:esp32dev_arduino]
extends = env
platform = espressif32@6.8.1
framework = arduino
board = esp32dev
build_flags = 
    ${env.build_flags}
    -DCORE_DEBUG_LEVEL=0

[env:esp32c3_arduino]
extends = env
platform = espressif32@6.8.1
framework = arduino
board = esp32-c3-devkitm-1
build_flags = 
    ${env.build_flags}
    -DCORE_DEBUG_LEVEL=0

[env:esp32s3_arduino]
extends = env
platform = espressif32@6.8.1
framework = arduino
board = esp32-s3-devkitm-1
build_flags = 
    ${env.build_flags}
    -DARDUINO_USB_CDC_ON_BOOT=1
    ; -UARDUINO_USB_CDC_ON_BOOT
    -DCORE_DEBUG_LEVEL=0

[env:rp2040_arduino]
extends = env
platform = raspberrypi
board = pico
framework = arduino
board_build.core = earlephilhower

[env:nrf52840_arduino]
extends = env
platform = nordicnrf52@10.6.0
board = nrf52840_dk_adafruit
framework = arduino
monitor_speed = 115200

upload_protocol = nrfutil
; upload_protocol = nrfjprog
; upload_protocol = jlink

build_flags = 
    ${env.build_flags}
    -DCFG_DEBUG=3 
    -DCFG_LOGGER=0 
    -DCFG_SYSVIEW=1

lib_deps = 
    adafruit/SdFat - Adafruit Fork @ ^2.2.3           ;BHI260AP_UpdateFirmware example use
    creativerobotics/Commander @ ^4.3.0               ;BHI260AP_aux_BMM150_BME280_Expand_GPIO example use

[env:stm32_arduino]
extends = env
platform = ststm32
framework = arduino
board = nucleo_f411re
upload_protocol = stlink

[env:pico_mbed]
extends = env
platform = raspberrypi
framework = arduino
board = pico


