-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor Mailbox Configuration (#176)
* Use eeprom to configure sm * fix examples compilation
- Loading branch information
1 parent
9840f80
commit 62bb38b
Showing
23 changed files
with
469 additions
and
365 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
#ifndef KICKCAT_SII_PARSER_H | ||
#define KICKCAT_SII_PARSER_H | ||
|
||
#include <vector> | ||
#include "kickcat/protocol.h" | ||
|
||
namespace kickcat::eeprom | ||
{ | ||
// see ETG2010_S_R_V1.0.1 SII Specification | ||
struct SII | ||
{ | ||
std::vector<uint32_t> eeprom; | ||
|
||
// Identity | ||
uint32_t vendor_id; | ||
uint32_t product_code; | ||
uint32_t revision_number; | ||
uint32_t serial_number; | ||
|
||
// Bootstrap Mailbox | ||
uint16_t mailboxBootstrap_recv_offset; | ||
uint16_t mailboxBootstrap_recv_size; | ||
uint16_t mailboxBootstrap_send_offset; | ||
uint16_t mailboxBootstrap_send_size; | ||
|
||
// Mailbox | ||
uint16_t mailbox_recv_offset; | ||
uint16_t mailbox_recv_size; | ||
uint16_t mailbox_send_offset; | ||
uint16_t mailbox_send_size; | ||
eeprom::MailboxProtocol supported_mailbox; | ||
|
||
// Size | ||
uint32_t eeprom_size; // in bytes | ||
uint16_t eeprom_version; | ||
|
||
// Categories | ||
std::vector<std::string_view> strings; | ||
eeprom::GeneralEntry const* general; | ||
std::vector<uint8_t> fmmus; | ||
std::vector<eeprom::SyncManagerEntry const*> syncManagers; | ||
std::vector<eeprom::PDOEntry const*> TxPDO; | ||
std::vector<eeprom::PDOEntry const*> RxPDO; | ||
|
||
void parse(); | ||
}; | ||
} | ||
|
||
#endif | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.