/* * device.h * * Created on: 28 Aug 2023 * Author: malyarenko */ #ifndef SRC_DEVICE_H_ #define SRC_DEVICE_H_ #include #include #include #include "service/sv_device.h" #include "loader/ld_device.h" /** Дескриптор устройства на уровне приложения */ struct efc_usb_device_handler { uint8_t current_config : 4; /**< Текущая конфигурация */ uint8_t enabled_config : 4; /**< Битовое поле включённых конфигуарций */ bool initialized; /**< Признак готовности драйвера */ struct { struct sv_device sv; /**< Дескриптор конфигурации сервисного обмена */ struct ld_device ld; /**< Дескриптор конфигурации загрузчика */ } config_handler; /**< Дескриптор конфигурации */ }; bool device_validate_config(uint8_t enable_config, uint8_t current_config, const struct efc_usb_config* config); #endif /* SRC_DEVICE_H_ */