ВходНаше всё Теги codebook 无线电组件 Поиск Опросы Закон Четверг
25 апреля
913880 Топик полностью
rual (03.04.2019 15:14, просмотров: 347) ответил rual на PIC32MX + XC32 + MCC I2C: не понятно, почему компиллер оптимизирует и проскакивает функцию static bool i2c_transaction_complite(void), код внутри. Состояние переменной меняется в прерывании на I2C2_MESSAGE_COMPLETE. При постановке в очередь
Ещё совочек подкину на вентилятор ХС32, вразумите, пож, "In file included from ../src/юююt.h:30:5: error: unknown type name 'LMP91000_CONFIG_Struct'": есть инициализация массива структур в measurement.с #include "measurement.h" /// список типов ЭХД const ECS_TYPE esc_type_list[ESC_TYPE_NUMBER] = { { "MEMBRAPOR Cl2/M-20", { LMP91000_TIA_GAIN_350K, LMP91000_RLOAD_33_Ohm, LMP91000_REF_EXTERNAL, LMP91000_ZERO_50PS, LMP91000_BIAS_NEG, LMP91000_BIAS_0PS, LMP91000_FET_NO_SHORT , LMP91000_OP_MODE_3LEAD }, // range 0.0f, 20.0f, /// temperature -20.0f, +45.0f, /// pressure 1013 mbar +- 10% от нормы 911.925f, 1114.575f, /// humidity 15.0f, 90.0f, /// наработка (365UL * 2 * 24 * 60 * 60), /// 2 года в секундах }, }; структура и количество членов описаны в measurement.h #include "sensor/lmp91000.h" #define ESC_TYPE_NUMBER 1 typedef struct { const char* type_name; LMP91000_CONFIG_Struct AFE_config; float range_min; float range_max; float temperature_min; float temperature_max; float pressure_min; float pressure_max; float humidity_min; float humidity_max; uint32_t work_time; } ECS_TYPE; extern const ECS_TYPE esc_type_list[]; вложенная структура находится в хедере #include "sensor/lmp91000.h" typedef struct { /// TIA uint8_t TIA_Gain; uint8_t R_Load; /// BIAS uint8_t Ref_Source; uint8_t Zero; uint8_t BIAS_Polarity; uint8_t BIAS; /// Mode uint8_t SHORT; uint8_t Mode; } LMP91000_CONFIG_Struct; по итогу :
In file included from ../src/sensor/../modbus/database.h:12:0,
                 from ../src/sensor/lmp91000.h:21,
                 from ../src/sensor/lmp91000.c:1:
../src/sensor/../modbus/../measurement.h:30:5: error: unknown type name 'LMP91000_CONFIG_Struct'
     LMP91000_CONFIG_Struct AFE_config;
     ^