We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add classes for hardware attributes. For example:
class UartAttr { public: u8 port() const { return m_port; } const uart_attr_t & attr() const { return m_attr; } mcu_pin_t tx() const { return m_attr.pin_assignment.tx; } mcu_pin_t rx() const { return m_attr.pin_assignment.rx; } mcu_pin_t cts() const { return m_attr.pin_assignment.cts; } mcu_pin_t rts() const { return m_attr.pin_assignment.rts; } void set_tx(const mcu_pin_t & pin){ m_attr.pin_assignment.tx = pin;} void set_rx(const mcu_pin_t & pin){ m_attr.pin_assignment.rx = pin;} void set_cts(const mcu_pin_t & pin){ m_attr.pin_assignment.cts = pin;} void set_rts(const mcu_pin_t & pin){ m_attr.pin_assignment.rts = pin;} void set_port(u8 p){ m_port = p; } void set_flags(u32 flags){ m_attr.o_flags = flags; } void set_freq(u32 f){ m_attr.freq = f; } void set_width(u32 w){ m_attr.width = w; } private: u8 m_port; uart_attr_t m_attr; };
Then add methods to sys::Cli to parse and handle attributes for each hardware type.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Add classes for hardware attributes. For example:
Then add methods to sys::Cli to parse and handle attributes for each hardware type.
The text was updated successfully, but these errors were encountered: