Skip to content

Commit

Permalink
Swapped struct order.
Browse files Browse the repository at this point in the history
  • Loading branch information
adamshapiro0 committed Oct 29, 2024
1 parent 297821b commit 89f6160
Showing 1 changed file with 21 additions and 21 deletions.
42 changes: 21 additions & 21 deletions src/point_one/fusion_engine/messages/sta5635.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,27 @@ namespace messages {
* See also @ref messages.
******************************************************************************/

/**
* @brief A command to be sent to an attached STA5635 front end. (@ref
* MessageType::STA5635_COMMAND, version 1.0).
* @ingroup sta5635
*
* See the STA5635 data sheet for the allowed command, address, and data values.
*/
struct P1_ALIGNAS(4) STA5635Command : public MessagePayload {
static constexpr MessageType MESSAGE_TYPE = MessageType::STA5635_COMMAND;
static constexpr uint8_t MESSAGE_VERSION = 0;

/** The STA5635 command code to be issued. */
uint8_t command = 0;
/** The address of the STA5635 register to be accessed. */
uint8_t address = 0;
/**
* The value to be sent to the device, where `data[0]` contains the MSB.
*/
uint8_t data[2] = {0};
};

/**
* @brief Result from a STA5635 sent in response to an @ref STA5635Command (@ref
* MessageType::STA5635_COMMAND_RESPONSE, version 1.0).
Expand Down Expand Up @@ -62,27 +83,6 @@ struct P1_ALIGNAS(4) STA5635CommandResponse : public MessagePayload {
uint8_t data[4] = {0};
};

/**
* @brief A command to be sent to an attached STA5635 front end. (@ref
* MessageType::STA5635_COMMAND, version 1.0).
* @ingroup sta5635
*
* See the STA5635 data sheet for the allowed command, address, and data values.
*/
struct P1_ALIGNAS(4) STA5635Command : public MessagePayload {
static constexpr MessageType MESSAGE_TYPE = MessageType::STA5635_COMMAND;
static constexpr uint8_t MESSAGE_VERSION = 0;

/** The STA5635 command code to be issued. */
uint8_t command = 0;
/** The address of the STA5635 register to be accessed. */
uint8_t address = 0;
/**
* The value to be sent to the device, where `data[0]` contains the MSB.
*/
uint8_t data[2] = {0};
};

#pragma pack(pop)

} // namespace messages
Expand Down

0 comments on commit 89f6160

Please sign in to comment.