This commit is contained in:
2024-09-29 17:27:23 +02:00
parent 5292b7bf9f
commit 6680c4d5a3
18 changed files with 167 additions and 173 deletions

View File

@@ -3,13 +3,13 @@
namespace JabyEngine {
namespace Periphery_IO_Values {
__declare_io_value(JOY_BAUD, uint16_t) {
__declare_io_struct(JOY_BAUD, uint16_t) {
static constexpr JOY_BAUD create() {
return JOY_BAUD{0x0088};
}
};
__declare_io_value(JOY_CTRL, uint16_t) {
__declare_io_struct(JOY_CTRL, uint16_t) {
static constexpr auto TXEnable = Bit(0);
static constexpr auto SelectJoy = Bit(1);
static constexpr auto ACK = Bit(4);
@@ -26,16 +26,16 @@ namespace JabyEngine {
}
};
__declare_io_value(JOY_MODE, uint16_t) {
__declare_io_struct(JOY_MODE, uint16_t) {
static constexpr JOY_MODE create() {
return JOY_MODE{0x000D};
}
};
__declare_io_value(JOY_RX_DATA, uint8_t) {
__declare_io_struct(JOY_RX_DATA, uint8_t) {
};
__declare_io_value(JOY_STAT, uint32_t) {
__declare_io_struct(JOY_STAT, uint32_t) {
static constexpr auto TXReadyStart = Bit(0);
static constexpr auto RXFifoNonEmpty = Bit(1);
static constexpr auto TXReadyFinished = Bit(2);
@@ -43,7 +43,7 @@ namespace JabyEngine {
static constexpr auto ACKIrqLow = Bit(7);
};
__declare_io_value(JOY_TX_DATA, uint32_t) {
__declare_io_struct(JOY_TX_DATA, uint32_t) {
static constexpr JOY_TX_DATA create(uint8_t byte) {
return JOY_TX_DATA{byte};
}