Skip to content

Commit

Permalink
feat(vendor HAL command): add Get PM Debug Info command
Browse files Browse the repository at this point in the history
  • Loading branch information
OueslatiGhaith committed Jan 8, 2024
1 parent 8fb7d28 commit 9fd84a1
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
16 changes: 15 additions & 1 deletion src/vendor/command/hal.rs
Original file line number Diff line number Diff line change
Expand Up @@ -153,13 +153,22 @@ pub trait HalCommands {
/// that will be enabled.
async fn set_event_mask(&mut self, mask: HalEventFlags);

// TODO: get_pm_debug_info
/// This command is used to retreive Tx, Rx, and total buffer count allocated for ACL packets.
// TODO: this command returns an event, check if it exists
async fn get_pm_debug_info(&mut self);

// TODO: set_peripheral_latency

// TODO: read_rssi

// TODO: read_radio_reg

// TODO: read_raw_rssi

// TODO: rx_start

// TODO: rx_stop

// TODO: stack_reset
}

Expand Down Expand Up @@ -238,6 +247,11 @@ impl<T: Controller> HalCommands for T {
self.controller_write(crate::vendor::opcode::HAL_SET_EVENT_MASK, &payload)
.await;
}

async fn get_pm_debug_info(&mut self) {
self.controller_write(crate::vendor::opcode::HAL_GET_PM_DEBUG_INFO, &[])
.await;
}
}

/// Potential errors from parameter validation.
Expand Down
1 change: 1 addition & 0 deletions src/vendor/opcode.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ vendor_opcodes! {
// length (7 bits). The C source code has 0x19, which is valid.
pub const HAL_GET_ANCHOR_PERIOD = 0x19;
pub const HAL_SET_EVENT_MASK = 0x1A;
pub const HAL_GET_PM_DEBUG_INFO = 0x1C;
}
Gap = 0x1;
{
Expand Down

0 comments on commit 9fd84a1

Please sign in to comment.