forked from M-Labs/nac3
1
0
Fork 0

updated zynq-rs with pca9547 support (#165)

Co-authored-by: mwojcik <mw@m-labs.hk>
Co-committed-by: mwojcik <mw@m-labs.hk>
This commit is contained in:
mwojcik 2022-02-11 13:53:58 +08:00 committed by sb10q
parent 412ae98266
commit accac99f48
4 changed files with 28 additions and 28 deletions

View File

@ -10,11 +10,11 @@
"src-sipyco": "src-sipyco"
},
"locked": {
"lastModified": 1643542736,
"narHash": "sha256-SXOAQ2hxwoT+zTrMZCtjlcf/i8phN4AwwCAwUlhufzc=",
"lastModified": 1644375232,
"narHash": "sha256-jd8sAlAz6xGQoxiRUV5ChtEjdjh4pdIksUPsqftcK5s=",
"ref": "master",
"rev": "dd3279e50622b5ceb1c24b4d1891f442cc0acce3",
"revCount": 7947,
"rev": "a0070d4396136b84e0a50a1c57ee72bcf4e7f6f9",
"revCount": 7961,
"type": "git",
"url": "https://github.com/m-labs/artiq.git"
},
@ -26,11 +26,11 @@
"mozilla-overlay": {
"flake": false,
"locked": {
"lastModified": 1638887313,
"narHash": "sha256-FMYV6rVtvSIfthgC1sK1xugh3y7muoQcvduMdriz4ag=",
"lastModified": 1643634764,
"narHash": "sha256-EcFlgzZnZSHwZixELYV1pa267t+u5mCeLhSNBeAA/+c=",
"owner": "mozilla",
"repo": "nixpkgs-mozilla",
"rev": "7c1e8b1dd6ed0043fb4ee0b12b815256b0b9de6f",
"rev": "f233fdc4ff6ba2ffeb1e3e3cd6d63bb1297d6996",
"type": "github"
},
"original": {
@ -42,11 +42,11 @@
"mozilla-overlay_2": {
"flake": false,
"locked": {
"lastModified": 1638887313,
"narHash": "sha256-FMYV6rVtvSIfthgC1sK1xugh3y7muoQcvduMdriz4ag=",
"lastModified": 1643634764,
"narHash": "sha256-EcFlgzZnZSHwZixELYV1pa267t+u5mCeLhSNBeAA/+c=",
"owner": "mozilla",
"repo": "nixpkgs-mozilla",
"rev": "7c1e8b1dd6ed0043fb4ee0b12b815256b0b9de6f",
"rev": "f233fdc4ff6ba2ffeb1e3e3cd6d63bb1297d6996",
"type": "github"
},
"original": {
@ -73,11 +73,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1642522226,
"narHash": "sha256-m/j9U8KYuwwxjwgRCjmEj8ejftvdMLJ+NGXh/L2I4FU=",
"lastModified": 1643503720,
"narHash": "sha256-tJic20ufuRnG8V+fTCd3YU6xl1ImxNspoEkXHct0AG4=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "610d4ea2750e064bf34b33fa38cb671edd893d3d",
"rev": "0f316e4d72daed659233817ffe52bf08e081b5de",
"type": "github"
},
"original": {
@ -169,11 +169,11 @@
]
},
"locked": {
"lastModified": 1643971355,
"narHash": "sha256-kaVxTtgdoEwB+PEorp72MXcaaaAh5U/LDnF3QKjsCco=",
"lastModified": 1644558411,
"narHash": "sha256-PC/gVlVLmtZCv1Tw8Xz5ZCTxqmS2osncg5hlt9BoJ/8=",
"ref": "master",
"rev": "e5e646f40eae3c04898266310a64c09b8c03dfbc",
"revCount": 597,
"rev": "3e95df1f640aa761740feaf9eec797acb58dd942",
"revCount": 604,
"type": "git",
"url": "https://git.m-labs.hk/m-labs/zynq-rs"
},

12
src/Cargo.lock generated
View File

@ -224,7 +224,7 @@ dependencies = [
[[package]]
name = "libasync"
version = "0.0.0"
source = "git+https://git.m-labs.hk/M-Labs/zynq-rs.git#57d8d8fbc7087863305721bcb8fdbdd13d65bd65"
source = "git+https://git.m-labs.hk/M-Labs/zynq-rs.git#3e95df1f640aa761740feaf9eec797acb58dd942"
dependencies = [
"embedded-hal",
"libcortex_a9",
@ -256,7 +256,7 @@ dependencies = [
[[package]]
name = "libboard_zynq"
version = "0.0.0"
source = "git+https://git.m-labs.hk/M-Labs/zynq-rs.git#57d8d8fbc7087863305721bcb8fdbdd13d65bd65"
source = "git+https://git.m-labs.hk/M-Labs/zynq-rs.git#3e95df1f640aa761740feaf9eec797acb58dd942"
dependencies = [
"bit_field",
"embedded-hal",
@ -281,7 +281,7 @@ dependencies = [
[[package]]
name = "libconfig"
version = "0.1.0"
source = "git+https://git.m-labs.hk/M-Labs/zynq-rs.git#57d8d8fbc7087863305721bcb8fdbdd13d65bd65"
source = "git+https://git.m-labs.hk/M-Labs/zynq-rs.git#3e95df1f640aa761740feaf9eec797acb58dd942"
dependencies = [
"core_io",
"fatfs",
@ -292,7 +292,7 @@ dependencies = [
[[package]]
name = "libcortex_a9"
version = "0.0.0"
source = "git+https://git.m-labs.hk/M-Labs/zynq-rs.git#57d8d8fbc7087863305721bcb8fdbdd13d65bd65"
source = "git+https://git.m-labs.hk/M-Labs/zynq-rs.git#3e95df1f640aa761740feaf9eec797acb58dd942"
dependencies = [
"bit_field",
"libregister",
@ -308,7 +308,7 @@ checksum = "c7d73b3f436185384286bd8098d17ec07c9a7d2388a6599f824d8502b529702a"
[[package]]
name = "libregister"
version = "0.0.0"
source = "git+https://git.m-labs.hk/M-Labs/zynq-rs.git#57d8d8fbc7087863305721bcb8fdbdd13d65bd65"
source = "git+https://git.m-labs.hk/M-Labs/zynq-rs.git#3e95df1f640aa761740feaf9eec797acb58dd942"
dependencies = [
"bit_field",
"vcell",
@ -318,7 +318,7 @@ dependencies = [
[[package]]
name = "libsupport_zynq"
version = "0.0.0"
source = "git+https://git.m-labs.hk/M-Labs/zynq-rs.git#57d8d8fbc7087863305721bcb8fdbdd13d65bd65"
source = "git+https://git.m-labs.hk/M-Labs/zynq-rs.git#3e95df1f640aa761740feaf9eec797acb58dd942"
dependencies = [
"cc",
"compiler_builtins",

View File

@ -8,8 +8,8 @@ edition = "2018"
name = "libboard_artiq"
[features]
target_zc706 = []
target_kasli_soc = []
target_zc706 = ["libboard_zynq/target_zc706", "libconfig/target_zc706"]
target_kasli_soc = ["libboard_zynq/target_kasli_soc", "libconfig/target_kasli_soc"]
[build-dependencies]
build_zynq = { path = "../libbuild_zynq" }

View File

@ -188,12 +188,12 @@ fn init(i2c: &mut I2c, timer: &mut GlobalTimer) -> Result<()> {
#[cfg(feature = "target_kasli_soc")]
{
i2c.pca9548_select(0x70, 0)?;
i2c.pca9548_select(0x71, 1 << 3)?;
i2c.pca954x_select(0x70, None)?;
i2c.pca954x_select(0x71, Some(3))?;
}
#[cfg(feature = "target_zc706")]
{
i2c.pca9548_select(0x74, 1 << 4)?;
i2c.pca954x_select(0x74, Some(4))?;
}
if ident(i2c)? != 0x0182 {