Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
cbiffle committed Jan 26, 2024
1 parent f7e4e48 commit 2652d17
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion app/gimlet/base.toml
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ register_defs = "gimlet-regs-b.json"
name = "task-gimlet-inspector"
priority = 6
features = ["vlan"]
max-sizes = {flash = 65536, ram = 8192 }
max-sizes = {flash = 16384, ram = 2048 }
stacksize = 1600
start = true
task-slots = ["net", {seq = "gimlet_seq"}]
Expand Down
13 changes: 7 additions & 6 deletions task/gimlet-inspector/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#![no_main]

use drv_gimlet_seq_api::{SeqError, Sequencer};
use gimlet_inspector_protocol::{Query, Request, SequencerRegistersResponse};
use gimlet_inspector_protocol::{QueryV0, Request, SequencerRegistersResponseV0};
use hubpack::SerializedSize;
use task_net_api::*;
use userlib::*;
Expand Down Expand Up @@ -47,22 +47,23 @@ fn main() -> ! {
};

match request {
Request::V0(Query::SequencerRegisters) => {
let (resp, trailer) = match seq.read_fpga_regs() {
Request::V0(QueryV0::SequencerRegisters) => {
let result = seq.read_fpga_regs();
let (resp, trailer) = match result {
Ok(regs) => (
SequencerRegistersResponse::Success,
SequencerRegistersResponseV0::Success,
Some(regs),
),
Err(SeqError::ServerRestarted) => (
SequencerRegistersResponse::SequencerTaskDead,
SequencerRegistersResponseV0::SequencerTaskDead,
None,
),
Err(_) => {
// The SeqError type represents a mashing
// together of all possible errors for all
// possible sequencer IPC operations. The only
// one we _expect_ here is ReadRegsFailed.
(SequencerRegistersResponse::SequencerReadRegsFailed, None)
(SequencerRegistersResponseV0::SequencerReadRegsFailed, None)
}
};
let mut len =
Expand Down

0 comments on commit 2652d17

Please sign in to comment.