Skip to content

Commit

Permalink
mfi_i2c: Added support for C2 and C6
Browse files Browse the repository at this point in the history
- Also extended CI for IDF v5.1 and chipsets ESP32C2 and ESP32C6
- H2 is not added as it is BLE+Thread (No Wi-Fi) chip
  • Loading branch information
vikramdattu committed Oct 5, 2023
1 parent 3e6955a commit f0d44e1
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 12 deletions.
12 changes: 9 additions & 3 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ stages:

variables:
GIT_SUBMODULE_STRATEGY: recursive

.build_template:
stage: build
image: espressif/idf:latest
tags:
- build

variables:
EXAMPLES: "aws-iot bridge data_tlv8 emulator fan lightbulb smart_outlet"
EXAMPLE_TARGETS: "esp32 esp32c3 esp32s3"
Expand All @@ -33,7 +33,7 @@ variables:
- chmod 600 ~/.ssh/id_rsa
- echo -e "Host gitlab.espressif.cn\n\tStrictHostKeyChecking no\n" >> ~/.ssh/config

script:
script:
- for EXAMPLE in $EXAMPLES; do
- cd $CI_PROJECT_DIR/examples/$EXAMPLE
- echo Building $EXAMPLE
Expand Down Expand Up @@ -89,3 +89,9 @@ build_idf_v5.0:
image: espressif/idf:release-v5.0
variables:
EXAMPLE_TARGETS: "esp32 esp32s2 esp32c3 esp32s3"

build_idf_v5.1:
extends: .build_template
image: espressif/idf:release-v5.1
variables:
EXAMPLE_TARGETS: "esp32 esp32s2 esp32c3 esp32s3 esp32c2 esp32c6"
21 changes: 12 additions & 9 deletions components/homekit/esp_hap_platform/src/esp_mfi_i2c.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,18 +25,21 @@
#include <stdio.h>
#include <sys/errno.h>
#include <sdkconfig.h>
#ifdef CONFIG_IDF_TARGET_ESP32S2

#if CONFIG_IDF_TARGET_ESP32
#include "esp32/rom/ets_sys.h"
#elif CONFIG_IDF_TARGET_ESP32S2
#include "esp32s2/rom/ets_sys.h"
#else
#ifdef CONFIG_IDF_TARGET_ESP32C3
#include "esp32c3/rom/ets_sys.h"
#else
#ifdef CONFIG_IDF_TARGET_ESP32S3
#elif CONFIG_IDF_TARGET_ESP32S3
#include "esp32s3/rom/ets_sys.h"
#elif CONFIG_IDF_TARGET_ESP32C3
#include "esp32c3/rom/ets_sys.h"
#elif CONFIG_IDF_TARGET_ESP32C2
#include "esp32c2/rom/ets_sys.h"
#elif CONFIG_IDF_TARGET_ESP32C6
#include "esp32c6/rom/ets_sys.h"
#else
#include "esp32/rom/ets_sys.h"
#endif
#endif
#error "please include ets_sys.h"
#endif

#ifdef CONFIG_I2C_SOFTWARE
Expand Down

0 comments on commit f0d44e1

Please sign in to comment.