Support Controller
This commit is contained in:
@@ -106,7 +106,9 @@ namespace JabyEngine {
|
||||
return (ButtonState::was_down(button) && !ButtonState::is_down(button));
|
||||
}
|
||||
|
||||
friend class RawController;
|
||||
friend class RawController;
|
||||
friend struct ControllerHelper;
|
||||
friend void query_controller();
|
||||
};
|
||||
|
||||
Header header;
|
||||
|
@@ -3,6 +3,15 @@
|
||||
|
||||
namespace JabyEngine {
|
||||
namespace Periphery_IO {
|
||||
__declare_io_value(JOY_TX_DATA, uint32_t) {
|
||||
static constexpr JOY_TX_DATA create(uint8_t byte) {
|
||||
return JOY_TX_DATA{byte};
|
||||
}
|
||||
};
|
||||
|
||||
__declare_io_value(JOY_RX_DATA, uint8_t) {
|
||||
};
|
||||
|
||||
__declare_io_value(JOY_STAT, uint32_t) {
|
||||
static constexpr auto TXReadyStart = Bit(0);
|
||||
static constexpr auto RXFifoNonEmpty = Bit(1);
|
||||
@@ -48,8 +57,8 @@ namespace JabyEngine {
|
||||
}
|
||||
};
|
||||
|
||||
__declare_io_port_w_type(, uint8_t, JOY_TX_DATA, 0x1F801040);
|
||||
__declare_io_port_w_type(const, uint8_t, JOY_RX_DATA, 0x1F801040);
|
||||
__declare_io_port(, JOY_TX_DATA, 0x1F801040);
|
||||
__declare_io_port(const, JOY_RX_DATA, 0x1F801040);
|
||||
__declare_io_port(const, JOY_STAT, 0x1F801044);
|
||||
__declare_io_port(, JOY_MODE, 0x1F801048);
|
||||
__declare_io_port(, JOY_CTRL, 0x1F80104A);
|
||||
|
Reference in New Issue
Block a user