Skip to content

Commit

Permalink
hell yeah
Browse files Browse the repository at this point in the history
  • Loading branch information
penguinencounter committed Sep 9, 2024
1 parent ee0464c commit b0eb578
Showing 1 changed file with 62 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,69 @@ class UARTBridgeI2CDevice(deviceClient: I2cDeviceSynch, deviceClientIsOwned: Boo

override fun getDeviceName() = "SandboxElectronics_SC16IS750_I2C_UART_Bridge"

enum class Register(val byteN: Byte) {
/**
* Receive Holding Register (read only)
*/
RHR(0x00),

/**
* Transmit Holding Register (write only)
*/
THR(0x00),

/**
* Interrupt Enable Register (read/write)
*/
IER(0x01),

/**
* Interrupt Identification Register (read)
* Do not burst-read
*/
IIR(0x02),

/**
* FIFO Control Register (write)
*/
FCR(0x02),

/**
* Line Control Register (read)
*/
LCR(0x03),

/**
* Modem Control Register (read)
*/
MCR(0x04),
LSR(0x05),
MSR(0x06),
SPR(0x07),
TCR(0x06),
TLR(0x07),
TXLVL(0x08),
RXLVL(0x09),
IODir(0x0a),
IOState(0x0b),
IOIntEna(0x0c),
RESERVED1(0x0d),
IOControl(0x0e),
EFCR(0x0f),

DLL(0x00),
DLH(0x01),

EFR(0x02),
XON1(0x04),
XON2(0x05),
XOFF1(0x06),
XOFF2(0x07)
}

@Synchronized
override fun doInitialize(): Boolean {
deviceClient.read

TODO()
}
}

0 comments on commit b0eb578

Please sign in to comment.