kasli_soc: add SFP0..3 LED indication #242

Merged
sb10q merged 2 commits from morgan/artiq-zynq:feature into master 2023-07-24 16:30:15 +08:00
1 changed files with 10 additions and 8 deletions
Showing only changes of commit a87b0e388b - Show all commits

View File

@ -21,13 +21,15 @@ const IO_DIR_OUT_SFP0_LED: u8 = !0x40;
const IO_DIR_OUT_SFP0_LED: u8 = !0x80; const IO_DIR_OUT_SFP0_LED: u8 = !0x80;
//IO expander port direction //IO expander port direction
const IO_DIR_MAPPING0: [u8; 2] = [IO_DIR_INPUT_ALL & IO_DIR_OUT_SFP_TX_DISABLE & (IO_DIR_OUT_SFP0_LED), const IO_DIR_MAPPING0: [u8; 2] = [
IO_DIR_INPUT_ALL & IO_DIR_OUT_SFP_TX_DISABLE & IO_DIR_OUT_SFP_LED]; IO_DIR_INPUT_ALL & IO_DIR_OUT_SFP_TX_DISABLE & (IO_DIR_OUT_SFP0_LED),
IO_DIR_INPUT_ALL & IO_DIR_OUT_SFP_TX_DISABLE & IO_DIR_OUT_SFP_LED,
const IO_DIR_MAPPING1: [u8; 2] = [IO_DIR_INPUT_ALL & IO_DIR_OUT_SFP_TX_DISABLE & IO_DIR_OUT_SFP_LED, ];
IO_DIR_INPUT_ALL & IO_DIR_OUT_SFP_TX_DISABLE & IO_DIR_OUT_SFP_LED];
const IO_DIR_MAPPING1: [u8; 2] = [
IO_DIR_INPUT_ALL & IO_DIR_OUT_SFP_TX_DISABLE & IO_DIR_OUT_SFP_LED,
IO_DIR_INPUT_ALL & IO_DIR_OUT_SFP_TX_DISABLE & IO_DIR_OUT_SFP_LED,
];
pub struct IoExpander<'a> { pub struct IoExpander<'a> {
i2c: &'a mut i2c::I2c, i2c: &'a mut i2c::I2c,