mirror of
https://github.com/lupyuen/pinephone-nuttx.git
synced 2025-01-13 05:08:32 +08:00
Adding Long Packet
This commit is contained in:
parent
cde3404d46
commit
f629019379
1 changed files with 25 additions and 0 deletions
25
display.zig
25
display.zig
|
@ -77,6 +77,31 @@ pub export fn nuttx_mipi_dsi_dcs_write(
|
|||
return 0;
|
||||
}
|
||||
|
||||
// TODO: Compose Long Packet: https://lupyuen.github.io/articles/dsi#long-packet-for-mipi-dsi
|
||||
// Packet Header (4 bytes):
|
||||
// - Data Identifier (DI) (1 byte):
|
||||
// Virtual Channel Identifier (Bits 6 to 7)
|
||||
// Data Type (Bits 0 to 5)
|
||||
// (Virtual Channel should be 0, I think)
|
||||
//
|
||||
// - Word Count (WC) (2 bytes):
|
||||
// Number of bytes in the Packet Payload
|
||||
//
|
||||
// - Error Correction Code (ECC) (1 byte):
|
||||
// Allow single-bit errors to be corrected and 2-bit errors to be detected in the Packet Header
|
||||
// See "12.3.6.12: Error Correction Code", Page 208:
|
||||
// https://github.com/sipeed/sipeed2022_autumn_competition/blob/main/assets/BL808_RM_en.pdf)
|
||||
//
|
||||
// Packet Payload:
|
||||
// - Data (0 to 65,541 bytes):
|
||||
// Number of data bytes should match the Word Count (WC)
|
||||
//
|
||||
// Packet Footer:
|
||||
// - Checksum (CS) (2 bytes):
|
||||
// 16-bit Cyclic Redundancy Check (CRC)
|
||||
// See "12.3.6.13: Packet Footer", Page 210:
|
||||
// https://github.com/sipeed/sipeed2022_autumn_competition/blob/main/assets/BL808_RM_en.pdf)
|
||||
|
||||
/// MIPI DSI Device
|
||||
pub const mipi_dsi_device = extern struct {
|
||||
/// Number of Data Lanes
|
||||
|
|
Loading…
Reference in a new issue