From ae50196186721372bbac91b5f3ffd10f8c7d019e Mon Sep 17 00:00:00 2001 From: whitequark Date: Mon, 14 May 2018 17:58:34 +0000 Subject: [PATCH] firmware: rename libproto to libproto_artiq. libproto_artiq only has ARTIQ-specific protocols. --- artiq/firmware/Cargo.lock | 8 ++++---- artiq/firmware/ksupport/Cargo.toml | 2 +- artiq/firmware/ksupport/lib.rs | 4 ++-- artiq/firmware/libboard_artiq/Cargo.toml | 2 +- artiq/firmware/libboard_artiq/drtioaux.rs | 2 +- artiq/firmware/libboard_artiq/lib.rs | 2 +- artiq/firmware/{libproto => libproto_artiq}/Cargo.toml | 4 ++-- .../{libproto => libproto_artiq}/analyzer_proto.rs | 0 .../{libproto => libproto_artiq}/drtioaux_proto.rs | 0 .../firmware/{libproto => libproto_artiq}/kernel_proto.rs | 0 artiq/firmware/{libproto => libproto_artiq}/lib.rs | 0 artiq/firmware/{libproto => libproto_artiq}/mgmt_proto.rs | 0 .../firmware/{libproto => libproto_artiq}/moninj_proto.rs | 0 artiq/firmware/{libproto => libproto_artiq}/rpc_proto.rs | 0 .../{libproto => libproto_artiq}/session_proto.rs | 0 artiq/firmware/runtime/Cargo.toml | 2 +- artiq/firmware/runtime/main.rs | 6 +++--- 17 files changed, 16 insertions(+), 16 deletions(-) rename artiq/firmware/{libproto => libproto_artiq}/Cargo.toml (89%) rename artiq/firmware/{libproto => libproto_artiq}/analyzer_proto.rs (100%) rename artiq/firmware/{libproto => libproto_artiq}/drtioaux_proto.rs (100%) rename artiq/firmware/{libproto => libproto_artiq}/kernel_proto.rs (100%) rename artiq/firmware/{libproto => libproto_artiq}/lib.rs (100%) rename artiq/firmware/{libproto => libproto_artiq}/mgmt_proto.rs (100%) rename artiq/firmware/{libproto => libproto_artiq}/moninj_proto.rs (100%) rename artiq/firmware/{libproto => libproto_artiq}/rpc_proto.rs (100%) rename artiq/firmware/{libproto => libproto_artiq}/session_proto.rs (100%) diff --git a/artiq/firmware/Cargo.lock b/artiq/firmware/Cargo.lock index 06347899b..b14a8b490 100644 --- a/artiq/firmware/Cargo.lock +++ b/artiq/firmware/Cargo.lock @@ -19,7 +19,7 @@ dependencies = [ "crc 1.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "io 0.0.0", "log 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", - "proto 0.0.0", + "proto_artiq 0.0.0", ] [[package]] @@ -133,7 +133,7 @@ dependencies = [ "cslice 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "dyld 0.0.0", "io 0.0.0", - "proto 0.0.0", + "proto_artiq 0.0.0", ] [[package]] @@ -182,7 +182,7 @@ version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] -name = "proto" +name = "proto_artiq" version = "0.0.0" dependencies = [ "byteorder 1.2.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -208,7 +208,7 @@ dependencies = [ "log 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", "logger_artiq 0.0.0", "managed 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", - "proto 0.0.0", + "proto_artiq 0.0.0", "smoltcp 0.4.0 (git+https://github.com/m-labs/smoltcp?rev=181083f)", "std_artiq 0.0.0", "unwind_backtrace 0.0.0", diff --git a/artiq/firmware/ksupport/Cargo.toml b/artiq/firmware/ksupport/Cargo.toml index 1ce4d6325..3318dc44d 100644 --- a/artiq/firmware/ksupport/Cargo.toml +++ b/artiq/firmware/ksupport/Cargo.toml @@ -18,4 +18,4 @@ io = { path = "../libio", features = ["byteorder"] } dyld = { path = "../libdyld" } board_misoc = { path = "../libboard_misoc" } board_artiq = { path = "../libboard_artiq" } -proto = { path = "../libproto" } +proto_artiq = { path = "../libproto_artiq" } diff --git a/artiq/firmware/ksupport/lib.rs b/artiq/firmware/ksupport/lib.rs index 9c5030da1..4122e75c7 100644 --- a/artiq/firmware/ksupport/lib.rs +++ b/artiq/firmware/ksupport/lib.rs @@ -11,7 +11,7 @@ extern crate io; extern crate dyld; extern crate board_misoc; extern crate board_artiq; -extern crate proto; +extern crate proto_artiq; use core::{mem, ptr, slice, str}; use cslice::{CSlice, AsCSlice}; @@ -19,7 +19,7 @@ use io::Cursor; use dyld::Library; use board_misoc::csr; use board_artiq::{mailbox, rpc_queue}; -use proto::{kernel_proto, rpc_proto}; +use proto_artiq::{kernel_proto, rpc_proto}; use kernel_proto::*; fn send(request: &Message) { diff --git a/artiq/firmware/libboard_artiq/Cargo.toml b/artiq/firmware/libboard_artiq/Cargo.toml index 0668d0e6c..776392d42 100644 --- a/artiq/firmware/libboard_artiq/Cargo.toml +++ b/artiq/firmware/libboard_artiq/Cargo.toml @@ -19,7 +19,7 @@ crc = { version = "1.7", default-features = false } log = { version = "0.4", default-features = false } io = { path = "../libio", features = ["byteorder"] } board_misoc = { path = "../libboard_misoc" } -proto = { path = "../libproto" } +proto_artiq = { path = "../libproto_artiq" } [features] uart_console = [] diff --git a/artiq/firmware/libboard_artiq/drtioaux.rs b/artiq/firmware/libboard_artiq/drtioaux.rs index 5253d8dd2..207f7baf1 100644 --- a/artiq/firmware/libboard_artiq/drtioaux.rs +++ b/artiq/firmware/libboard_artiq/drtioaux.rs @@ -5,7 +5,7 @@ use io::{Cursor, Error as IoError}; use io::proto::{ProtoRead, ProtoWrite}; use board_misoc::{csr::DRTIO, mem::DRTIO_AUX, clock}; -pub use proto::drtioaux_proto::Packet; +pub use proto_artiq::drtioaux_proto::Packet; pub type Result = result::Result; diff --git a/artiq/firmware/libboard_artiq/lib.rs b/artiq/firmware/libboard_artiq/lib.rs index 6ee367598..6f22153c7 100644 --- a/artiq/firmware/libboard_artiq/lib.rs +++ b/artiq/firmware/libboard_artiq/lib.rs @@ -9,7 +9,7 @@ extern crate crc; extern crate log; extern crate io; extern crate board_misoc; -extern crate proto; +extern crate proto_artiq; pub mod pcr; diff --git a/artiq/firmware/libproto/Cargo.toml b/artiq/firmware/libproto_artiq/Cargo.toml similarity index 89% rename from artiq/firmware/libproto/Cargo.toml rename to artiq/firmware/libproto_artiq/Cargo.toml index c1e980915..19b1884dd 100644 --- a/artiq/firmware/libproto/Cargo.toml +++ b/artiq/firmware/libproto_artiq/Cargo.toml @@ -1,10 +1,10 @@ [package] authors = ["M-Labs"] -name = "proto" +name = "proto_artiq" version = "0.0.0" [lib] -name = "proto" +name = "proto_artiq" path = "lib.rs" [dependencies] diff --git a/artiq/firmware/libproto/analyzer_proto.rs b/artiq/firmware/libproto_artiq/analyzer_proto.rs similarity index 100% rename from artiq/firmware/libproto/analyzer_proto.rs rename to artiq/firmware/libproto_artiq/analyzer_proto.rs diff --git a/artiq/firmware/libproto/drtioaux_proto.rs b/artiq/firmware/libproto_artiq/drtioaux_proto.rs similarity index 100% rename from artiq/firmware/libproto/drtioaux_proto.rs rename to artiq/firmware/libproto_artiq/drtioaux_proto.rs diff --git a/artiq/firmware/libproto/kernel_proto.rs b/artiq/firmware/libproto_artiq/kernel_proto.rs similarity index 100% rename from artiq/firmware/libproto/kernel_proto.rs rename to artiq/firmware/libproto_artiq/kernel_proto.rs diff --git a/artiq/firmware/libproto/lib.rs b/artiq/firmware/libproto_artiq/lib.rs similarity index 100% rename from artiq/firmware/libproto/lib.rs rename to artiq/firmware/libproto_artiq/lib.rs diff --git a/artiq/firmware/libproto/mgmt_proto.rs b/artiq/firmware/libproto_artiq/mgmt_proto.rs similarity index 100% rename from artiq/firmware/libproto/mgmt_proto.rs rename to artiq/firmware/libproto_artiq/mgmt_proto.rs diff --git a/artiq/firmware/libproto/moninj_proto.rs b/artiq/firmware/libproto_artiq/moninj_proto.rs similarity index 100% rename from artiq/firmware/libproto/moninj_proto.rs rename to artiq/firmware/libproto_artiq/moninj_proto.rs diff --git a/artiq/firmware/libproto/rpc_proto.rs b/artiq/firmware/libproto_artiq/rpc_proto.rs similarity index 100% rename from artiq/firmware/libproto/rpc_proto.rs rename to artiq/firmware/libproto_artiq/rpc_proto.rs diff --git a/artiq/firmware/libproto/session_proto.rs b/artiq/firmware/libproto_artiq/session_proto.rs similarity index 100% rename from artiq/firmware/libproto/session_proto.rs rename to artiq/firmware/libproto_artiq/session_proto.rs diff --git a/artiq/firmware/runtime/Cargo.toml b/artiq/firmware/runtime/Cargo.toml index a6f6e7c0f..2057502df 100644 --- a/artiq/firmware/runtime/Cargo.toml +++ b/artiq/firmware/runtime/Cargo.toml @@ -25,7 +25,7 @@ board_misoc = { path = "../libboard_misoc", features = ["uart_console", "smoltcp std_artiq = { path = "../libstd_artiq", features = ["alloc", "io_error_alloc"] } logger_artiq = { path = "../liblogger_artiq" } board_artiq = { path = "../libboard_artiq" } -proto = { path = "../libproto", features = ["log", "alloc"] } +proto_artiq = { path = "../libproto_artiq", features = ["log", "alloc"] } [dependencies.fringe] git = "https://github.com/m-labs/libfringe" diff --git a/artiq/firmware/runtime/main.rs b/artiq/firmware/runtime/main.rs index 3e888f266..7a7fe3c98 100644 --- a/artiq/firmware/runtime/main.rs +++ b/artiq/firmware/runtime/main.rs @@ -19,7 +19,7 @@ extern crate board_artiq; #[macro_use] extern crate std_artiq as std; extern crate logger_artiq; -extern crate proto; +extern crate proto_artiq; use core::convert::TryFrom; use smoltcp::wire::{EthernetAddress, IpAddress, IpCidr}; @@ -30,9 +30,9 @@ use board_misoc::ethmac; #[cfg(has_drtio)] use board_artiq::drtioaux; use board_artiq::{mailbox, rpc_queue}; -use proto::{mgmt_proto, moninj_proto, rpc_proto, session_proto,kernel_proto}; +use proto_artiq::{mgmt_proto, moninj_proto, rpc_proto, session_proto,kernel_proto}; #[cfg(has_rtio_analyzer)] -use proto::analyzer_proto; +use proto_artiq::analyzer_proto; #[cfg(has_rtio_core)] mod rtio_mgt;