Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updade: Integrations navigator 0.3.1 - lib: PWM: Add get_pwm_enable #60

Merged
merged 1 commit into from Mar 4, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
13 changes: 13 additions & 0 deletions src/lib.rs
Expand Up @@ -350,6 +350,18 @@ fn set_pwm_enable(state: bool) {
with_navigator!().set_pwm_enable(state)
}

#[cpy_fn]
#[comment_c = "Get the PWM chip (PCA9685)'s OE_pin state"]
#[comment_py = "Get the PWM chip (PCA9685)'s OE_pin state.\n
Returns:\n
bool: `True` -> ON, `False` -> OFF.\n
Examples:\n
Please check :py:func:`set_pwm_channel_value`\n
>>> navigator.get_pwm_enable()"]
fn get_pwm_enable() -> bool {
with_navigator!().get_pwm_enable()
}

#[cpy_fn]
#[comment_c = "LOW_LEVEL: Sets the PWM frequency of the PCA9685 chip. All channels use the same frequency."]
#[comment_py = "LOW_LEVEL: Sets the PWM frequency of the PCA9685 chip. All channels use the same frequency.\n\n
Expand Down Expand Up @@ -507,6 +519,7 @@ cpy_module!(
read_accel,
read_gyro,
set_pwm_enable,
get_pwm_enable,
set_pwm_freq_prescale,
set_pwm_freq_hz,
set_pwm_channel_value,
Expand Down