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

12
src/Cargo.lock generated
View File

@ -224,7 +224,7 @@ dependencies = [
[[package]] [[package]]
name = "libasync" name = "libasync"
version = "0.0.0" 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 = [ dependencies = [
"embedded-hal", "embedded-hal",
"libcortex_a9", "libcortex_a9",
@ -256,7 +256,7 @@ dependencies = [
[[package]] [[package]]
name = "libboard_zynq" name = "libboard_zynq"
version = "0.0.0" 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 = [ dependencies = [
"bit_field", "bit_field",
"embedded-hal", "embedded-hal",
@ -281,7 +281,7 @@ dependencies = [
[[package]] [[package]]
name = "libconfig" name = "libconfig"
version = "0.1.0" 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 = [ dependencies = [
"core_io", "core_io",
"fatfs", "fatfs",
@ -292,7 +292,7 @@ dependencies = [
[[package]] [[package]]
name = "libcortex_a9" name = "libcortex_a9"
version = "0.0.0" 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 = [ dependencies = [
"bit_field", "bit_field",
"libregister", "libregister",
@ -308,7 +308,7 @@ checksum = "c7d73b3f436185384286bd8098d17ec07c9a7d2388a6599f824d8502b529702a"
[[package]] [[package]]
name = "libregister" name = "libregister"
version = "0.0.0" 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 = [ dependencies = [
"bit_field", "bit_field",
"vcell", "vcell",
@ -318,7 +318,7 @@ dependencies = [
[[package]] [[package]]
name = "libsupport_zynq" name = "libsupport_zynq"
version = "0.0.0" 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 = [ dependencies = [
"cc", "cc",
"compiler_builtins", "compiler_builtins",

View File

@ -8,8 +8,8 @@ edition = "2018"
name = "libboard_artiq" name = "libboard_artiq"
[features] [features]
target_zc706 = [] target_zc706 = ["libboard_zynq/target_zc706", "libconfig/target_zc706"]
target_kasli_soc = [] target_kasli_soc = ["libboard_zynq/target_kasli_soc", "libconfig/target_kasli_soc"]
[build-dependencies] [build-dependencies]
build_zynq = { path = "../libbuild_zynq" } 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")] #[cfg(feature = "target_kasli_soc")]
{ {
i2c.pca9548_select(0x70, 0)?; i2c.pca954x_select(0x70, None)?;
i2c.pca9548_select(0x71, 1 << 3)?; i2c.pca954x_select(0x71, Some(3))?;
} }
#[cfg(feature = "target_zc706")] #[cfg(feature = "target_zc706")]
{ {
i2c.pca9548_select(0x74, 1 << 4)?; i2c.pca954x_select(0x74, Some(4))?;
} }
if ident(i2c)? != 0x0182 { if ident(i2c)? != 0x0182 {