diff --git a/.github/workflows/upload_component.yml b/.github/workflows/upload_component.yml new file mode 100644 index 0000000..cc1d2b3 --- /dev/null +++ b/.github/workflows/upload_component.yml @@ -0,0 +1,20 @@ +name: Push components to Espressif Component Service + +on: + push: + branches: + - master + +jobs: + upload_components: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@master + with: + submodules: 'recursive' + - name: Upload components to component service + uses: espressif/upload-components-ci-action@v1 + with: + name: "BMI270" + namespace: "espressif2022" + api_token: ${{secrets.IDF_COMPONENT_API_TOKEN}} diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..b315322 --- /dev/null +++ b/.gitignore @@ -0,0 +1,17 @@ +# vscode +.vscode/ + +# build +**/build +**/sdkconfig.old +**/sdkconfig + +# managed_components +**/managed_components + +# docs build files +docs/__pycache__ +docs/_build + +# dependencies.lock +**/dependencies.lock diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..98b43ab --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,9 @@ +# ChangeLog + +## v1.0.2 + +* Added new I2C bus. + +## v1.0.1~1 Initial Version + +* Added sensor bmi_270. diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..29d7193 --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,8 @@ +idf_component_register( + SRC_DIRS "." "./bmi270_examples/common/" + INCLUDE_DIRS "." "./bmi270_examples/" + REQUIRES "driver" +) + +include(package_manager) +cu_pkg_define_version(${CMAKE_CURRENT_LIST_DIR}) diff --git a/Kconfig b/Kconfig new file mode 100644 index 0000000..72eb701 --- /dev/null +++ b/Kconfig @@ -0,0 +1,15 @@ +menu "IMU Sensor Selection" + +choice + prompt "Select sensor type" + default SENSOR_BMI270 + + config SENSOR_BMI220 + bool "BMI220 support" + + config SENSOR_BMI270 + bool "BMI270 support" + +endchoice + +endmenu diff --git a/bmi2.c b/bmi2.c index 1e537c6..a484ce2 100644 --- a/bmi2.c +++ b/bmi2.c @@ -2097,7 +2097,7 @@ int8_t bmi2_soft_reset(struct bmi2_dev *dev) { /* Reset bmi2 device */ rslt = bmi2_set_regs(BMI2_CMD_REG_ADDR, &data, 1, dev); - dev->delay_us(2000, dev->intf_ptr); + dev->delay_us(20 * 1000, dev->intf_ptr); /* Set APS flag as after soft reset the sensor is on advance power save mode */ dev->aps_status = BMI2_ENABLE; @@ -5635,11 +5635,11 @@ static int8_t write_config_file(struct bmi2_dev *dev) /* Enable loading of the configuration */ rslt = set_config_load(BMI2_ENABLE, dev); - if (rslt == BMI2_OK) - { - /* Enable advanced power save mode */ - rslt = bmi2_set_adv_power_save(BMI2_ENABLE, dev); - } + // if (rslt == BMI2_OK) + // { + // /* Enable advanced power save mode */ + // rslt = bmi2_set_adv_power_save(BMI2_ENABLE, dev); + // } } } } diff --git a/bmi2.h b/bmi2.h index 20acca9..4b245ee 100644 --- a/bmi2.h +++ b/bmi2.h @@ -59,6 +59,12 @@ extern "C" { /*! Header files ****************************************************************************/ #include "bmi2_defs.h" +#include "freertos/FreeRTOS.h" +#include "freertos/task.h" +#include "esp_log.h" +#include "esp_check.h" + +#include "i2c_bus.h" /***************************************************************************/ diff --git a/bmi270.c b/bmi270.c index 20f27bb..1d5307d 100644 --- a/bmi270.c +++ b/bmi270.c @@ -41,13 +41,17 @@ /*! Header files ****************************************************************************/ #include "bmi270.h" +#include "common/common.h" /***************************************************************************/ +const static char *TAG = "bmi270"; + /*! Global Variable ****************************************************************************/ /*! @name Global array that stores the configuration file of BMI270 */ +#if (BMI270_CHIP_ID == 0x24) const uint8_t bmi270_config_file[] = { 0xc8, 0x2e, 0x00, 0x2e, 0x80, 0x2e, 0x3d, 0xb1, 0xc8, 0x2e, 0x00, 0x2e, 0x80, 0x2e, 0x91, 0x03, 0x80, 0x2e, 0xbc, 0xb0, 0x80, 0x2e, 0xa3, 0x03, 0xc8, 0x2e, 0x00, 0x2e, 0x80, 0x2e, 0x00, 0xb0, 0x50, 0x30, 0x21, 0x2e, 0x59, 0xf5, @@ -482,6 +486,696 @@ const uint8_t bmi270_config_file[] = { 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1 }; +#else +const uint8_t bmi270_config_file[] = { + 0xc8, 0x2e, 0x00, 0x2e, 0x80, 0x2e, 0xb6, 0xb0, 0xc8, 0x2e, 0x00, 0x2e, + 0x80, 0x2e, 0xee, 0x00, 0x80, 0x2e, 0x6a, 0x01, 0x80, 0x2e, 0xad, 0x01, + 0xc8, 0x2e, 0x00, 0x2e, 0x80, 0x2e, 0x01, 0xb0, 0x50, 0x32, 0x21, 0x2e, + 0x59, 0xf5, 0x10, 0x30, 0x21, 0x2e, 0x6a, 0xf5, 0x80, 0x2e, 0xea, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x3e, 0x21, 0x01, 0x00, 0x22, 0x00, 0x7f, 0x00, + 0x00, 0x0c, 0xff, 0x0f, 0xbc, 0x00, 0x85, 0x33, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0xac, 0xa2, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x32, 0x01, 0xe6, 0x78, + 0x84, 0x00, 0x9c, 0x6c, 0x07, 0x00, 0x64, 0x75, 0xaa, 0x7e, 0x5f, 0x05, + 0xbe, 0x0a, 0x5f, 0x05, 0x96, 0xe8, 0xef, 0x41, 0x01, 0x00, 0x0c, 0x00, + 0x0c, 0x00, 0x4a, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x0c, 0x00, 0xf0, 0x3c, + 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x88, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x02, + 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xc1, 0x4a, 0x00, 0x00, 0x6d, 0x57, 0x00, 0x00, 0x77, 0x8e, 0x00, 0x00, + 0xe0, 0xff, 0xff, 0xff, 0xd3, 0xff, 0xff, 0xff, 0xe5, 0xff, 0xff, 0xff, + 0xee, 0xe1, 0xff, 0xff, 0x7c, 0x13, 0x00, 0x00, 0x46, 0xe6, 0xff, 0xff, + 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x1a, 0x24, 0x22, 0x00, 0x80, 0x2e, 0x48, 0x02, 0x10, 0x50, 0xf7, 0x7f, + 0x00, 0x2e, 0x0f, 0x2e, 0x69, 0xf5, 0xff, 0xbf, 0xff, 0xbb, 0xc0, 0x91, + 0x02, 0x2f, 0x37, 0x30, 0x2f, 0x2e, 0x69, 0xf5, 0xf7, 0x6f, 0xf0, 0x5f, + 0xc8, 0x2e, 0x80, 0x2e, 0x00, 0xc1, 0xfd, 0x2d, 0xc2, 0x00, 0xaa, 0xaa, + 0xd0, 0x07, 0xc0, 0xf5, 0xdc, 0x00, 0x1e, 0xf2, 0x69, 0xf5, 0x19, 0xf4, + 0x66, 0xf5, 0x00, 0x04, 0xff, 0x00, 0x64, 0xf5, 0xc6, 0x00, 0x08, 0x02, + 0xc9, 0x00, 0xa2, 0x00, 0xa4, 0x00, 0x87, 0x00, 0xda, 0x00, 0xff, 0x3f, + 0xff, 0xfb, 0x00, 0x18, 0x00, 0x10, 0xfd, 0xf5, 0xe2, 0x00, 0xac, 0x00, + 0xe2, 0x00, 0xe5, 0x00, 0x34, 0x43, 0x34, 0x4b, 0xff, 0xfd, 0x9a, 0xf1, + 0x99, 0x51, 0x9a, 0xf9, 0xc1, 0xf5, 0x8d, 0xf1, 0x80, 0x00, 0x00, 0x40, + 0x4d, 0x01, 0xeb, 0x00, 0x7f, 0xff, 0xc2, 0xf5, 0x68, 0xf7, 0xba, 0x00, + 0xae, 0x00, 0xb4, 0x00, 0xc0, 0x00, 0x60, 0x01, 0x61, 0xf7, 0x5b, 0xf7, + 0x63, 0x01, 0x78, 0xf7, 0x77, 0xf7, 0x00, 0x80, 0xff, 0x7f, 0x86, 0x00, + 0x52, 0x01, 0x65, 0x01, 0xb3, 0xf1, 0x5f, 0x01, 0x6c, 0xf7, 0xb9, 0xf1, + 0xc6, 0xf1, 0x00, 0xe0, 0x00, 0xff, 0xd1, 0xf5, 0x67, 0x01, 0x6a, 0x01, + 0xff, 0x03, 0x00, 0xfc, 0xf0, 0x3f, 0x0d, 0x02, 0x10, 0x02, 0x12, 0x02, + 0xb9, 0x00, 0x2d, 0xf5, 0xca, 0xf5, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xa0, 0x50, 0x80, 0x7f, 0x91, 0x7f, 0xd7, 0x7f, + 0xc5, 0x7f, 0xb3, 0x7f, 0xa2, 0x7f, 0xe4, 0x7f, 0xf6, 0x7f, 0x7b, 0x7f, + 0x00, 0x2e, 0x0d, 0x50, 0x00, 0x2e, 0x01, 0x40, 0x9f, 0xbc, 0x9f, 0xb8, + 0x40, 0x90, 0x02, 0x2f, 0x31, 0x30, 0x23, 0x2e, 0x69, 0xf5, 0x37, 0x80, + 0x00, 0x2e, 0x00, 0x40, 0x60, 0x7f, 0x98, 0x2e, 0xdc, 0x01, 0x62, 0x6f, + 0x01, 0x32, 0x91, 0x08, 0x80, 0xb2, 0x0d, 0x2f, 0x00, 0xb2, 0x03, 0x2f, + 0x05, 0x2e, 0x18, 0x00, 0x80, 0x90, 0x05, 0x2f, 0x17, 0x56, 0x02, 0x30, + 0xc1, 0x42, 0xc2, 0x86, 0x00, 0x2e, 0xc2, 0x42, 0x23, 0x2e, 0x60, 0xf5, + 0x00, 0x90, 0x00, 0x30, 0x06, 0x2f, 0x21, 0x2e, 0x81, 0x00, 0x15, 0x50, + 0x21, 0x2e, 0x5a, 0xf2, 0x98, 0x2e, 0xf0, 0x01, 0xf6, 0x6f, 0xe4, 0x6f, + 0x80, 0x6f, 0x91, 0x6f, 0xa2, 0x6f, 0xb3, 0x6f, 0xc5, 0x6f, 0xd7, 0x6f, + 0x7b, 0x6f, 0x60, 0x5f, 0xc8, 0x2e, 0x30, 0x50, 0xe5, 0x7f, 0xf6, 0x7f, + 0xd7, 0x7f, 0x00, 0x2e, 0x0d, 0x5a, 0x00, 0x2e, 0x46, 0x41, 0x6f, 0xbf, + 0x6f, 0xbb, 0x80, 0x91, 0x02, 0x2f, 0x36, 0x30, 0x2d, 0x2e, 0x69, 0xf5, + 0x46, 0x30, 0x0f, 0x2e, 0xa4, 0xf1, 0xbe, 0x09, 0x77, 0x8b, 0x80, 0xb3, + 0x06, 0x2f, 0x0d, 0x2e, 0xa8, 0x00, 0x84, 0xaf, 0x02, 0x2f, 0x16, 0x30, + 0x2d, 0x2e, 0x84, 0x00, 0x86, 0x30, 0x46, 0x43, 0x00, 0x2e, 0xf6, 0x6f, + 0xe5, 0x6f, 0xd7, 0x6f, 0xd0, 0x5f, 0xc8, 0x2e, 0x03, 0x2e, 0xa7, 0x00, + 0x16, 0xb8, 0x02, 0x34, 0x4a, 0x0c, 0x21, 0x2e, 0x2d, 0xf5, 0xc0, 0x2e, + 0x23, 0x2e, 0xa7, 0x00, 0x2f, 0x52, 0x00, 0x2e, 0x60, 0x40, 0x41, 0x40, + 0x0d, 0xbc, 0x98, 0xbc, 0xc0, 0x2e, 0x01, 0x0a, 0x0f, 0xb8, 0x43, 0x86, + 0x25, 0x40, 0x04, 0x40, 0xd8, 0xbe, 0x2c, 0x0b, 0x22, 0x11, 0x54, 0x42, + 0x03, 0x80, 0x4b, 0x0e, 0xf6, 0x2f, 0xb8, 0x2e, 0x10, 0x50, 0xfb, 0x7f, + 0x98, 0x2e, 0x56, 0xc7, 0xfb, 0x6f, 0xf0, 0x5f, 0x80, 0x2e, 0x49, 0xc3, + 0x21, 0x2e, 0x59, 0xf5, 0x10, 0x30, 0xc0, 0x2e, 0x21, 0x2e, 0x4a, 0xf1, + 0x80, 0x2e, 0x00, 0xc1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x07, + 0x3e, 0x21, 0x00, 0x00, 0x88, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x05, 0xe0, 0xaa, 0x38, 0x05, 0xe0, 0x90, 0x30, 0x1e, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x25, 0x50, 0x10, 0x50, + 0x31, 0x52, 0x05, 0x2e, 0xa7, 0x00, 0xfb, 0x7f, 0x00, 0x2e, 0x13, 0x40, + 0x93, 0x42, 0x41, 0x0e, 0xfb, 0x2f, 0x98, 0x2e, 0xd2, 0x01, 0x98, 0x2e, + 0x87, 0xcf, 0x01, 0x2e, 0xad, 0x00, 0x00, 0xb2, 0x08, 0x2f, 0x01, 0x2e, + 0x69, 0xf7, 0xb1, 0x3f, 0x01, 0x08, 0x01, 0x30, 0x23, 0x2e, 0xad, 0x00, + 0x21, 0x2e, 0x69, 0xf7, 0xfb, 0x6f, 0xf0, 0x5f, 0xb8, 0x2e, 0x44, 0x47, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x40, 0x50, 0x98, 0x2e, 0xf5, 0xb5, 0x00, 0x30, + 0xf0, 0x7f, 0xe0, 0x7f, 0x21, 0x2e, 0x69, 0xf5, 0x00, 0x2e, 0x00, 0x2e, + 0xd0, 0x2e, 0x00, 0x2e, 0x01, 0x80, 0x08, 0xa2, 0xfb, 0x2f, 0x01, 0x2e, + 0xc5, 0x00, 0x00, 0xb2, 0x1a, 0x2f, 0x05, 0x2e, 0x0c, 0x02, 0x01, 0x52, + 0x98, 0x2e, 0xc7, 0xc1, 0x03, 0x2e, 0x18, 0x00, 0x40, 0xb2, 0xf0, 0x7f, + 0x10, 0x2f, 0x01, 0x2e, 0x0c, 0x02, 0x06, 0xbc, 0x0f, 0xb8, 0x00, 0x90, + 0x0a, 0x2f, 0x01, 0x50, 0x98, 0x2e, 0x4d, 0xc3, 0x01, 0x50, 0x98, 0x2e, + 0x5a, 0xc7, 0x98, 0x2e, 0x3e, 0xb1, 0x10, 0x30, 0x21, 0x2e, 0x19, 0x00, + 0x01, 0x2e, 0x0c, 0x02, 0x06, 0xbc, 0x0f, 0xb8, 0x00, 0xb2, 0x0e, 0x2f, + 0xe0, 0x6f, 0x00, 0x90, 0x0b, 0x2f, 0x07, 0x52, 0x00, 0x2e, 0x50, 0x40, + 0x41, 0x40, 0x21, 0x2e, 0xe8, 0x00, 0x23, 0x2e, 0xe9, 0x00, 0x98, 0x2e, + 0x91, 0x03, 0x10, 0x30, 0xe0, 0x7f, 0x98, 0x2e, 0xd7, 0xb1, 0x01, 0x2e, + 0xa8, 0x00, 0x04, 0xae, 0x0b, 0x2f, 0x01, 0x2e, 0xc5, 0x00, 0x00, 0xb2, + 0x07, 0x2f, 0x01, 0x52, 0x98, 0x2e, 0xa9, 0xb5, 0x00, 0xb2, 0x02, 0x2f, + 0x10, 0x30, 0x21, 0x2e, 0x86, 0x00, 0x01, 0x2e, 0x86, 0x00, 0x00, 0x90, + 0x36, 0x2f, 0x01, 0x2e, 0xab, 0x00, 0x00, 0xb2, 0x04, 0x2f, 0x98, 0x2e, + 0xf2, 0x03, 0x00, 0x30, 0x21, 0x2e, 0x84, 0x00, 0x01, 0x2e, 0x84, 0x00, + 0x00, 0xb2, 0x0b, 0x2f, 0x01, 0x2e, 0xa8, 0x00, 0x00, 0x90, 0x02, 0x2f, + 0x98, 0x2e, 0x43, 0xb5, 0x02, 0x2d, 0x98, 0x2e, 0x9b, 0xb4, 0x00, 0x30, + 0x21, 0x2e, 0x84, 0x00, 0x01, 0x2e, 0x85, 0x00, 0x00, 0xb2, 0x31, 0x2f, + 0x01, 0x2e, 0x85, 0x00, 0x01, 0x31, 0x01, 0x08, 0x00, 0xb2, 0x04, 0x2f, + 0x98, 0x2e, 0x47, 0xcb, 0x10, 0x30, 0x21, 0x2e, 0x19, 0x00, 0x81, 0x30, + 0x01, 0x2e, 0x85, 0x00, 0x01, 0x08, 0x00, 0xb2, 0x04, 0x2f, 0x98, 0x2e, + 0x53, 0xb5, 0x00, 0x30, 0x21, 0x2e, 0xa8, 0x00, 0x00, 0x30, 0x21, 0x2e, + 0x85, 0x00, 0x18, 0x2d, 0x01, 0x2e, 0xa8, 0x00, 0x03, 0xaa, 0x01, 0x2f, + 0x98, 0x2e, 0x60, 0xb5, 0x01, 0x2e, 0xa8, 0x00, 0x3f, 0x80, 0x03, 0xa2, + 0x01, 0x2f, 0x00, 0x2e, 0x02, 0x2d, 0x98, 0x2e, 0x76, 0xb5, 0x30, 0x30, + 0x98, 0x2e, 0xbf, 0x03, 0x00, 0x30, 0x21, 0x2e, 0x86, 0x00, 0x50, 0x32, + 0x98, 0x2e, 0xf8, 0x01, 0x01, 0x2e, 0x19, 0x00, 0x00, 0xb2, 0x1f, 0x2f, + 0x98, 0x2e, 0xf5, 0xcb, 0x03, 0x2e, 0xa9, 0x00, 0x01, 0x0a, 0x21, 0x2e, + 0xdc, 0x00, 0x09, 0x52, 0x7e, 0x82, 0x0b, 0x50, 0x41, 0x40, 0x18, 0xb9, + 0x11, 0x42, 0x02, 0x82, 0x02, 0x42, 0xd1, 0x7f, 0xf0, 0x31, 0x41, 0x40, + 0xf2, 0x6f, 0x25, 0xbd, 0x08, 0x08, 0x02, 0x0a, 0xc0, 0x7f, 0x98, 0x2e, + 0xa8, 0xcf, 0x06, 0xbc, 0xc1, 0x6f, 0xd2, 0x6f, 0x08, 0x0a, 0x80, 0x42, + 0x98, 0x2e, 0x20, 0x02, 0x00, 0x30, 0x03, 0x2e, 0xa8, 0x00, 0x21, 0x2e, + 0x19, 0x00, 0x21, 0x2e, 0xc5, 0x00, 0x44, 0x90, 0x90, 0x2e, 0x4e, 0x02, + 0x03, 0x2e, 0xfd, 0xf5, 0x42, 0x30, 0x8a, 0x08, 0x80, 0xb2, 0x05, 0x2f, + 0x05, 0x2e, 0xc0, 0xf5, 0x28, 0xbd, 0x2f, 0xb9, 0x80, 0x90, 0x0b, 0x2f, + 0x22, 0x30, 0x4a, 0x08, 0x40, 0xb2, 0x90, 0x2e, 0x4e, 0x02, 0x03, 0x2e, + 0xc2, 0xf5, 0x98, 0xbc, 0x9f, 0xb8, 0x40, 0xb2, 0x90, 0x2e, 0x4e, 0x02, + 0x03, 0x52, 0x05, 0x54, 0x03, 0x30, 0x23, 0x2e, 0x00, 0xb0, 0x41, 0x16, + 0xc1, 0x86, 0x23, 0x2e, 0xff, 0xb7, 0x5a, 0x0e, 0xf7, 0x2f, 0x80, 0x2e, + 0x4e, 0x02, 0x11, 0x30, 0x81, 0x08, 0x01, 0x2e, 0x6a, 0xf7, 0x71, 0x3f, + 0x23, 0xbd, 0x01, 0x08, 0x02, 0x0a, 0xc0, 0x2e, 0x21, 0x2e, 0x6a, 0xf7, + 0x80, 0x2e, 0x00, 0xc1, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x9a, 0x01, 0x34, 0x03, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x2f, 0x50, 0x41, 0x30, 0x02, 0x40, 0x51, 0x0a, 0x01, 0x42, + 0x41, 0x3c, 0x01, 0x00, 0x31, 0x30, 0x02, 0x40, 0x51, 0x0a, 0x21, 0x42, + 0x71, 0x3f, 0x33, 0x54, 0x02, 0x42, 0x90, 0x31, 0x05, 0x2e, 0xed, 0xf4, + 0x51, 0x08, 0x23, 0x2e, 0xed, 0xf4, 0x21, 0x2e, 0xc1, 0x00, 0x01, 0x30, + 0xc0, 0x2e, 0x23, 0x2e, 0xaa, 0x00, 0x03, 0xbc, 0x21, 0x2e, 0xa9, 0x00, + 0x03, 0x2e, 0xa9, 0x00, 0x40, 0xb2, 0x10, 0x30, 0x21, 0x2e, 0x19, 0x00, + 0x01, 0x30, 0x05, 0x2f, 0x05, 0x2e, 0xac, 0x00, 0x80, 0x90, 0x01, 0x2f, + 0x23, 0x2e, 0x6f, 0xf5, 0xc0, 0x2e, 0x21, 0x2e, 0xad, 0x00, 0x30, 0x25, + 0x00, 0x30, 0x21, 0x2e, 0x5a, 0xf5, 0x10, 0x50, 0x21, 0x2e, 0x84, 0x00, + 0x21, 0x2e, 0x85, 0x00, 0xfb, 0x7f, 0x98, 0x2e, 0x43, 0x03, 0x40, 0x30, + 0x21, 0x2e, 0xa8, 0x00, 0xfb, 0x6f, 0xf0, 0x5f, 0x03, 0x25, 0x80, 0x2e, + 0xab, 0x03, 0x01, 0x2e, 0x5d, 0xf7, 0x08, 0xbc, 0x80, 0xac, 0x0e, 0xbb, + 0x02, 0x2f, 0x00, 0x30, 0x41, 0x04, 0x82, 0x06, 0xc0, 0xa4, 0x00, 0x30, + 0x11, 0x2f, 0x40, 0xa9, 0x03, 0x2f, 0x40, 0x91, 0x0d, 0x2f, 0x00, 0xa7, + 0x0b, 0x2f, 0x80, 0xb3, 0x4b, 0x58, 0x02, 0x2f, 0x90, 0xa1, 0x26, 0x13, + 0x20, 0x23, 0x80, 0x90, 0x10, 0x30, 0x01, 0x2f, 0xcc, 0x0e, 0x00, 0x2f, + 0x00, 0x30, 0xb8, 0x2e, 0x01, 0x2e, 0xab, 0x00, 0x03, 0x2e, 0xaa, 0x00, + 0x48, 0x0e, 0x01, 0x2f, 0x80, 0x2e, 0x43, 0xb5, 0xb8, 0x2e, 0x80, 0x2e, + 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0xfd, 0x2d, 0x00, 0x00, 0xa0, 0x50, + 0x82, 0x7f, 0x90, 0x7f, 0xa1, 0x7f, 0xd7, 0x7f, 0xc5, 0x7f, 0xb3, 0x7f, + 0xe4, 0x7f, 0xf6, 0x7f, 0x7b, 0x7f, 0x00, 0x2e, 0x0d, 0x54, 0x00, 0x2e, + 0x80, 0x40, 0x0f, 0xbc, 0x0f, 0xb8, 0x00, 0x90, 0x02, 0x2f, 0x30, 0x30, + 0x21, 0x2e, 0x69, 0xf5, 0xf0, 0x3e, 0x03, 0x2e, 0xeb, 0xf0, 0x48, 0x08, + 0x01, 0x2e, 0xa8, 0x00, 0xb7, 0x84, 0x23, 0x2e, 0xeb, 0xf0, 0x04, 0x90, + 0x62, 0x7f, 0x05, 0x2f, 0xf2, 0x3b, 0x01, 0x2e, 0xc2, 0xf5, 0x82, 0x08, + 0x25, 0x2e, 0xc2, 0xf5, 0x98, 0x2e, 0xdc, 0x01, 0x00, 0xb2, 0x63, 0x2f, + 0x05, 0x2e, 0x11, 0x02, 0x01, 0x2e, 0x13, 0x02, 0x8f, 0xb8, 0x07, 0x2e, + 0x08, 0x02, 0x2f, 0xb9, 0x91, 0x0a, 0xb3, 0xbd, 0x01, 0x2e, 0x08, 0x02, + 0xbf, 0xb8, 0x04, 0xbc, 0x91, 0x0a, 0x0f, 0xb8, 0x90, 0x0a, 0x25, 0x2e, + 0x18, 0x00, 0x05, 0x2e, 0xc1, 0xf5, 0x2e, 0xbc, 0x05, 0x2e, 0xa8, 0x00, + 0x84, 0xa2, 0x0e, 0xb8, 0x31, 0x30, 0x88, 0x04, 0x07, 0x2f, 0x01, 0x2e, + 0x18, 0x00, 0x00, 0x90, 0x03, 0x2f, 0x01, 0x2e, 0x82, 0x00, 0x00, 0xb2, + 0x19, 0x2f, 0x0f, 0x50, 0x01, 0x52, 0x98, 0x2e, 0xe5, 0x01, 0x05, 0x2e, + 0x81, 0x00, 0x25, 0x2e, 0xc5, 0x00, 0x05, 0x2e, 0x81, 0x00, 0x80, 0x90, + 0x02, 0x2f, 0x12, 0x30, 0x25, 0x2e, 0x81, 0x00, 0x01, 0x2e, 0x82, 0x00, + 0x00, 0xb2, 0x10, 0x30, 0x05, 0x2e, 0x18, 0x00, 0x01, 0x2f, 0x21, 0x2e, + 0x18, 0x00, 0x25, 0x2e, 0x82, 0x00, 0x05, 0x2e, 0x18, 0x00, 0x80, 0xb2, + 0x20, 0x2f, 0x01, 0x2e, 0xc0, 0xf5, 0xf2, 0x30, 0x02, 0x08, 0x07, 0xaa, + 0x73, 0x30, 0x03, 0x2e, 0x83, 0x00, 0x18, 0x22, 0x41, 0x1a, 0x05, 0x2f, + 0x03, 0x2e, 0x66, 0xf5, 0x9f, 0xbc, 0x9f, 0xb8, 0x40, 0x90, 0x0c, 0x2f, + 0x11, 0x52, 0x03, 0x30, 0x53, 0x42, 0x2b, 0x30, 0x90, 0x04, 0x5b, 0x42, + 0x21, 0x2e, 0x83, 0x00, 0x24, 0xbd, 0x7e, 0x80, 0x81, 0x84, 0x43, 0x42, + 0x02, 0x42, 0x02, 0x32, 0x25, 0x2e, 0x62, 0xf5, 0x05, 0x2e, 0xaa, 0x00, + 0x81, 0x80, 0x21, 0x2e, 0xaa, 0x00, 0x62, 0x6f, 0x00, 0x31, 0x80, 0x42, + 0x00, 0x2e, 0x05, 0x2e, 0x0c, 0x02, 0x13, 0x50, 0x90, 0x08, 0x80, 0xb2, + 0x0b, 0x2f, 0x05, 0x2e, 0xca, 0xf5, 0xf0, 0x3e, 0x90, 0x08, 0x25, 0x2e, + 0xca, 0xf5, 0x05, 0x2e, 0x59, 0xf5, 0xe0, 0x3f, 0x90, 0x08, 0x25, 0x2e, + 0x59, 0xf5, 0xf6, 0x6f, 0xe4, 0x6f, 0x90, 0x6f, 0xa1, 0x6f, 0xb3, 0x6f, + 0xc5, 0x6f, 0xd7, 0x6f, 0x7b, 0x6f, 0x82, 0x6f, 0x60, 0x5f, 0xc8, 0x2e, + 0xd0, 0x50, 0x80, 0x7f, 0x91, 0x7f, 0xd7, 0x7f, 0xc5, 0x7f, 0xb3, 0x7f, + 0xa2, 0x7f, 0xe4, 0x7f, 0xf6, 0x7f, 0x7b, 0x7f, 0x00, 0x2e, 0x0d, 0x50, + 0x00, 0x2e, 0x01, 0x40, 0x9f, 0xbc, 0x9f, 0xb8, 0x40, 0x90, 0x02, 0x2f, + 0x31, 0x30, 0x23, 0x2e, 0x69, 0xf5, 0x38, 0x82, 0x61, 0x7f, 0x20, 0x30, + 0x41, 0x40, 0x23, 0x2e, 0x85, 0x00, 0x03, 0x2e, 0x85, 0x00, 0x08, 0x08, + 0x00, 0xb2, 0x11, 0x2f, 0x19, 0x50, 0x1a, 0x25, 0x12, 0x40, 0x32, 0x7f, + 0x73, 0x82, 0x12, 0x40, 0x42, 0x7f, 0x00, 0x2e, 0x00, 0x40, 0x50, 0x7f, + 0x98, 0x2e, 0x6a, 0xd6, 0x01, 0x2e, 0x61, 0xf7, 0x01, 0x31, 0x01, 0x0a, + 0x21, 0x2e, 0x61, 0xf7, 0x80, 0x30, 0x03, 0x2e, 0x85, 0x00, 0x08, 0x08, + 0x00, 0xb2, 0x40, 0x2f, 0x01, 0x2e, 0x14, 0x02, 0x05, 0x2e, 0x0b, 0x02, + 0x03, 0x2e, 0x0b, 0x02, 0x96, 0xbc, 0x27, 0xbd, 0x9f, 0xb8, 0x40, 0x90, + 0x2f, 0xb9, 0x21, 0x2e, 0xc0, 0x00, 0x25, 0x2e, 0xac, 0x00, 0x10, 0x30, + 0x01, 0x30, 0x24, 0x2f, 0x03, 0x2e, 0xa8, 0x00, 0x44, 0xb2, 0x05, 0x2f, + 0x47, 0xb2, 0x00, 0x30, 0x27, 0x2f, 0x21, 0x2e, 0x85, 0x00, 0x25, 0x2d, + 0x03, 0x2e, 0xfd, 0xf5, 0x9e, 0xbc, 0x9f, 0xb8, 0x40, 0x90, 0x0e, 0x2f, + 0x03, 0x2e, 0xfc, 0xf5, 0x99, 0xbc, 0x9f, 0xb8, 0x40, 0x90, 0x08, 0x2f, + 0x98, 0x2e, 0xdc, 0x01, 0x00, 0xb2, 0x10, 0x30, 0x03, 0x2f, 0x50, 0x30, + 0x21, 0x2e, 0xa8, 0x00, 0x10, 0x2d, 0x98, 0x2e, 0xab, 0x03, 0x00, 0x30, + 0x21, 0x2e, 0x85, 0x00, 0x0a, 0x2d, 0x05, 0x2e, 0x69, 0xf7, 0x2d, 0xbd, + 0x2f, 0xb9, 0x80, 0xb2, 0x01, 0x2f, 0x21, 0x2e, 0x86, 0x00, 0x23, 0x2e, + 0x85, 0x00, 0x60, 0x6f, 0xe1, 0x31, 0x01, 0x42, 0x00, 0x2e, 0xf6, 0x6f, + 0xe4, 0x6f, 0x80, 0x6f, 0x91, 0x6f, 0xa2, 0x6f, 0xb3, 0x6f, 0xc5, 0x6f, + 0xd7, 0x6f, 0x7b, 0x6f, 0x30, 0x5f, 0xc8, 0x2e, 0x1b, 0x50, 0xe0, 0x50, + 0x12, 0x40, 0x06, 0x40, 0x1a, 0x25, 0x6c, 0xbe, 0x77, 0x8a, 0x75, 0x80, + 0xfb, 0x7f, 0x0b, 0x30, 0x2b, 0x56, 0xd3, 0x08, 0x4c, 0xba, 0x68, 0xbb, + 0x0b, 0x42, 0xd0, 0x7f, 0x6b, 0x7f, 0x4b, 0x43, 0xc0, 0xb2, 0x2d, 0x2e, + 0x8c, 0x00, 0xc4, 0x7f, 0xe5, 0x7f, 0xb3, 0x7f, 0x74, 0x2f, 0x01, 0x2e, + 0xa6, 0x00, 0x00, 0xb2, 0x0b, 0x2f, 0x1d, 0x52, 0x01, 0x2e, 0xa1, 0x00, + 0xa2, 0x7f, 0x98, 0x2e, 0xbb, 0xcc, 0x01, 0x30, 0x23, 0x2e, 0xa6, 0x00, + 0xa2, 0x6f, 0xb3, 0x6f, 0x1a, 0x25, 0x26, 0xbc, 0x86, 0xba, 0x25, 0xbc, + 0x0f, 0xb8, 0x54, 0xb1, 0x00, 0xb2, 0xa6, 0x7f, 0x0c, 0x2f, 0x1f, 0x50, + 0x21, 0x54, 0x0b, 0x30, 0x0b, 0x2e, 0x08, 0x02, 0x29, 0x58, 0x1b, 0x42, + 0x9b, 0x42, 0x6c, 0x09, 0x0b, 0x42, 0x2b, 0x2e, 0x08, 0x02, 0x8b, 0x42, + 0x72, 0x84, 0x2d, 0x50, 0x58, 0x09, 0x27, 0x52, 0x01, 0x50, 0x92, 0x7f, + 0x85, 0x7f, 0x98, 0x2e, 0xc2, 0xc0, 0x01, 0x2e, 0xa1, 0x00, 0xe5, 0x6f, + 0xd4, 0x6f, 0x83, 0x6f, 0x92, 0x6f, 0x1d, 0x52, 0x23, 0x5c, 0x98, 0x2e, + 0x06, 0xcd, 0xb3, 0x6f, 0x1f, 0x50, 0x72, 0x6f, 0xb4, 0xbc, 0x14, 0x40, + 0x80, 0xb2, 0x9f, 0xba, 0x02, 0x40, 0x01, 0x30, 0xe0, 0x7f, 0x05, 0x2f, + 0x40, 0xb3, 0x03, 0x2f, 0x21, 0x5c, 0x11, 0x30, 0x94, 0x43, 0x82, 0x43, + 0xb3, 0xbd, 0xbf, 0xb9, 0xc0, 0xb2, 0x1c, 0x2f, 0x53, 0x6f, 0x23, 0x01, + 0x63, 0x6f, 0x93, 0x02, 0x02, 0x42, 0x40, 0x91, 0x29, 0x2e, 0xa2, 0x00, + 0x21, 0x50, 0x12, 0x2f, 0x21, 0x56, 0x00, 0x2e, 0xd5, 0x40, 0xc3, 0x40, + 0x65, 0x05, 0xd3, 0x06, 0xc0, 0xaa, 0x04, 0x2f, 0xc0, 0x90, 0x08, 0x2f, + 0xa3, 0x6f, 0x5d, 0x0f, 0x05, 0x2f, 0xa5, 0x6f, 0x40, 0xb3, 0x02, 0x2f, + 0x14, 0x42, 0x02, 0x42, 0x11, 0x30, 0xc0, 0x6f, 0x98, 0x2e, 0x95, 0xcf, + 0xe2, 0x6f, 0x25, 0x52, 0x01, 0x2e, 0xa2, 0x00, 0x82, 0x40, 0x50, 0x42, + 0x08, 0x2c, 0x42, 0x42, 0x11, 0x30, 0x23, 0x2e, 0xa6, 0x00, 0x01, 0x30, + 0xc0, 0x6f, 0x98, 0x2e, 0x95, 0xcf, 0x00, 0x2e, 0xfb, 0x6f, 0x20, 0x5f, + 0xb8, 0x2e, 0x01, 0x2e, 0xc1, 0x00, 0x19, 0xb2, 0x90, 0x2e, 0x88, 0xb2, + 0x1a, 0xb2, 0x76, 0x2f, 0x1b, 0xb2, 0x25, 0x2f, 0x1d, 0x90, 0x90, 0x2e, + 0x9f, 0xb2, 0x03, 0x2e, 0xaa, 0x00, 0x41, 0xa2, 0x90, 0x2e, 0x9f, 0xb2, + 0x02, 0x30, 0x25, 0x2e, 0xaa, 0x00, 0x45, 0x52, 0x05, 0x2e, 0xe9, 0x00, + 0x62, 0x42, 0xd2, 0x33, 0x07, 0x2e, 0xe8, 0x00, 0x43, 0x42, 0x4a, 0x00, + 0x42, 0x30, 0x43, 0x40, 0x9a, 0x0a, 0x42, 0x42, 0x11, 0x30, 0x49, 0x56, + 0x03, 0x0a, 0x05, 0x2e, 0x0c, 0x02, 0x3d, 0x58, 0x21, 0x2e, 0xc1, 0x00, + 0x23, 0x2e, 0x19, 0x00, 0x94, 0x08, 0xc0, 0x2e, 0x25, 0x2e, 0x0c, 0x02, + 0x01, 0x2e, 0xaa, 0x00, 0x03, 0xa2, 0x90, 0x2e, 0x9f, 0xb2, 0x00, 0x30, + 0x21, 0x2e, 0xaa, 0x00, 0x47, 0x52, 0x05, 0x2e, 0xc1, 0xf5, 0x66, 0x40, + 0xae, 0xbd, 0x44, 0x40, 0xbe, 0xb9, 0x35, 0x30, 0x43, 0x82, 0x68, 0xbf, + 0xeb, 0x04, 0x62, 0x40, 0x74, 0x0b, 0x28, 0xbf, 0x43, 0x84, 0x44, 0x40, + 0xa7, 0x40, 0x34, 0x0b, 0x86, 0x40, 0xab, 0x10, 0xf8, 0xbf, 0x35, 0x52, + 0x7e, 0x0b, 0x56, 0x40, 0x23, 0x11, 0xb2, 0x05, 0x3f, 0x5e, 0xeb, 0x10, + 0xb7, 0x01, 0x39, 0x5a, 0x57, 0x40, 0x75, 0x0e, 0xbc, 0x05, 0x41, 0x5e, + 0xb7, 0x01, 0x21, 0x2e, 0xed, 0xf4, 0x17, 0x30, 0x38, 0x22, 0x75, 0x0e, + 0x37, 0x5a, 0x41, 0x40, 0x52, 0x43, 0x8b, 0x04, 0x21, 0x30, 0x41, 0x0a, + 0x48, 0x22, 0x43, 0x50, 0x54, 0x43, 0x10, 0x00, 0x3b, 0x54, 0x43, 0x43, + 0x42, 0x0e, 0x43, 0x30, 0x8b, 0x0a, 0xc0, 0x33, 0x45, 0x56, 0x18, 0x00, + 0x51, 0x22, 0x02, 0x40, 0x91, 0xbc, 0xb3, 0x3f, 0x93, 0x08, 0x41, 0x82, + 0xd4, 0x31, 0x29, 0x2e, 0xc1, 0x00, 0x02, 0x42, 0x23, 0x2e, 0xdd, 0x00, + 0xb8, 0x2e, 0x01, 0x2e, 0xaa, 0x00, 0x03, 0xa2, 0x45, 0x2f, 0x00, 0x30, + 0x21, 0x2e, 0xaa, 0x00, 0x47, 0x54, 0x03, 0x2e, 0xc1, 0xf5, 0xa0, 0x40, + 0x83, 0x8a, 0x83, 0x40, 0x08, 0xbe, 0x60, 0x41, 0x42, 0x41, 0x43, 0x8b, + 0x08, 0xbf, 0x60, 0x41, 0xe3, 0x0a, 0x44, 0x41, 0xb2, 0x0a, 0x0b, 0x2e, + 0xed, 0xf4, 0xb6, 0x3f, 0x6e, 0x09, 0x9e, 0xbc, 0x08, 0xbc, 0x04, 0x0b, + 0x9e, 0xb8, 0x36, 0x30, 0x71, 0x04, 0x2b, 0x2e, 0xed, 0xf4, 0x35, 0x50, + 0x59, 0x11, 0x15, 0x42, 0x91, 0x10, 0x07, 0x2e, 0xed, 0xf4, 0x16, 0x30, + 0x12, 0x42, 0x61, 0x10, 0xde, 0x0a, 0xb5, 0x31, 0x2b, 0x2e, 0xc1, 0x00, + 0x01, 0x42, 0x27, 0x2e, 0xed, 0xf4, 0xb8, 0x2e, 0x01, 0x2e, 0xaa, 0x00, + 0x01, 0xa2, 0x12, 0x2f, 0x00, 0x30, 0x21, 0x2e, 0xaa, 0x00, 0x01, 0x2e, + 0xed, 0xf4, 0x41, 0x30, 0x01, 0x0a, 0x21, 0x2e, 0xed, 0xf4, 0x01, 0x2e, + 0xed, 0xf4, 0x11, 0x30, 0x01, 0x0a, 0x21, 0x2e, 0xed, 0xf4, 0xa1, 0x31, + 0xc0, 0x2e, 0x23, 0x2e, 0xc1, 0x00, 0xb8, 0x2e, 0x53, 0x56, 0x4d, 0x54, + 0xd0, 0x40, 0xc4, 0x40, 0x0b, 0x2e, 0xfd, 0xf3, 0x53, 0x52, 0x90, 0x42, + 0x94, 0x42, 0x95, 0x42, 0x05, 0x30, 0x55, 0x50, 0x0f, 0x88, 0x06, 0x40, + 0x04, 0x41, 0x96, 0x42, 0xc5, 0x42, 0x48, 0xbe, 0x73, 0x30, 0x0d, 0x2e, + 0xac, 0x00, 0x4f, 0xba, 0x84, 0x42, 0x03, 0x42, 0x81, 0xb3, 0x02, 0x2f, + 0x2b, 0x2e, 0x6f, 0xf5, 0x06, 0x2d, 0x05, 0x2e, 0x77, 0xf7, 0x51, 0x56, + 0x93, 0x08, 0x25, 0x2e, 0x77, 0xf7, 0x4f, 0x54, 0x25, 0x2e, 0xc2, 0xf5, + 0x07, 0x2e, 0xfd, 0xf3, 0x42, 0x30, 0xb4, 0x33, 0xda, 0x0a, 0x4c, 0x00, + 0x27, 0x2e, 0xfd, 0xf3, 0x43, 0x40, 0xd4, 0x3f, 0xdc, 0x08, 0x43, 0x42, + 0x00, 0x2e, 0x00, 0x2e, 0x43, 0x40, 0x24, 0x30, 0xdc, 0x0a, 0x43, 0x42, + 0x04, 0x80, 0x03, 0x2e, 0xfd, 0xf3, 0x4a, 0x0a, 0x23, 0x2e, 0xfd, 0xf3, + 0x61, 0x34, 0xc0, 0x2e, 0x01, 0x42, 0x00, 0x2e, 0xf0, 0x52, 0xfb, 0x7f, + 0x98, 0x2e, 0x0d, 0xb5, 0x98, 0x2e, 0x34, 0xb5, 0x5f, 0x58, 0xe1, 0x7f, + 0x32, 0x83, 0x81, 0x7f, 0x3a, 0x25, 0x57, 0x54, 0xe5, 0x8a, 0xc2, 0x7f, + 0xeb, 0x86, 0x59, 0x52, 0xb4, 0x7f, 0x51, 0x7f, 0x73, 0x7f, 0x65, 0x7f, + 0xd0, 0x7f, 0xa3, 0x7f, 0x95, 0x7f, 0x14, 0x30, 0x5b, 0x54, 0x81, 0x6f, + 0x42, 0x7f, 0x00, 0x2e, 0x53, 0x40, 0x45, 0x8c, 0x42, 0x40, 0x90, 0x41, + 0xbb, 0x83, 0x86, 0x41, 0xd8, 0x04, 0x16, 0x06, 0x00, 0xac, 0x81, 0x7f, + 0x02, 0x2f, 0x02, 0x30, 0xd3, 0x04, 0x10, 0x06, 0xc1, 0x84, 0x01, 0x30, + 0xc1, 0x02, 0x0b, 0x16, 0x04, 0x09, 0x14, 0x01, 0x99, 0x02, 0xc1, 0xb9, + 0xaf, 0xbc, 0x59, 0x0a, 0xc4, 0x6f, 0x51, 0x43, 0xa1, 0xb4, 0x12, 0x41, + 0x13, 0x41, 0x41, 0x43, 0x35, 0x7f, 0xc4, 0x7f, 0x26, 0x31, 0xe5, 0x6f, + 0xd4, 0x6f, 0x98, 0x2e, 0x37, 0xca, 0x32, 0x6f, 0x65, 0x6f, 0x83, 0x40, + 0x42, 0x41, 0x23, 0x7f, 0x12, 0x7f, 0xf6, 0x30, 0x40, 0x25, 0x51, 0x25, + 0x98, 0x2e, 0x37, 0xca, 0x14, 0x6f, 0x20, 0x05, 0x60, 0x6f, 0x25, 0x6f, + 0x69, 0x07, 0x72, 0x6f, 0x31, 0x6f, 0x0b, 0x30, 0x04, 0x42, 0x9b, 0x42, + 0x8b, 0x42, 0x55, 0x42, 0x32, 0x7f, 0x40, 0xa9, 0xb3, 0x6f, 0x61, 0x7f, + 0x02, 0x30, 0xd0, 0x40, 0xb3, 0x7f, 0x03, 0x2f, 0x40, 0x91, 0x15, 0x2f, + 0x00, 0xa7, 0x13, 0x2f, 0x00, 0xa4, 0x11, 0x2f, 0x84, 0xbd, 0x98, 0x2e, + 0x79, 0xca, 0x55, 0x6f, 0x6b, 0x54, 0x54, 0x41, 0x82, 0x00, 0xf3, 0x3f, + 0x45, 0x41, 0xcb, 0x02, 0xf6, 0x30, 0x98, 0x2e, 0x37, 0xca, 0x33, 0x6f, + 0x74, 0x6f, 0xc1, 0x42, 0x03, 0x2c, 0x00, 0x43, 0x74, 0x6f, 0x33, 0x6f, + 0x00, 0x2e, 0x42, 0x6f, 0x55, 0x6f, 0x91, 0x40, 0x42, 0x8b, 0x00, 0x41, + 0x41, 0x00, 0x01, 0x43, 0x55, 0x7f, 0x14, 0x30, 0xc1, 0x40, 0x95, 0x40, + 0x4d, 0x02, 0xb5, 0x6f, 0x65, 0x50, 0x68, 0x0e, 0x65, 0x6f, 0xd1, 0x42, + 0x73, 0x7f, 0x8a, 0x2f, 0x09, 0x2e, 0xac, 0x00, 0x01, 0xb3, 0x23, 0x2f, + 0x5f, 0x58, 0x90, 0x6f, 0x17, 0x30, 0x13, 0x41, 0xa6, 0x6f, 0xe4, 0x7f, + 0x00, 0x2e, 0x91, 0x41, 0x14, 0x40, 0x92, 0x41, 0x15, 0x40, 0x17, 0x2e, + 0x6f, 0xf5, 0xa6, 0x7f, 0xd0, 0x7f, 0xcb, 0x7f, 0x98, 0x2e, 0xd3, 0x03, + 0x07, 0x15, 0xc2, 0x6f, 0x14, 0x0b, 0x29, 0x2e, 0x6f, 0xf5, 0xc3, 0xa3, + 0xc1, 0x8f, 0xe4, 0x6f, 0xd0, 0x6f, 0xe6, 0x2f, 0x14, 0x30, 0x05, 0x2e, + 0x6f, 0xf5, 0x14, 0x0b, 0x29, 0x2e, 0x6f, 0xf5, 0x80, 0x2e, 0x97, 0xb4, + 0x61, 0x54, 0x34, 0x30, 0x85, 0x40, 0xab, 0x84, 0xec, 0x08, 0x91, 0x40, + 0xb8, 0xbd, 0xd9, 0x00, 0x36, 0xbc, 0xc1, 0x30, 0xe9, 0x08, 0x86, 0xb6, + 0x25, 0x7e, 0x98, 0x8a, 0x81, 0x40, 0x69, 0x85, 0xb6, 0xbd, 0x59, 0x00, + 0x45, 0x41, 0x90, 0x32, 0xd0, 0x00, 0x6c, 0x09, 0x82, 0x40, 0xd8, 0xbe, + 0x96, 0xbc, 0x6a, 0x01, 0x16, 0xb5, 0x32, 0x7e, 0x1a, 0x25, 0x70, 0x3d, + 0x88, 0x00, 0x56, 0xbc, 0x0b, 0x30, 0x06, 0xb4, 0x7b, 0x7d, 0x62, 0x82, + 0x40, 0x7e, 0x8b, 0x7d, 0xfd, 0x8a, 0xd1, 0x7f, 0x9b, 0x7d, 0xe2, 0x7f, + 0xe1, 0x30, 0xc3, 0x40, 0x69, 0x50, 0x9c, 0x09, 0xb1, 0x15, 0xee, 0xb7, + 0x56, 0x41, 0xf8, 0xbf, 0xb7, 0x0b, 0x42, 0xbe, 0x7e, 0x82, 0x68, 0x0e, + 0x96, 0x42, 0xf4, 0x2f, 0x4a, 0x25, 0xa2, 0x3d, 0x22, 0x01, 0x2a, 0x25, + 0xa0, 0x82, 0xb4, 0x7f, 0xc4, 0x7f, 0x81, 0x7f, 0x05, 0x30, 0x67, 0x54, + 0xb7, 0x80, 0x15, 0x56, 0x6b, 0x58, 0xa0, 0x8c, 0x60, 0x7f, 0x72, 0x7f, + 0x00, 0x2e, 0x80, 0x41, 0xc3, 0x08, 0xb8, 0xbd, 0x38, 0xb7, 0xe6, 0xbd, + 0x82, 0x40, 0x1c, 0x01, 0x29, 0xbd, 0xce, 0x16, 0x29, 0xb5, 0x6a, 0xbb, + 0xb6, 0xbd, 0xa0, 0x6f, 0x52, 0x7f, 0xde, 0x0a, 0x5d, 0x03, 0x12, 0x40, + 0x54, 0x42, 0x45, 0x42, 0x41, 0x7f, 0xf6, 0x30, 0x13, 0x40, 0xa0, 0x7f, + 0x98, 0x2e, 0x37, 0xca, 0x1a, 0xbd, 0x16, 0xb6, 0x86, 0xba, 0x00, 0xa9, + 0xaa, 0x0a, 0x6d, 0x52, 0x0f, 0x2f, 0x00, 0x91, 0x6d, 0x52, 0x03, 0x2f, + 0x6d, 0x5a, 0x55, 0x0f, 0x6d, 0x52, 0x08, 0x2f, 0x3f, 0xa1, 0x04, 0x2f, + 0x3f, 0x91, 0x03, 0x2f, 0x6b, 0x58, 0xd4, 0x0f, 0x00, 0x2f, 0x6b, 0x54, + 0x12, 0x25, 0xf2, 0x33, 0x98, 0x2e, 0xd9, 0xc0, 0x74, 0x6f, 0xf2, 0x37, + 0x42, 0x09, 0x05, 0x43, 0x21, 0x85, 0x54, 0x6f, 0xd9, 0xbe, 0x72, 0x7f, + 0x8c, 0x16, 0xd9, 0xb5, 0x66, 0x6f, 0x26, 0xbc, 0xca, 0xba, 0xa1, 0x41, + 0x8b, 0x16, 0x45, 0x0b, 0x3a, 0xb8, 0x56, 0x7f, 0x26, 0xbd, 0x90, 0x0a, + 0x98, 0xbf, 0x86, 0x41, 0x80, 0x6f, 0xfe, 0x0b, 0x41, 0x6f, 0x06, 0x40, + 0xb6, 0xbd, 0x60, 0x40, 0xf3, 0x00, 0x46, 0xbe, 0x82, 0x02, 0x34, 0x01, + 0x2f, 0xbf, 0x47, 0x7f, 0x81, 0x7f, 0xb1, 0xb8, 0x3f, 0xbd, 0xcf, 0x17, + 0x45, 0x03, 0xf1, 0x0a, 0x37, 0x7f, 0x98, 0x2e, 0x79, 0xca, 0xb4, 0x6f, + 0x35, 0x6f, 0x10, 0x43, 0x11, 0x43, 0xb4, 0x7f, 0xf6, 0x30, 0x44, 0x6f, + 0x20, 0x25, 0x31, 0x25, 0x98, 0x2e, 0x37, 0xca, 0x62, 0x6f, 0x88, 0xb6, + 0x85, 0x42, 0x02, 0x32, 0x54, 0x6f, 0x75, 0x6f, 0x63, 0x52, 0x00, 0x43, + 0x69, 0x0e, 0x03, 0x81, 0xaa, 0x00, 0x81, 0x6f, 0x15, 0x56, 0x6b, 0x58, + 0x05, 0x30, 0x82, 0x2f, 0xe1, 0x6f, 0xf3, 0x30, 0xd4, 0x6f, 0xd1, 0x7f, + 0x22, 0x30, 0x15, 0x41, 0x41, 0x40, 0xb4, 0x7f, 0xa1, 0x7f, 0x85, 0x7f, + 0x98, 0x2e, 0x0f, 0xca, 0xc1, 0x6f, 0x82, 0x6f, 0x54, 0x40, 0x90, 0x00, + 0x55, 0x40, 0xca, 0x16, 0xc1, 0x7f, 0x82, 0x7f, 0xf6, 0x30, 0x98, 0x2e, + 0x37, 0xca, 0x84, 0x6f, 0x60, 0x04, 0x22, 0x30, 0xf3, 0x30, 0x98, 0x2e, + 0x5a, 0xca, 0xa4, 0x6f, 0xa0, 0x00, 0xd1, 0x6f, 0xb4, 0x6f, 0x95, 0x6f, + 0x65, 0x0e, 0x52, 0x42, 0xf3, 0x30, 0xdc, 0x2f, 0x69, 0x58, 0x0d, 0x2e, + 0x77, 0xf7, 0x3d, 0x85, 0xe5, 0x6f, 0x31, 0x30, 0x03, 0x30, 0x30, 0x30, + 0xc0, 0x17, 0xb7, 0x09, 0x5d, 0x5e, 0xb7, 0x0b, 0x57, 0x41, 0x97, 0x42, + 0xf8, 0xbb, 0xf9, 0x09, 0xfb, 0x15, 0x02, 0xbc, 0xc2, 0x86, 0x54, 0x0e, + 0xb7, 0x0b, 0xf1, 0x2f, 0x86, 0x42, 0x00, 0x2e, 0xfb, 0x6f, 0x10, 0x5d, + 0xb8, 0x2e, 0x10, 0x50, 0x01, 0x2e, 0xa8, 0x00, 0x00, 0xb2, 0xfb, 0x7f, + 0x5d, 0x2f, 0x01, 0xb2, 0x54, 0x2f, 0x02, 0xb2, 0x4e, 0x2f, 0x03, 0x90, + 0x63, 0x2f, 0x73, 0x50, 0x39, 0x82, 0x02, 0x40, 0x81, 0x88, 0x75, 0x54, + 0x41, 0x40, 0x7b, 0x56, 0x04, 0x42, 0x00, 0x2e, 0x94, 0x40, 0x95, 0x40, + 0xd8, 0xbe, 0x2c, 0x0b, 0x45, 0x40, 0x6c, 0x01, 0x55, 0x42, 0x0c, 0x17, + 0x45, 0x40, 0x2c, 0x03, 0x54, 0x42, 0x53, 0x0e, 0xf2, 0x2f, 0x7d, 0x56, + 0x3e, 0x82, 0xe2, 0x40, 0xc3, 0x40, 0x28, 0xbd, 0x93, 0x0a, 0x43, 0x40, + 0xda, 0x00, 0x53, 0x42, 0x8a, 0x16, 0x43, 0x40, 0x9a, 0x02, 0x52, 0x42, + 0x00, 0x2e, 0x41, 0x40, 0x49, 0x54, 0x4a, 0x0e, 0x3b, 0x2f, 0x3a, 0x82, + 0x00, 0x30, 0x41, 0x40, 0x21, 0x2e, 0x65, 0x01, 0x40, 0xb2, 0x0a, 0x2f, + 0x98, 0x2e, 0xe2, 0xb2, 0x98, 0x2e, 0x60, 0xb5, 0x98, 0x2e, 0x76, 0xb5, + 0xfb, 0x6f, 0xf0, 0x5f, 0x00, 0x30, 0x80, 0x2e, 0xbf, 0x03, 0x79, 0x54, + 0x6f, 0x56, 0x83, 0x42, 0x8f, 0x86, 0x74, 0x30, 0x77, 0x54, 0xc4, 0x42, + 0x11, 0x30, 0x23, 0x2e, 0xa8, 0x00, 0xa1, 0x42, 0x23, 0x30, 0x27, 0x2e, + 0xab, 0x00, 0x21, 0x2e, 0xaa, 0x00, 0xba, 0x82, 0x18, 0x2c, 0x81, 0x42, + 0x30, 0x30, 0x21, 0x2e, 0xa8, 0x00, 0x13, 0x2d, 0x21, 0x30, 0x00, 0x30, + 0x23, 0x2e, 0xa8, 0x00, 0x21, 0x2e, 0x7b, 0xf7, 0x0c, 0x2d, 0x77, 0x30, + 0x98, 0x2e, 0xa0, 0xb2, 0x71, 0x50, 0x0c, 0x82, 0x12, 0x30, 0x40, 0x42, + 0x25, 0x2e, 0xa8, 0x00, 0x2f, 0x2e, 0x7b, 0xf7, 0xfb, 0x6f, 0xf0, 0x5f, + 0xb8, 0x2e, 0x70, 0x50, 0x0a, 0x25, 0x39, 0x86, 0xfb, 0x7f, 0xe1, 0x32, + 0x62, 0x30, 0x98, 0x2e, 0xc2, 0xc4, 0x15, 0x56, 0xa5, 0x6f, 0xab, 0x08, + 0x91, 0x6f, 0x4b, 0x08, 0x7f, 0x56, 0xc4, 0x6f, 0x23, 0x09, 0x4d, 0xba, + 0x93, 0xbc, 0x8c, 0x0b, 0xd1, 0x6f, 0x0b, 0x09, 0x5f, 0x52, 0x81, 0x5e, + 0x56, 0x42, 0xaf, 0x09, 0x4d, 0xba, 0x23, 0xbd, 0x94, 0x0a, 0xe5, 0x6f, + 0x68, 0xbb, 0xeb, 0x08, 0xbd, 0xb9, 0x63, 0xbe, 0xfb, 0x6f, 0x52, 0x42, + 0xe3, 0x0a, 0xc0, 0x2e, 0x43, 0x42, 0x90, 0x5f, 0x65, 0x50, 0x03, 0x2e, + 0x25, 0xf3, 0x12, 0x40, 0x00, 0x40, 0x28, 0xba, 0x9b, 0xbc, 0x88, 0xbd, + 0x93, 0xb4, 0xe3, 0x0a, 0x89, 0x16, 0x08, 0xb6, 0xc0, 0x2e, 0x19, 0x00, + 0x62, 0x02, 0x10, 0x50, 0xfb, 0x7f, 0x98, 0x2e, 0x9b, 0xb4, 0x01, 0x2e, + 0xa8, 0x00, 0x31, 0x30, 0x08, 0x04, 0xfb, 0x6f, 0x01, 0x30, 0xf0, 0x5f, + 0x23, 0x2e, 0xaa, 0x00, 0x21, 0x2e, 0xab, 0x00, 0xb8, 0x2e, 0x83, 0x50, + 0x21, 0x34, 0x01, 0x42, 0x82, 0x30, 0xc1, 0x32, 0x25, 0x2e, 0x62, 0xf5, + 0x01, 0x00, 0x22, 0x30, 0x01, 0x40, 0x4a, 0x0a, 0x01, 0x42, 0xb8, 0x2e, + 0x83, 0x54, 0xf0, 0x3b, 0x83, 0x40, 0xd8, 0x08, 0x85, 0x52, 0x83, 0x42, + 0x00, 0x30, 0x83, 0x30, 0x50, 0x42, 0xc4, 0x32, 0x27, 0x2e, 0x64, 0xf5, + 0x94, 0x00, 0x50, 0x42, 0x40, 0x42, 0xd3, 0x3f, 0x84, 0x40, 0x7d, 0x82, + 0xe3, 0x08, 0x40, 0x42, 0x83, 0x42, 0xb8, 0x2e, 0x79, 0x52, 0x00, 0x30, + 0x40, 0x42, 0x7c, 0x86, 0x4d, 0x52, 0x09, 0x2e, 0x50, 0x01, 0x53, 0x54, + 0xc4, 0x42, 0xd3, 0x86, 0x54, 0x40, 0x55, 0x40, 0x94, 0x42, 0x85, 0x42, + 0x21, 0x2e, 0xab, 0x00, 0x42, 0x40, 0x25, 0x2e, 0xfd, 0xf3, 0xc0, 0x42, + 0x7e, 0x82, 0x05, 0x2e, 0x86, 0x00, 0x80, 0xb2, 0x14, 0x2f, 0x05, 0x2e, + 0x0b, 0x02, 0x27, 0xbd, 0x2f, 0xb9, 0x80, 0x90, 0x02, 0x2f, 0x21, 0x2e, + 0x6f, 0xf5, 0x0c, 0x2d, 0x07, 0x2e, 0x51, 0x01, 0x14, 0x30, 0x1c, 0x09, + 0x05, 0x2e, 0x77, 0xf7, 0x51, 0x56, 0x47, 0xbe, 0x93, 0x08, 0x94, 0x0a, + 0x25, 0x2e, 0x77, 0xf7, 0x87, 0x54, 0x50, 0x42, 0x4a, 0x0e, 0xfc, 0x2f, + 0xb8, 0x2e, 0x50, 0x50, 0x02, 0x30, 0x43, 0x86, 0x85, 0x50, 0xfb, 0x7f, + 0xe1, 0x7f, 0xd3, 0x7f, 0xc2, 0x7f, 0xb0, 0x7f, 0x00, 0x2e, 0x41, 0x40, + 0x00, 0x40, 0x48, 0x04, 0x98, 0x2e, 0x74, 0xc0, 0x05, 0x2e, 0xc0, 0x00, + 0x42, 0x0f, 0xc2, 0x6f, 0xe1, 0x6f, 0x13, 0x30, 0x9a, 0x22, 0xb0, 0x6f, + 0x5b, 0x40, 0xd3, 0x6f, 0x4b, 0x0e, 0x1b, 0x42, 0xe1, 0x7f, 0xc2, 0x7f, + 0xe9, 0x2f, 0x03, 0x2e, 0x66, 0x01, 0x40, 0x90, 0x11, 0x30, 0x03, 0x2f, + 0x23, 0x2e, 0x66, 0x01, 0x02, 0x2c, 0x00, 0x30, 0xc0, 0x6f, 0xfb, 0x6f, + 0xb0, 0x5f, 0xb8, 0x2e, 0x40, 0x50, 0xf1, 0x7f, 0x0a, 0x25, 0x3c, 0x86, + 0xeb, 0x7f, 0x41, 0x33, 0x22, 0x30, 0x98, 0x2e, 0xc2, 0xc4, 0xd3, 0x6f, + 0xf4, 0x30, 0xdc, 0x09, 0x8b, 0x58, 0xc2, 0x6f, 0x94, 0x09, 0x8d, 0x58, + 0x6a, 0xbb, 0xdc, 0x08, 0xb4, 0xb9, 0xb1, 0xbd, 0x89, 0x5a, 0x95, 0x08, + 0x21, 0xbd, 0xf6, 0xbf, 0x77, 0x0b, 0x51, 0xbe, 0xf1, 0x6f, 0xeb, 0x6f, + 0x52, 0x42, 0x54, 0x42, 0xc0, 0x2e, 0x43, 0x42, 0xc0, 0x5f, 0x50, 0x50, + 0x97, 0x50, 0x91, 0x30, 0x11, 0x42, 0xfb, 0x7f, 0x3b, 0x30, 0x0b, 0x42, + 0x11, 0x30, 0x02, 0x80, 0x23, 0x33, 0x01, 0x42, 0x03, 0x00, 0x07, 0x2e, + 0x80, 0x03, 0x05, 0x2e, 0xa7, 0x00, 0x19, 0x52, 0xe2, 0x7f, 0xd3, 0x7f, + 0xc0, 0x7f, 0x98, 0x2e, 0xd4, 0xb5, 0xd1, 0x6f, 0x08, 0x0a, 0x1a, 0x25, + 0x7b, 0x86, 0xd0, 0x7f, 0x01, 0x33, 0x12, 0x30, 0x98, 0x2e, 0xc2, 0xc4, + 0xd1, 0x6f, 0x08, 0x0a, 0x00, 0xb2, 0x0d, 0x2f, 0xe3, 0x6f, 0x01, 0x2e, + 0x80, 0x03, 0x51, 0x30, 0xc7, 0x86, 0x23, 0x2e, 0x21, 0xf2, 0x08, 0xbc, + 0xc0, 0x42, 0x98, 0x2e, 0xd2, 0x01, 0x00, 0x2e, 0x00, 0x2e, 0xd0, 0x2e, + 0xb0, 0x6f, 0x0b, 0xb8, 0x03, 0x2e, 0x1b, 0x00, 0x08, 0x1a, 0xb0, 0x7f, + 0x70, 0x30, 0x04, 0x2f, 0x21, 0x2e, 0x21, 0xf2, 0x00, 0x2e, 0x00, 0x2e, + 0xd0, 0x2e, 0x98, 0x2e, 0x6d, 0xc0, 0x98, 0x2e, 0x5d, 0xc0, 0x8f, 0x50, + 0x98, 0x2e, 0x44, 0xcb, 0x91, 0x50, 0x98, 0x2e, 0x46, 0xc3, 0x93, 0x50, + 0x98, 0x2e, 0x53, 0xc7, 0x20, 0x26, 0xc0, 0x6f, 0x02, 0x31, 0x12, 0x42, + 0xab, 0x31, 0x0b, 0x42, 0x37, 0x80, 0x01, 0x30, 0x01, 0x42, 0x23, 0x33, + 0x99, 0x52, 0xf0, 0x37, 0x44, 0x40, 0xa2, 0x0a, 0x42, 0x42, 0x4b, 0x00, + 0x07, 0x2e, 0x5e, 0xf7, 0x18, 0x08, 0x21, 0x2e, 0xe0, 0x00, 0xe1, 0x7f, + 0x98, 0x2e, 0x20, 0x02, 0xe0, 0x6f, 0x81, 0x30, 0x01, 0x42, 0x01, 0x30, + 0xfb, 0x6f, 0x95, 0x56, 0x02, 0x30, 0x00, 0x2e, 0x00, 0x2e, 0x81, 0x84, + 0x53, 0x0e, 0xfa, 0x2f, 0x01, 0x42, 0x10, 0x30, 0xb0, 0x5f, 0x21, 0x2e, + 0x21, 0xf2, 0xb8, 0x2e, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0xfd, 0x2d, 0x00, 0x00, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, + 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1 +}; +#endif + + + /*! @name Global array that stores the feature input configuration of BMI270 */ const struct bmi2_feature_config bmi270_feat_in[BMI270_MAX_FEAT_IN] = { @@ -4486,3 +5180,44 @@ static int8_t disable_sensor_features(uint64_t sensor_sel, struct bmi2_dev *dev) return rslt; } + + +esp_err_t bmi270_sensor_create(const bmi270_i2c_config_t *i2c_conf, bmi270_handle_t *handle_ret) +{ + esp_err_t ret = ESP_OK; + + /* Status of api are returned to this variable. */ + int8_t rslt; + + /* Sensor initialization configuration. */ + struct bmi2_dev *bmi = (struct bmi2_dev *) calloc(1, sizeof(struct bmi2_dev)); + ESP_RETURN_ON_FALSE(bmi, ESP_ERR_NO_MEM, TAG, "memory allocation for device handler failed"); + + rslt = bmi2_interface_init(bmi, BMI2_I2C_INTF, i2c_conf->i2c_addr, i2c_conf->i2c_handle); + bmi2_error_codes_print_result(rslt); + ESP_GOTO_ON_FALSE((BMI2_OK == rslt), ESP_ERR_INVALID_STATE, err, TAG, "bmi2_interface_init failed"); + + /* Initialize bmi270. */ + rslt = bmi270_init(bmi); + bmi2_error_codes_print_result(rslt); + ESP_GOTO_ON_FALSE((BMI2_OK == rslt), ESP_ERR_INVALID_STATE, err, TAG, "bmi270_init failed"); + + ESP_LOGI(TAG, " Create %-15s", (BMI270_CHIP_ID == 0x24) ? "BMI270" : "BMI220"); + + *handle_ret = bmi; + return ret; + +err: + bmi270_sensor_del(bmi); + return ret; +} + +esp_err_t bmi270_sensor_del(bmi270_handle_t handle) +{ + ESP_RETURN_ON_FALSE(handle, ESP_ERR_INVALID_ARG, TAG, "invalid device handle pointer"); + bmi2_coines_deinit(); + + free(handle); + + return ESP_OK; +} diff --git a/bmi270.h b/bmi270.h index c2c85ab..9e75768 100644 --- a/bmi270.h +++ b/bmi270.h @@ -62,7 +62,15 @@ extern "C" { ****************************************************************************/ /*! @name BMI270 Chip identifier */ +#if CONFIG_SENSOR_BMI220 +#define BMI270_CHIP_ID UINT8_C(0x26) +#elif CONFIG_SENSOR_BMI270 #define BMI270_CHIP_ID UINT8_C(0x24) +#else +#error "Invalid sensor selected" +#endif + +#define BMI270_I2C_ADDRESS UINT8_C(0x68) /*! @name BMI270 feature input start addresses */ #define BMI270_CONFIG_ID_STRT_ADDR UINT8_C(0x00) @@ -125,6 +133,55 @@ extern "C" { /*! BMI270 User Interface function prototypes ****************************************************************************/ +/** + * @brief BMI270 I2C configuration structure + * + * This structure contains the configuration parameters for communicating with + * the BMI270 sensor over I2C. It specifies the I2C port and the I2C address of + * the BMI270 device. + */ +typedef struct { + i2c_bus_handle_t i2c_handle; /*!< I2C port used to connect to the BMI270 device */ + uint8_t i2c_addr; /*!< I2C address of the BMI270 device, can be 0x38 or 0x39 depending on the A0 pin */ +} bmi270_i2c_config_t; + +/** + * @brief Handle type for BMI270 sensor + * + * This is a pointer to a structure representing the BMI270 device. It is used + * as a handle for interacting with the sensor. + */ +typedef struct bmi2_dev * bmi270_handle_t; + +/** + * @brief Create and initialize a BMI270 sensor object + * + * This function initializes the BMI270 sensor and prepares it for use. + * It configures the I2C interface and creates a handle for further communication. + * + * @param[in] i2c_conf Pointer to the I2C configuration structure + * @param[out] handle_ret Pointer to a variable that will hold the created sensor handle + * @return + * - ESP_OK: Successfully created the sensor object + * - ESP_ERR_INVALID_ARG: Invalid arguments were provided + * - ESP_FAIL: Failed to initialize the sensor + */ +esp_err_t bmi270_sensor_create(const bmi270_i2c_config_t *i2c_conf, bmi270_handle_t *handle_ret); + +/** + * @brief Delete and release a BMI270 sensor object + * + * This function releases the resources allocated for the BMI270 sensor. + * It should be called when the sensor is no longer needed. + * + * @param[in] handle Handle of the BMI270 sensor object + * @return + * - ESP_OK: Successfully deleted the sensor object + * - ESP_ERR_INVALID_ARG: Invalid handle was provided + * - ESP_FAIL: Failed to delete the sensor object + */ +esp_err_t bmi270_sensor_del(bmi270_handle_t handle); + /** * \ingroup bmi270 * \defgroup bmi270ApiInit Initialization diff --git a/bmi270_examples/common/common.c b/bmi270_examples/common/common.c index ffb523e..8857a32 100644 --- a/bmi270_examples/common/common.c +++ b/bmi270_examples/common/common.c @@ -11,6 +11,8 @@ #include "common.h" #include "bmi2_defs.h" +#include "esp_log.h" + /******************************************************************************/ /*! Macro definitions */ #define BMI2XY_SHUTTLE_ID UINT16_C(0x1B8) @@ -21,14 +23,8 @@ /******************************************************************************/ /*! Static variable definition */ -/*! Variable that holds the I2C device address or SPI chip selection */ -static uint8_t dev_addr; - -/*! Variable that holds the I2C or SPI bus instance */ -static uint8_t bus_inst; - /*! Structure to hold interface configurations */ -static struct coines_intf_config intf_conf; +static i2c_bus_device_handle_t intf_conf; /******************************************************************************/ /*! User interface functions */ @@ -38,9 +34,8 @@ static struct coines_intf_config intf_conf; */ BMI2_INTF_RETURN_TYPE bmi2_i2c_read(uint8_t reg_addr, uint8_t *reg_data, uint32_t len, void *intf_ptr) { - struct coines_intf_config intf_info = *(struct coines_intf_config *)intf_ptr; - - return coines_read_i2c(intf_info.bus, intf_info.dev_addr, reg_addr, reg_data, (uint16_t)len); + i2c_bus_device_handle_t intf_info = (i2c_bus_device_handle_t)intf_ptr; + return i2c_bus_read_bytes(intf_info, reg_addr, (uint16_t)len, reg_data); } /*! @@ -48,9 +43,8 @@ BMI2_INTF_RETURN_TYPE bmi2_i2c_read(uint8_t reg_addr, uint8_t *reg_data, uint32_ */ BMI2_INTF_RETURN_TYPE bmi2_i2c_write(uint8_t reg_addr, const uint8_t *reg_data, uint32_t len, void *intf_ptr) { - struct coines_intf_config intf_info = *(struct coines_intf_config *)intf_ptr; - - return coines_write_i2c(intf_info.bus, intf_info.dev_addr, reg_addr, (uint8_t *)reg_data, (uint16_t)len); + i2c_bus_device_handle_t intf_info = (i2c_bus_device_handle_t)intf_ptr; + return i2c_bus_write_bytes(intf_info, reg_addr, len, reg_data); } /*! @@ -58,9 +52,7 @@ BMI2_INTF_RETURN_TYPE bmi2_i2c_write(uint8_t reg_addr, const uint8_t *reg_data, */ BMI2_INTF_RETURN_TYPE bmi2_spi_read(uint8_t reg_addr, uint8_t *reg_data, uint32_t len, void *intf_ptr) { - struct coines_intf_config intf_info = *(struct coines_intf_config *)intf_ptr; - - return coines_read_spi(intf_info.bus, intf_info.dev_addr, reg_addr, reg_data, (uint16_t)len); + return 0; // TODO } /*! @@ -68,9 +60,7 @@ BMI2_INTF_RETURN_TYPE bmi2_spi_read(uint8_t reg_addr, uint8_t *reg_data, uint32_ */ BMI2_INTF_RETURN_TYPE bmi2_spi_write(uint8_t reg_addr, const uint8_t *reg_data, uint32_t len, void *intf_ptr) { - struct coines_intf_config intf_info = *(struct coines_intf_config *)intf_ptr; - - return coines_write_spi(intf_info.bus, intf_info.dev_addr, reg_addr, (uint8_t *)reg_data, (uint16_t)len); + return 0; // TODO } /*! @@ -78,121 +68,45 @@ BMI2_INTF_RETURN_TYPE bmi2_spi_write(uint8_t reg_addr, const uint8_t *reg_data, */ void bmi2_delay_us(uint32_t period, void *intf_ptr) { - coines_delay_usec(period); -} - -/*! - * @brief Function to initialize coines platform - */ -int16_t coines_board_init(enum coines_comm_intf intf_type, bool get_board_info) -{ - struct coines_board_info board_info; - - int16_t result = coines_open_comm_intf(intf_type, NULL); - - if (result < COINES_SUCCESS) - { - printf( - "\n Unable to connect with Application Board ! \n" " 1. Check if the board is connected and powered on. \n" " 2. Check if Application Board USB driver is installed. \n" - " 3. Check if board is in use by another application. (Insufficient permissions to access USB) \n"); - exit(result); - } - - if (get_board_info) - { - - result = coines_get_board_info(&board_info); - -#if defined(PC) - setbuf(stdout, NULL); -#endif - - if (result == COINES_SUCCESS) - { - if ((board_info.shuttle_id != BMI2XY_SHUTTLE_ID)) - { - printf("! Warning invalid sensor shuttle \n ," "This application will not support this sensor \n"); - } - } - } - - coines_delay_msec(100); - - /* Power up the board */ - coines_set_shuttleboard_vdd_vddio_config(3300, 3300); - - coines_delay_msec(200); - - return result; + vTaskDelay(period / 1000 / portTICK_PERIOD_MS); } /*! * @brief Function to select the interface between SPI and I2C. */ -int8_t bmi2_interface_init(struct bmi2_dev *bmi, uint8_t intf) +int8_t bmi2_interface_init(struct bmi2_dev *bmi, uint8_t intf, uint8_t dev_addr, i2c_bus_handle_t bus_inst) { int8_t rslt = BMI2_OK; - if (bmi != NULL) - { - int16_t result = coines_board_init(COINES_COMM_INTF_USB, true); - - if (result != COINES_SUCCESS) - { - printf("\n Unable to open device ! \n"); - - return COINES_E_UNABLE_OPEN_DEVICE; - } + if (bmi != NULL) { + int16_t result = BMI2_OK; /* Bus configuration : I2C */ - if (intf == BMI2_I2C_INTF) - { - printf("I2C Interface \n"); - + if (intf == BMI2_I2C_INTF) { /* To initialize the user I2C function */ - dev_addr = BMI2_I2C_PRIM_ADDR; bmi->intf = BMI2_I2C_INTF; bmi->read = bmi2_i2c_read; bmi->write = bmi2_i2c_write; - - /* SDO to Ground */ - coines_set_pin_config(COINES_SHUTTLE_PIN_22, COINES_PIN_DIRECTION_OUT, COINES_PIN_VALUE_LOW); - - /* Make CSB pin HIGH */ - coines_set_pin_config(COINES_SHUTTLE_PIN_21, COINES_PIN_DIRECTION_OUT, COINES_PIN_VALUE_HIGH); - coines_delay_msec(100); - - /* SDO pin is made low */ - coines_set_pin_config(COINES_SHUTTLE_PIN_SDO, COINES_PIN_DIRECTION_OUT, COINES_PIN_VALUE_LOW); - - result = coines_config_i2c_bus(COINES_I2C_BUS_0, COINES_I2C_STANDARD_MODE); - - bus_inst = COINES_I2C_BUS_0; } /* Bus configuration : SPI */ - else if (intf == BMI2_SPI_INTF) - { - printf("SPI Interface \n"); - + else if (intf == BMI2_SPI_INTF) { /* To initialize the user SPI function */ - dev_addr = COINES_MINI_SHUTTLE_PIN_2_1; bmi->intf = BMI2_SPI_INTF; bmi->read = bmi2_spi_read; bmi->write = bmi2_spi_write; - - result = coines_config_spi_bus(COINES_SPI_BUS_0, COINES_SPI_SPEED_5_MHZ, COINES_SPI_MODE0); - - coines_set_pin_config(COINES_SHUTTLE_PIN_21, COINES_PIN_DIRECTION_OUT, COINES_PIN_VALUE_HIGH); - - bus_inst = COINES_SPI_BUS_0; + ESP_LOGE("BMI2", "SPI Interface, don't supported now"); } - if (COINES_SUCCESS == result) - { + if (BMI2_OK == result) { /* Assign device address and bus instance to interface pointer */ - intf_conf.bus = bus_inst; - intf_conf.dev_addr = dev_addr; - bmi->intf_ptr = ((void *)&intf_conf); + i2c_bus_device_handle_t i2c_device_handle = i2c_bus_device_create(bus_inst, dev_addr, 0); + if (NULL == i2c_device_handle) { + ESP_LOGE("BMI2", "i2c_bus_device_create failed"); + rslt = BMI2_E_NULL_PTR; + } + + intf_conf = i2c_device_handle; + bmi->intf_ptr = (void *)intf_conf; /* Configure delay in microseconds */ bmi->delay_us = bmi2_delay_us; @@ -202,20 +116,15 @@ int8_t bmi2_interface_init(struct bmi2_dev *bmi, uint8_t intf) /* Assign to NULL to load the default config file. */ bmi->config_file_ptr = NULL; + } else { + rslt = BMI2_E_COM_FAIL; } - else - { - rslt = COINES_E_COMM_INIT_FAILED; - } - } - else - { + } else { rslt = BMI2_E_NULL_PTR; } return rslt; } - /*! * @brief Prints the execution status of the APIs. */ @@ -418,14 +327,6 @@ void bmi2_error_codes_print_result(int8_t rslt) */ void bmi2_coines_deinit(void) { - fflush(stdout); - - coines_set_shuttleboard_vdd_vddio_config(0, 0); - coines_delay_msec(100); - - /* Coines interface reset */ - coines_soft_reset(); - coines_delay_msec(100); - - coines_close_comm_intf(COINES_COMM_INTF_USB, NULL); + ESP_LOGI("BMI2", "bmi2_coines_deinit"); + i2c_bus_device_delete(&intf_conf); } diff --git a/bmi270_examples/common/common.h b/bmi270_examples/common/common.h index 370a2a0..774f2ad 100644 --- a/bmi270_examples/common/common.h +++ b/bmi270_examples/common/common.h @@ -15,21 +15,11 @@ extern "C" { #include #include #include "bmi2.h" -#include "coines.h" /******************************************************************************/ /* Structure declarations */ /******************************************************************************/ -/*! - * @brief Structure to store the interface related configurations - */ -struct coines_intf_config -{ - uint8_t dev_addr; /* Device address or Chip select of the interface selected */ - uint8_t bus; /* Bus instance of the interface selected */ -}; - /******************************************************************************/ /*! Function Definitions */ @@ -115,7 +105,7 @@ void bmi2_delay_us(uint32_t period, void *intf_ptr); * @retval 0 -> Success * @retval < 0 -> Failure Info */ -int8_t bmi2_interface_init(struct bmi2_dev *bmi, uint8_t intf); +int8_t bmi2_interface_init(struct bmi2_dev *bmi, uint8_t intf, uint8_t dev_addr, i2c_bus_handle_t bus_inst); /*! * @brief Prints the execution status of the APIs. diff --git a/bmi270_examples/common/ois_common.c b/bmi270_examples/common/ois_common.c deleted file mode 100644 index 28919d7..0000000 --- a/bmi270_examples/common/ois_common.c +++ /dev/null @@ -1,81 +0,0 @@ -/** - * Copyright (C) 2023 Bosch Sensortec GmbH. All rights reserved. - * - * SPDX-License-Identifier: BSD-3-Clause - */ - -#include "ois_common.h" - -/*! Structure to hold interface configurations */ -static struct coines_ois_intf_config ois_intf_conf; - -/******************************************************************************/ -/*! User interface functions */ - -/*! - * SPI read function map to COINES platform - */ -BMI2_INTF_RETURN_TYPE bmi2_ois_spi_read(uint8_t reg_addr, uint8_t *reg_data, uint32_t len, void *intf_ptr) -{ - struct coines_ois_intf_config intf_info = *(struct coines_ois_intf_config *)intf_ptr; - - return coines_read_spi(intf_info.bus, intf_info.dev_addr, reg_addr, reg_data, (uint16_t)len); -} - -/*! - * SPI write function map to COINES platform - */ -BMI2_INTF_RETURN_TYPE bmi2_ois_spi_write(uint8_t reg_addr, const uint8_t *reg_data, uint32_t len, void *intf_ptr) -{ - struct coines_ois_intf_config intf_info = *(struct coines_ois_intf_config *)intf_ptr; - - return coines_write_spi(intf_info.bus, intf_info.dev_addr, reg_addr, (uint8_t *)reg_data, (uint16_t)len); -} - -/*! - * Delay function map to COINES platform - */ -void bmi2_ois_delay_us(uint32_t period, void *intf_ptr) -{ - coines_delay_usec(period); -} - -#if !defined(MCU_APP20) - -/*! - * @brief Function to initialize the OIS (SPI) interface. - */ -int8_t bmi2_ois_interface_init(struct bmi2_ois_dev *bmi2_ois) -{ - int8_t rslt = BMI2_OK; - - if (bmi2_ois != NULL) - { - /* Bus configuration : SPI */ - printf("\nSPI Interface \n"); - - /* To initialize the user SPI function */ - bmi2_ois->ois_read = bmi2_ois_spi_read; - bmi2_ois->ois_write = bmi2_ois_spi_write; - - coines_config_spi_bus(COINES_SPI_BUS_1, COINES_SPI_SPEED_10_MHZ, COINES_SPI_MODE3); - coines_set_pin_config(COINES_MINI_SHUTTLE_PIN_2_5, COINES_PIN_DIRECTION_OUT, COINES_PIN_VALUE_HIGH); - - /* Assign device address and bus instance to interface pointer */ - ois_intf_conf.bus = COINES_SPI_BUS_1; - ois_intf_conf.dev_addr = COINES_MINI_SHUTTLE_PIN_2_5; - - bmi2_ois->intf_ptr = ((void *)&ois_intf_conf); - - /* Configure delay in microseconds */ - bmi2_ois->ois_delay_us = bmi2_ois_delay_us; - } - else - { - rslt = BMI2_E_NULL_PTR; - } - - return rslt; -} - -#endif diff --git a/bmi270_examples/common/ois_common.h b/bmi270_examples/common/ois_common.h deleted file mode 100644 index b4582ba..0000000 --- a/bmi270_examples/common/ois_common.h +++ /dev/null @@ -1,94 +0,0 @@ -/**\ - * Copyright (c) 2023 Bosch Sensortec GmbH. All rights reserved. - * - * SPDX-License-Identifier: BSD-3-Clause - **/ - -#ifndef _OIS_COMMON_H -#define _OIS_COMMON_H - -/*! CPP guard */ -#ifdef __cplusplus -extern "C" { -#endif - -#include -#include -#include "coines.h" -#include "bmi2_ois.h" - -/******************************************************************************/ -/* Structure declarations */ -/******************************************************************************/ - -/*! - * @brief Structure to store the interface related configurations - */ -struct coines_ois_intf_config -{ - uint8_t dev_addr; /* Device address or Chip select of the interface selected */ - uint8_t bus; /* Bus instance of the interface selected */ -}; - -/******************************************************************************/ -/*! Function Definitions */ - -/*! - * @brief Function for reading the sensor's registers through SPI bus. - * - * @param[in] reg_addr : Register address. - * @param[out] reg_data : Pointer to the data buffer to store the read data. - * @param[in] length : No of bytes to read. - * @param[in] intf_ptr : Interface pointer - * - * @return Status of execution - * @retval = BMI2_INTF_RET_SUCCESS -> Success - * @retval != BMI2_INTF_RET_SUCCESS -> Failure Info - * - */ -BMI2_INTF_RETURN_TYPE bmi2_spi_read(uint8_t reg_addr, uint8_t *reg_data, uint32_t len, void *intf_ptr); - -/*! - * @brief Function for writing the sensor's registers through SPI bus. - * - * @param[in] reg_addr : Register address. - * @param[in] reg_data : Pointer to the data buffer whose data has to be written. - * @param[in] length : No of bytes to write. - * @param[in] intf_ptr : Interface pointer - * - * @return Status of execution - * @retval = BMI2_INTF_RET_SUCCESS -> Success - * @retval != BMI2_INTF_RET_SUCCESS -> Failure Info - * - */ -BMI2_INTF_RETURN_TYPE bmi2_spi_write(uint8_t reg_addr, const uint8_t *reg_data, uint32_t len, void *intf_ptr); - -/*! - * @brief This function provides the delay for required time (Microsecond) as per the input provided in some of the - * APIs. - * - * @param[in] period : The required wait time in microsecond. - * @param[in] intf_ptr : Interface pointer - * - * @return void. - * - */ - -void bmi2_delay_us(uint32_t period, void *intf_ptr); - -/*! - * @brief Function to initialize the OIS (SPI) interface. - * - * @param[in] ois_dev : Structure instance of bmi2_ois_dev - * - * @return Status of execution - * @retval 0 -> Success - * @retval < 0 -> Failure Info - */ -int8_t bmi2_ois_interface_init(struct bmi2_ois_dev *ois_dev); - -#ifdef __cplusplus -} -#endif /* End of CPP guard */ - -#endif /* _OIS_COMMON_H */ diff --git a/idf_component.yml b/idf_component.yml new file mode 100644 index 0000000..a8f332f --- /dev/null +++ b/idf_component.yml @@ -0,0 +1,12 @@ +version: 1.1.0~2 +dependencies: + espressif/i2c_bus: "1.*" + cmake_utilities: + version: 0.* + idf: + version: '>=4.4' +description: The BMI270 is a compact, low-power IMU designed for mobile applications. +url: https://github.com/espressif2022/BMI270_SensorAPI +repository: "https://github.com/espressif2022/BMI270_SensorAPI.git" +documentation: "https://github.com/boschsensortec/BMI270_SensorAPI/" +issues: "https://github.com/espressif2022/BMI270_SensorAPI/issues" # URL of the issue tracker diff --git a/test_apps/CMakeLists.txt b/test_apps/CMakeLists.txt new file mode 100644 index 0000000..fefbc71 --- /dev/null +++ b/test_apps/CMakeLists.txt @@ -0,0 +1,8 @@ +# The following lines of boilerplate have to be in your project's CMakeLists +# in this exact order for cmake to work correctly +cmake_minimum_required(VERSION 3.5) + +set(EXTRA_COMPONENT_DIRS "$ENV{IDF_PATH}/tools/unit-test-app/components") +include($ENV{IDF_PATH}/tools/cmake/project.cmake) +project(bmi270_test) + diff --git a/test_apps/main/CMakeLists.txt b/test_apps/main/CMakeLists.txt new file mode 100644 index 0000000..9d698e1 --- /dev/null +++ b/test_apps/main/CMakeLists.txt @@ -0,0 +1,7 @@ +idf_component_register( + SRC_DIRS "." + INCLUDE_DIRS "." +) + +include(package_manager) +cu_pkg_define_version(${CMAKE_CURRENT_LIST_DIR}) diff --git a/test_apps/main/Kconfig.projbuild b/test_apps/main/Kconfig.projbuild new file mode 100644 index 0000000..8e2767e --- /dev/null +++ b/test_apps/main/Kconfig.projbuild @@ -0,0 +1,15 @@ +menu "Example Configuration" + + config I2C_MASTER_SCL + int "SCL GPIO Num" + default 5 + help + GPIO number for I2C Master clock line. + + config I2C_MASTER_SDA + int "SDA GPIO Num" + default 4 + help + GPIO number for I2C Master data line. + +endmenu diff --git a/test_apps/main/bmi270_test.c b/test_apps/main/bmi270_test.c new file mode 100644 index 0000000..012549b --- /dev/null +++ b/test_apps/main/bmi270_test.c @@ -0,0 +1,561 @@ +/* + * SPDX-FileCopyrightText: 2023 Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: Apache-2.0 + */ + +#include +#include "unity.h" +#include "esp_system.h" +#include "esp_log.h" +#include "driver/gpio.h" + +#include "bmi270.h" +#include "common/common.h" + +#define TEST_MEMORY_LEAK_THRESHOLD (-400) + +/*! Earth's gravity in m/s^2 */ +#define GRAVITY_EARTH (9.80665f) + +/*! Macros to select the sensors */ +#define ACCEL UINT8_C(0x00) +#define GYRO UINT8_C(0x01) + +// #define I2C_MASTER_SCL_IO CONFIG_I2C_MASTER_SCL /*!< gpio number for I2C master clock */ +// #define I2C_MASTER_SDA_IO CONFIG_I2C_MASTER_SDA /*!< gpio number for I2C master data */ + +#define UE_SW_I2C 1 + +#define HW_ESP_SPOT_C5 1 +#define HW_ESP_SPOT_S3 0 +#define HW_ESP_ASTOM_S3 0 + +#if HW_ESP_SPOT_C5 +#define I2C_INT_IO 3 +#define I2C_MASTER_SCL_IO 26 +#define I2C_MASTER_SDA_IO 25 +#elif HW_ESP_SPOT_S3 +#define I2C_INT_IO 5 +#define I2C_MASTER_SCL_IO 1 +#define I2C_MASTER_SDA_IO 2 +#elif HW_ESP_ASTOM_S3 +#define I2C_INT_IO 16 +#define I2C_MASTER_SCL_IO 0 +#define I2C_MASTER_SDA_IO 45 +#endif + +#define I2C_MASTER_NUM I2C_NUM_0 /*!< I2C port number for master dev */ +#define I2C_MASTER_FREQ_HZ 100*1000 /*!< I2C master clock frequency */ + +static bmi270_handle_t bmi_handle = NULL; +static i2c_bus_handle_t i2c_bus; + +bool interrupt_status = false; + +static void IRAM_ATTR gpio_isr_edge_handler(void* arg) +{ + uint32_t gpio_num = (uint32_t) arg; + interrupt_status = true; + esp_rom_printf("GPIO[%"PRIu32"] intr, val: %d\n", gpio_num, gpio_get_level(gpio_num)); +} + +/** + * @brief i2c master initialization + */ +static void i2c_sensor_bmi270_init(void) +{ + const i2c_config_t i2c_bus_conf = { + .mode = I2C_MODE_MASTER, + .sda_io_num = I2C_MASTER_SDA_IO, + .sda_pullup_en = GPIO_PULLUP_ENABLE, + .scl_io_num = I2C_MASTER_SCL_IO, + .scl_pullup_en = GPIO_PULLUP_ENABLE, + .master.clk_speed = I2C_MASTER_FREQ_HZ + }; +#if UE_SW_I2C + i2c_bus = i2c_bus_create(I2C_NUM_SW_1, &i2c_bus_conf); +#else + i2c_bus = i2c_bus_create(I2C_MASTER_NUM, &i2c_bus_conf); +#endif + TEST_ASSERT_NOT_NULL_MESSAGE(i2c_bus, "i2c_bus create returned NULL"); + + bmi270_i2c_config_t i2c_bmi270_conf = { + .i2c_handle = i2c_bus, + .i2c_addr = BMI270_I2C_ADDRESS, + }; + bmi270_sensor_create(&i2c_bmi270_conf, &bmi_handle); + TEST_ASSERT_NOT_NULL_MESSAGE(bmi_handle, "BMI270 create returned NULL"); +} + +/*! + * @brief This function converts lsb to meter per second squared for 16 bit accelerometer at + * range 2G, 4G, 8G or 16G. + */ +static float lsb_to_mps2(int16_t val, float g_range, uint8_t bit_width) +{ + double power = 2; + + float half_scale = (float)((pow((double)power, (double)bit_width) / 2.0f)); + + return (GRAVITY_EARTH * val * g_range) / half_scale; +} + +/*! + * @brief This function converts lsb to degree per second for 16 bit gyro at + * range 125, 250, 500, 1000 or 2000dps. + */ +static float lsb_to_dps(int16_t val, float dps, uint8_t bit_width) +{ + double power = 2; + + float half_scale = (float)((pow((double)power, (double)bit_width) / 2.0f)); + + return (dps / (half_scale)) * (val); +} + +/*! + * @brief This internal API sets the sensor configuration + */ +static int8_t set_wrist_gesture_config(struct bmi2_dev *bmi2_dev) +{ + /* Variable to define result */ + int8_t rslt; + + /* List the sensors which are required to enable */ + uint8_t sens_list[2] = { BMI2_ACCEL, BMI2_WRIST_GESTURE }; + + /* Structure to define the type of the sensor and its configurations */ + struct bmi2_sens_config config; + + /* Configure type of feature */ + config.type = BMI2_WRIST_GESTURE; + + /* Enable the selected sensors */ + rslt = bmi270_sensor_enable(sens_list, 2, bmi2_dev); + bmi2_error_codes_print_result(rslt); + + if (rslt == BMI2_OK) { + /* Get default configurations for the type of feature selected */ + rslt = bmi270_get_sensor_config(&config, 1, bmi2_dev); + bmi2_error_codes_print_result(rslt); + + if (rslt == BMI2_OK) { + config.cfg.wrist_gest.wearable_arm = BMI2_ARM_LEFT; + + /* Set the new configuration along with interrupt mapping */ + rslt = bmi270_set_sensor_config(&config, 1, bmi2_dev); + bmi2_error_codes_print_result(rslt); + } + } + + return rslt; +} + +/*! + * @brief This internal API is used to set configurations for accel and gyro. + */ +static int8_t set_accel_gyro_config(struct bmi2_dev *bmi) +{ + /* Status of api are returned to this variable. */ + int8_t rslt; + + /* Structure to define accelerometer and gyro configuration. */ + struct bmi2_sens_config config[2]; + + /* Configure the type of feature. */ + config[ACCEL].type = BMI2_ACCEL; + config[GYRO].type = BMI2_GYRO; + + /* Get default configurations for the type of feature selected. */ + rslt = bmi2_get_sensor_config(config, 2, bmi); + bmi2_error_codes_print_result(rslt); + + /* Map data ready interrupt to interrupt pin. */ + rslt = bmi2_map_data_int(BMI2_DRDY_INT, BMI2_INT1, bmi); + bmi2_error_codes_print_result(rslt); + + if (rslt == BMI2_OK) { + /* NOTE: The user can change the following configuration parameters according to their requirement. */ + /* Set Output Data Rate */ + config[ACCEL].cfg.acc.odr = BMI2_ACC_ODR_200HZ; + + /* Gravity range of the sensor (+/- 2G, 4G, 8G, 16G). */ + config[ACCEL].cfg.acc.range = BMI2_ACC_RANGE_2G; + + /* The bandwidth parameter is used to configure the number of sensor samples that are averaged + * if it is set to 2, then 2^(bandwidth parameter) samples + * are averaged, resulting in 4 averaged samples. + * Note1 : For more information, refer the datasheet. + * Note2 : A higher number of averaged samples will result in a lower noise level of the signal, but + * this has an adverse effect on the power consumed. + */ + config[ACCEL].cfg.acc.bwp = BMI2_ACC_NORMAL_AVG4; + + /* Enable the filter performance mode where averaging of samples + * will be done based on above set bandwidth and ODR. + * There are two modes + * 0 -> Ultra low power mode + * 1 -> High performance mode(Default) + * For more info refer datasheet. + */ + config[ACCEL].cfg.acc.filter_perf = BMI2_PERF_OPT_MODE; + + /* The user can change the following configuration parameters according to their requirement. */ + /* Set Output Data Rate */ + config[GYRO].cfg.gyr.odr = BMI2_GYR_ODR_200HZ; + + /* Gyroscope Angular Rate Measurement Range.By default the range is 2000dps. */ + config[GYRO].cfg.gyr.range = BMI2_GYR_RANGE_2000; + + /* Gyroscope bandwidth parameters. By default the gyro bandwidth is in normal mode. */ + config[GYRO].cfg.gyr.bwp = BMI2_GYR_NORMAL_MODE; + + /* Enable/Disable the noise performance mode for precision yaw rate sensing + * There are two modes + * 0 -> Ultra low power mode(Default) + * 1 -> High performance mode + */ + config[GYRO].cfg.gyr.noise_perf = BMI2_POWER_OPT_MODE; + + /* Enable/Disable the filter performance mode where averaging of samples + * will be done based on above set bandwidth and ODR. + * There are two modes + * 0 -> Ultra low power mode + * 1 -> High performance mode(Default) + */ + config[GYRO].cfg.gyr.filter_perf = BMI2_PERF_OPT_MODE; + + /* Set the accel and gyro configurations. */ + rslt = bmi2_set_sensor_config(config, 2, bmi); + bmi2_error_codes_print_result(rslt); + } + + return rslt; +} + +static int8_t bmi270_enable_wrist_gesture(struct bmi2_dev *bmi2_dev) +{ + /* Variable to define result */ + int8_t rslt; + + /* Initialize status of wrist gesture interrupt */ + uint16_t int_status = 0; + + /* Select features and their pins to be mapped to */ + struct bmi2_sens_int_config sens_int = { .type = BMI2_WRIST_GESTURE, .hw_int_pin = BMI2_INT1 }; + + /* Sensor data structure */ + struct bmi2_feat_sensor_data sens_data = { .type = BMI2_WRIST_GESTURE }; + + /* The gesture movements are listed in array */ + const char *gesture_output[6] = + { "unknown_gesture", "push_arm_down", "pivot_up", "wrist_shake_jiggle", "flick_in", "flick_out" }; + + /* Set the sensor configuration */ + rslt = set_wrist_gesture_config(bmi2_dev); + bmi2_error_codes_print_result(rslt); + + if (rslt == BMI2_OK) { + /* Map the feature interrupt */ + rslt = bmi270_map_feat_int(&sens_int, 1, bmi2_dev); + bmi2_error_codes_print_result(rslt); + + if (rslt == BMI2_OK) { + printf("Flip the board in portrait/landscape mode:\n"); + + /* Loop to print the wrist gesture data when interrupt occurs */ + for (;;) { + /* Get the interrupt status of the wrist gesture */ + rslt = bmi2_get_int_status(&int_status, bmi2_dev); + bmi2_error_codes_print_result(rslt); + + if ((rslt == BMI2_OK) && (int_status & BMI270_WRIST_GEST_STATUS_MASK)) { + printf("Wrist gesture detected\n"); + + /* Get wrist gesture output */ + rslt = bmi270_get_feature_data(&sens_data, 1, bmi2_dev); + bmi2_error_codes_print_result(rslt); + + printf("Wrist gesture = %d\r\n", sens_data.sens_data.wrist_gesture_output); + + printf("Gesture output = %s\n", gesture_output[sens_data.sens_data.wrist_gesture_output]); + break; + } + } + } + } + return rslt; +} + +int8_t bmi270_enable_accel_gyro(struct bmi2_dev *bmi2_dev) +{ + int8_t rslt; + + /* Assign accel and gyro sensor to variable. */ + uint8_t sensor_list[2] = { BMI2_ACCEL, BMI2_GYRO }; + + /* Structure to define type of sensor and their respective data. */ + struct bmi2_sens_data sensor_data; + + uint8_t indx = 1; + + float acc_x = 0, acc_y = 0, acc_z = 0; + float gyr_x = 0, gyr_y = 0, gyr_z = 0; + struct bmi2_sens_config config; + /* Accel and gyro configuration settings. */ + rslt = set_accel_gyro_config(bmi2_dev); + bmi2_error_codes_print_result(rslt); + + if (rslt == BMI2_OK) { + /* NOTE: + * Accel and Gyro enable must be done after setting configurations + */ + rslt = bmi2_sensor_enable(sensor_list, 2, bmi2_dev); + bmi2_error_codes_print_result(rslt); + + if (rslt == BMI2_OK) { + config.type = BMI2_ACCEL; + + /* Get the accel configurations. */ + rslt = bmi2_get_sensor_config(&config, 1, bmi2_dev); + bmi2_error_codes_print_result(rslt); + + printf( + "\nData set, Accel Range, Acc_Raw_X, Acc_Raw_Y, Acc_Raw_Z, Acc_ms2_X, Acc_ms2_Y, Acc_ms2_Z, Gyr_Raw_X, Gyr_Raw_Y, Gyr_Raw_Z, Gyro_DPS_X, Gyro_DPS_Y, Gyro_DPS_Z\n\n"); + + while (indx <= 10) { + rslt = bmi2_get_sensor_data(&sensor_data, bmi2_dev); + bmi2_error_codes_print_result(rslt); + + if ((rslt == BMI2_OK) && (sensor_data.status & BMI2_DRDY_ACC) && + (sensor_data.status & BMI2_DRDY_GYR)) { + /* Converting lsb to meter per second squared for 16 bit accelerometer at 2G range. */ + acc_x = lsb_to_mps2(sensor_data.acc.x, (float)2, bmi2_dev->resolution); + acc_y = lsb_to_mps2(sensor_data.acc.y, (float)2, bmi2_dev->resolution); + acc_z = lsb_to_mps2(sensor_data.acc.z, (float)2, bmi2_dev->resolution); + + /* Converting lsb to degree per second for 16 bit gyro at 2000dps range. */ + gyr_x = lsb_to_dps(sensor_data.gyr.x, (float)2000, bmi2_dev->resolution); + gyr_y = lsb_to_dps(sensor_data.gyr.y, (float)2000, bmi2_dev->resolution); + gyr_z = lsb_to_dps(sensor_data.gyr.z, (float)2000, bmi2_dev->resolution); + + printf("%d, acc:(%6d, %6d, %6d) (%8.2f, %8.2f, %8.2f) gyr:(%6d, %6d, %6d) (%8.2f, %8.2f, %8.2f)\n", + config.cfg.acc.range, + sensor_data.acc.x, + sensor_data.acc.y, + sensor_data.acc.z, + acc_x, + acc_y, + acc_z, + sensor_data.gyr.x, + sensor_data.gyr.y, + sensor_data.gyr.z, + gyr_x, + gyr_y, + gyr_z); + vTaskDelay(pdMS_TO_TICKS(500)); + indx++; + } + } + } + } + + return rslt; +} + +/*! + * @brief This internal API is used to set configurations for any-motion. + */ +static int8_t set_feature_config(struct bmi2_dev *bmi2_dev) +{ + + /* Status of api are returned to this variable. */ + int8_t rslt; + + /* Structure to define the type of sensor and its configurations. */ + struct bmi2_sens_config config; + + /* Interrupt pin configuration */ + struct bmi2_int_pin_config pin_config = { 0 }; + + /* Configure the type of feature. */ + config.type = BMI2_ANY_MOTION; + + /* Get default configurations for the type of feature selected. */ + rslt = bmi270_get_sensor_config(&config, 1, bmi2_dev); + bmi2_error_codes_print_result(rslt); + + rslt = bmi2_get_int_pin_config(&pin_config, bmi2_dev); + bmi2_error_codes_print_result(rslt); + + if (rslt == BMI2_OK) { + /* NOTE: The user can change the following configuration parameters according to their requirement. */ + /* 1LSB equals 20ms. Default is 100ms, setting to 80ms. */ + config.cfg.any_motion.duration = 0x04; + + /* 1LSB equals to 0.48mg. Default is 83mg, setting to 50mg. */ + config.cfg.any_motion.threshold = 0x68; + + /* Set new configurations. */ + rslt = bmi270_set_sensor_config(&config, 1, bmi2_dev); + bmi2_error_codes_print_result(rslt); + + /* Interrupt pin configuration */ + pin_config.pin_type = BMI2_INT1; + pin_config.pin_cfg[0].input_en = BMI2_INT_INPUT_DISABLE; + pin_config.pin_cfg[0].lvl = BMI2_INT_ACTIVE_LOW; + pin_config.pin_cfg[0].od = BMI2_INT_PUSH_PULL; + pin_config.pin_cfg[0].output_en = BMI2_INT_OUTPUT_ENABLE; + pin_config.int_latch = BMI2_INT_NON_LATCH; + + rslt = bmi2_set_int_pin_config(&pin_config, bmi2_dev); + bmi2_error_codes_print_result(rslt); + } + + return rslt; +} + +int8_t bmi270_enable_any_motion_int(struct bmi2_dev *bmi2_dev) +{ + /* Status of api are returned to this variable. */ + int8_t rslt; + + /* Accel sensor and no-motion feature are listed in array. */ + uint8_t sens_list[2] = { BMI2_ACCEL, BMI2_ANY_MOTION }; + + /* Variable to get no-motion interrupt status. */ + uint16_t int_status = 0; + + /* Select features and their pins to be mapped to. */ + struct bmi2_sens_int_config sens_int = { .type = BMI2_ANY_MOTION, .hw_int_pin = BMI2_INT1 }; + + /* Enable the selected sensors. */ + rslt = bmi270_sensor_enable(sens_list, 2, bmi2_dev); + bmi2_error_codes_print_result(rslt); + + if (rslt == BMI2_OK) { + /* Set feature configurations for no-motion. */ + rslt = set_feature_config(bmi2_dev); + bmi2_error_codes_print_result(rslt); + + if (rslt == BMI2_OK) { + /* Map the feature interrupt for no-motion. */ + rslt = bmi270_map_feat_int(&sens_int, 1, bmi2_dev); + bmi2_error_codes_print_result(rslt); + printf("Move the board\n"); + + /* Loop to get no-motion interrupt. */ + do { + if (interrupt_status == 1) { + interrupt_status = 0; + /* Clear buffer. */ + int_status = 0; + + /* To get the interrupt status of any-motion. */ + rslt = bmi2_get_int_status(&int_status, bmi2_dev); + bmi2_error_codes_print_result(rslt); + + /* To check the interrupt status of any-motion. */ + if (int_status & BMI270_ANY_MOT_STATUS_MASK) { + printf("Any-motion interrupt is generated\n"); + break; + } + } else { + vTaskDelay(pdMS_TO_TICKS(100)); + } + } while (rslt == BMI2_OK); + } + } + + return rslt; +} + +TEST_CASE("sensor Bmi270 test", "[Bmi270][sensor][wrist_gesture]") +{ + esp_err_t ret = ESP_OK; + + i2c_sensor_bmi270_init(); + + int8_t rslt = bmi270_enable_wrist_gesture(bmi_handle); + bmi2_error_codes_print_result(rslt); + TEST_ASSERT_EQUAL(BMI2_OK, rslt); + + bmi270_sensor_del(bmi_handle); + ret = i2c_bus_delete(&i2c_bus); + TEST_ASSERT_EQUAL(ESP_OK, ret); +} + +TEST_CASE("sensor Bmi270 test", "[Bmi270][sensor][accel_gyro]") +{ + esp_err_t ret = ESP_OK; + + i2c_sensor_bmi270_init(); + + int8_t rslt = bmi270_enable_accel_gyro(bmi_handle); + bmi2_error_codes_print_result(rslt); + TEST_ASSERT_EQUAL(BMI2_OK, rslt); + + bmi270_sensor_del(bmi_handle); + ret = i2c_bus_delete(&i2c_bus); + TEST_ASSERT_EQUAL(ESP_OK, ret); +} + +TEST_CASE("sensor Bmi270 test", "[Bmi270][sensor][BMI2_ANY_MOTION][BMI2_INT1]") +{ + esp_err_t ret = ESP_OK; + + gpio_config_t io_conf = {}; + io_conf.intr_type = GPIO_INTR_ANYEDGE; + io_conf.pin_bit_mask = (1ULL << I2C_INT_IO); + + io_conf.mode = GPIO_MODE_INPUT; + io_conf.pull_down_en = 1; + gpio_config(&io_conf); + + gpio_install_isr_service(0); + gpio_isr_handler_add(I2C_INT_IO, gpio_isr_edge_handler, (void*) I2C_INT_IO); + + i2c_sensor_bmi270_init(); + + int8_t rslt = bmi270_enable_any_motion_int(bmi_handle); + bmi2_error_codes_print_result(rslt); + TEST_ASSERT_EQUAL(BMI2_OK, rslt); + + gpio_isr_handler_remove(I2C_INT_IO); + gpio_uninstall_isr_service(); + + bmi270_sensor_del(bmi_handle); + ret = i2c_bus_delete(&i2c_bus); + TEST_ASSERT_EQUAL(ESP_OK, ret); +} + +static size_t before_free_8bit; +static size_t before_free_32bit; + +static void check_leak(size_t before_free, size_t after_free, const char *type) +{ + ssize_t delta = after_free - before_free; + printf("MALLOC_CAP_%s: Before %u bytes free, After %u bytes free (delta %d)\n", type, before_free, after_free, delta); + TEST_ASSERT_MESSAGE(delta >= TEST_MEMORY_LEAK_THRESHOLD, "memory leak"); +} + +void setUp(void) +{ + before_free_8bit = heap_caps_get_free_size(MALLOC_CAP_8BIT); + before_free_32bit = heap_caps_get_free_size(MALLOC_CAP_32BIT); +} + +void tearDown(void) +{ + size_t after_free_8bit = heap_caps_get_free_size(MALLOC_CAP_8BIT); + size_t after_free_32bit = heap_caps_get_free_size(MALLOC_CAP_32BIT); + check_leak(before_free_8bit, after_free_8bit, "8BIT"); + check_leak(before_free_32bit, after_free_32bit, "32BIT"); +} + +void app_main(void) +{ + printf("BMI270 TEST \n"); + unity_run_menu(); +} diff --git a/test_apps/main/idf_component.yml b/test_apps/main/idf_component.yml new file mode 100644 index 0000000..13c9380 --- /dev/null +++ b/test_apps/main/idf_component.yml @@ -0,0 +1,6 @@ +## IDF Component Manager Manifest File +dependencies: + idf: ">=5.0" + BMI270_SensorAPI_espressif2022: + version: "*" + override_path: "../../../BMI270_SensorAPI_espressif2022" diff --git a/test_apps/sdkconfig.defaults b/test_apps/sdkconfig.defaults new file mode 100644 index 0000000..c6cf346 --- /dev/null +++ b/test_apps/sdkconfig.defaults @@ -0,0 +1,7 @@ +# For IDF 5.0 +CONFIG_ESP_TASK_WDT_EN=n + +# For IDF4.4 +CONFIG_ESP_TASK_WDT=n + +CONFIG_ESP_CONSOLE_USB_SERIAL_JTAG=y