samd/machine_dac: Add the machine.DAC class.
It suuports 1 channel @ 10 bit for SAMD21, 2 channels @ 12 bit for SAMD51.
Instantiation by:
dac = machine.DAC(ch) # 0 or 1
Method write:
dac.write(value)
The output voltage range is 0..Vdd.
This commit is contained in:
@@ -29,6 +29,7 @@
|
||||
#include "py/obj.h"
|
||||
|
||||
extern const mp_obj_type_t machine_adc_type;
|
||||
extern const mp_obj_type_t machine_dac_type;
|
||||
extern const mp_obj_type_t machine_hw_i2c_type;
|
||||
extern const mp_obj_type_t machine_led_type;
|
||||
extern const mp_obj_type_t machine_pin_type;
|
||||
|
||||
Reference in New Issue
Block a user