diff options
author | Dmitry Filimonchuk <dmitrystu@gmail.com> | 2021-11-07 15:46:47 +0300 |
---|---|---|
committer | Dmitry Filimonchuk <dmitrystu@gmail.com> | 2021-11-08 15:42:55 +0300 |
commit | 0a0a24f590844a9dab1557be054d43c128d0d0a8 (patch) | |
tree | 9ab8b6bbfbbddc69a5221c66b69ee57aa4e8b290 | |
parent | 9a82199f2c925fa9387f018a1db21302a4b96234 (diff) |
add volatile qualifier to the device state
issue#101
-rw-r--r-- | inc/usbd_core.h | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/inc/usbd_core.h b/inc/usbd_core.h index b22fce9..032dfb6 100644 --- a/inc/usbd_core.h +++ b/inc/usbd_core.h @@ -154,14 +154,14 @@ typedef struct { /** USB device status data.*/ typedef struct { - void *data_buf; /**<\brief Pointer to data buffer used for control requests.*/ - void *data_ptr; /**<\brief Pointer to current data for control request.*/ - uint16_t data_count; /**<\brief Count remained data for control request.*/ - uint16_t data_maxsize; /**<\brief Size of the data buffer for control requests.*/ - uint8_t ep0size; /**<\brief Size of the control endpoint.*/ - uint8_t device_cfg; /**<\brief Current device configuration number.*/ - uint8_t device_state; /**<\brief Current \ref usbd_machine_state.*/ - uint8_t control_state; /**<\brief Current \ref usbd_ctl_state.*/ + void *data_buf; /**<\brief Pointer to data buffer used for control requests.*/ + void *data_ptr; /**<\brief Pointer to current data for control request.*/ + uint16_t data_count; /**<\brief Count remained data for control request.*/ + uint16_t data_maxsize; /**<\brief Size of the data buffer for control requests.*/ + uint8_t ep0size; /**<\brief Size of the control endpoint.*/ + uint8_t device_cfg; /**<\brief Current device configuration number.*/ + volatile uint8_t device_state; /**<\brief Current \ref usbd_machine_state.*/ + uint8_t control_state; /**<\brief Current \ref usbd_ctl_state.*/ } usbd_status; /**\brief Generic USB device event callback for events and endpoints processing |