missing files
This commit is contained in:
parent
f6a42d9fb0
commit
e754a6b2d8
3 changed files with 181 additions and 0 deletions
32
firmware/MotionControllerRP/src/robot_tool/pwm_tool.h
Normal file
32
firmware/MotionControllerRP/src/robot_tool/pwm_tool.h
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
// --------------------------------------------------------------------------------------
|
||||
// Project: MicroManipulatorStepper
|
||||
// License: MIT (see LICENSE file for full description)
|
||||
// All text in here must be included in any redistribution.
|
||||
// Author: M. S. (diffraction limited)
|
||||
// --------------------------------------------------------------------------------------
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "pico/stdlib.h"
|
||||
#include "hardware/pio.h"
|
||||
#include "hardware/clocks.h"
|
||||
#include "robot_tool_interface.h"
|
||||
|
||||
//*** CLASS *****************************************************************************
|
||||
|
||||
//--- PwmTool ---------------------------------------------------------------------------
|
||||
|
||||
class PwmTool : public IRobotTool {
|
||||
public:
|
||||
~PwmTool() {};
|
||||
|
||||
void init(int output_pin, int frequency, int resolution_bits);
|
||||
void set_value(float v) override;
|
||||
|
||||
private:
|
||||
PIO pio = pio0;
|
||||
int state_machine = 0;
|
||||
int output_pin = 0;
|
||||
|
||||
uint32_t max_pwm = 0;
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue