Home | History | Annotate | Download | only in lunchbox
      1 #
      2 # Copyright (C) 2016 The Android Open Source Project
      3 #
      4 # Licensed under the Apache License, Version 2.0 (the "License");
      5 # you may not use this file except in compliance with the License.
      6 # You may obtain a copy of the License at
      7 #
      8 #      http://www.apache.org/licenses/LICENSE-2.0
      9 #
     10 # Unless required by applicable law or agreed to in writing, software
     11 # distributed under the License is distributed on an "AS IS" BASIS,
     12 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     13 # See the License for the specific language governing permissions and
     14 # limitations under the License.
     15 #
     16 
     17 #variant makefile for lunchbox
     18 
     19 ifneq ($(PLATFORM),stm32)
     20         $(error "LUNCHBOX variant cannot be build on a platform that is not stm32")
     21 endif
     22 
     23 FLAGS += -DPLATFORM_HW_TYPE=0x4C75   #'Lu' -> lunchbox
     24 FLAGS += -DDEBUG_UART_PIN=16         #GPIOB0 is debug uart at 2MBps
     25 
     26 FLAGS += -I$(VARIANT_PATH)/inc
     27 
     28 #board configuration shims
     29 SRCS_os += $(VARIANT_PATH)/src/os/i2c.c
     30 SRCS_os += $(VARIANT_PATH)/src/os/spi.c
     31 #keys
     32 
     33 SRCS_os += \
     34     os/algos/calibration/magnetometer/mag_cal/mag_cal.c \
     35     os/algos/calibration/diversity_checker/diversity_checker.c \
     36     os/algos/common/math/kasa.c \
     37     os/algos/common/math/mat.c \
     38     os/algos/common/math/quat.c \
     39     os/algos/common/math/vec.c \
     40     os/algos/fusion.c \
     41     os/algos/time_sync.c
     42 
     43 #drivers
     44 # BMI160 accel and gyro, BMM150 mag drivers
     45 FLAGS += -DUSE_BMM150 -DMAG_SLAVE_PRESENT
     46 SRCS_os += \
     47     os/drivers/bosch_bmi160/bosch_bmi160.c \
     48     os/drivers/bosch_bmi160/bosch_bmm150_slave.c
     49 
     50 # ROHM ALS/prox
     51 SRCS_os += os/drivers/rohm_rpr0521/rohm_rpr0521.c
     52 
     53 # Orientation sensor driver
     54 SRCS_os += os/drivers/orientation/orientation.c
     55 
     56 # Window orientation sensor driver
     57 SRCS_os += os/drivers/window_orientation/window_orientation.c
     58 
     59 # Bosch BMP280 Barometer/Temperature
     60 SRCS_os += os/drivers/bosch_bmp280/bosch_bmp280.c
     61 
     62 # Hall effect sensor driver
     63 SRCS_os += os/drivers/hall/hall.c
     64 
     65 # Camera Vsync driver
     66 SRCS_os += os/drivers/vsync/vsync.c
     67 
     68 # Tilt detection
     69 SRCS_os += os/drivers/tilt_detection/tilt_detection.c
     70 
     71 $(info included LUNCHBOX variant)
     72