Tidy a few things
This commit is contained in:
parent
f91af513b7
commit
d3c3c9eac4
|
@ -31,8 +31,8 @@
|
|||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#include "common-hal/adcbuffer/Bufferedinput.h"
|
||||
#include "shared-bindings/adcbuffer/Bufferedinput.h"
|
||||
#include "common-hal/adcbuffer/BufferedInput.h"
|
||||
#include "shared-bindings/adcbuffer/BufferedInput.h"
|
||||
#include "shared-bindings/microcontroller/Pin.h"
|
||||
#include "py/runtime.h"
|
||||
#include "supervisor/shared/translate/translate.h"
|
||||
|
|
|
@ -1 +1 @@
|
|||
// No analogio module functions.
|
||||
// No adcbuffer module functions.
|
||||
|
|
|
@ -387,6 +387,7 @@ SRC_COMMON_HAL_ALL = \
|
|||
_bleio/__init__.c \
|
||||
_pew/PewPew.c \
|
||||
_pew/__init__.c \
|
||||
adcbuffer/BufferedInput.c \
|
||||
alarm/SleepMemory.c \
|
||||
alarm/__init__.c \
|
||||
alarm/pin/PinAlarm.c \
|
||||
|
@ -482,12 +483,12 @@ SRC_C += \
|
|||
|
||||
endif
|
||||
|
||||
ifeq ($(CIRCUITPYTHON_ADCBUFFER),1)
|
||||
#ifeq ($(CIRCUITPYTHON_ADCBUFFER),1)
|
||||
# Needed for ADCBUFFER
|
||||
SRC_COMMON_HAL_ALL += \
|
||||
adcbuffer/BufferedInput.c \
|
||||
|
||||
endif
|
||||
#SRC_COMMON_HAL_ALL += \
|
||||
# adcbuffer/BufferedInput.c \
|
||||
#
|
||||
#endif
|
||||
|
||||
|
||||
SRC_COMMON_HAL = $(filter $(SRC_PATTERNS), $(SRC_COMMON_HAL_ALL))
|
||||
|
|
|
@ -65,7 +65,7 @@ CFLAGS += -DCIRCUITPY_ALARM=$(CIRCUITPY_ALARM)
|
|||
CIRCUITPY_ANALOGIO ?= 1
|
||||
CFLAGS += -DCIRCUITPY_ANALOGIO=$(CIRCUITPY_ANALOGIO)
|
||||
|
||||
CIRCUITPY_ADCBUFFER ?= 0
|
||||
CIRCUITPY_ADCBUFFER ?= 1
|
||||
CFLAGS += -DCIRCUITPY_ADCBUFFER=$(CIRCUITPY_ADCBUFFER)
|
||||
|
||||
CIRCUITPY_ATEXIT ?= $(CIRCUITPY_FULL_BUILD)
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
#define MICROPY_INCLUDED_SHARED_BINDINGS_ADCBUFFER_BUFFEREDINPUT_H
|
||||
|
||||
#include "common-hal/microcontroller/Pin.h"
|
||||
#include "common-hal/adcbuffer/Bufferedinput.h"
|
||||
#include "common-hal/adcbuffer/BufferedInput.h"
|
||||
|
||||
// #ifdef CIRCUITPY_BUFFEREDINPUT #endif
|
||||
|
||||
|
|
|
@ -30,47 +30,47 @@
|
|||
#include "shared-bindings/adcbuffer/__init__.h"
|
||||
#include "shared-bindings/adcbuffer/BufferedInput.h"
|
||||
|
||||
// #ifdef CIRCUITPY_BUFFEREDINPUT#endif
|
||||
/// #ifdef CIRCUITPY_BUFFEREDINPUT#endif
|
||||
|
||||
//| """Analog buffered hardware support
|
||||
//|
|
||||
//| The `adcbuffer` module contains classes to provide access to analog-to-digital
|
||||
//| conversion and digital-to-analog (DAC) for multiple value transfer.
|
||||
//|
|
||||
//| All classes change hardware state and should be deinitialized when they
|
||||
//| are no longer needed if the program continues after use. To do so, either
|
||||
//| call :py:meth:`!deinit` or use a context manager. See
|
||||
//| :ref:`lifetime-and-contextmanagers` for more info.
|
||||
//|
|
||||
//| For example::
|
||||
//|
|
||||
//| import adcbuffer
|
||||
/// """Analog buffered hardware support
|
||||
///
|
||||
/// The `adcbuffer` module contains classes to provide access to analog-to-digital
|
||||
/// conversion and digital-to-analog (DAC) for multiple value transfer.
|
||||
///
|
||||
/// All classes change hardware state and should be deinitialized when they
|
||||
/// are no longer needed if the program continues after use. To do so, either
|
||||
/// call :py:meth:`!deinit` or use a context manager. See
|
||||
/// :ref:`lifetime-and-contextmanagers` for more info.
|
||||
///
|
||||
/// For example::
|
||||
///
|
||||
/// import adcbuffer
|
||||
/// import array
|
||||
//| from board import *
|
||||
//|
|
||||
/// from board import *
|
||||
///
|
||||
/// length = 5000000
|
||||
/// mybuffer = array.array("H", [0] * length)
|
||||
//| adcbuf_obj = adcbuffer.BufferdInPut(GP26, mybuffer, length)
|
||||
//| adcbuffer.readmultiple()
|
||||
//| print(*mybuffer)
|
||||
//| adcbuf_obj.deinit()
|
||||
//|
|
||||
//| This example will initialize the the device, read and fill
|
||||
//| :py:data:`~adcbuffer.BufferdInPut` to mybuffer and then
|
||||
//| :py:meth:`~adcbuffer.BufferedInPut.deinit` the hardware. The last step is optional
|
||||
//| because CircuitPython will do it automatically after the program finishes.
|
||||
//|
|
||||
//| TODO: For the essentials of `adcbuffer`, see the `CircuitPython Essentials
|
||||
//| Learn guide <https://learn.adafruit.com/circuitpython-essentials/circuitpython-adcbuffer>`_
|
||||
//|
|
||||
//| TODO: For more information on using `adcbuffer`, see `this additional Learn guide
|
||||
//| <https://learn.adafruit.com/circuitpython-advanced-analog-inputs-and-outputs>`_
|
||||
//| """
|
||||
//|
|
||||
/// adcbuf_obj = adcbuffer.BufferedInPut(GP26, mybuffer, length)
|
||||
/// adcbuffer.readmultiple()
|
||||
/// print(*mybuffer)
|
||||
/// adcbuf_obj.deinit()
|
||||
///
|
||||
/// This example will initialize the the device, read and fill
|
||||
/// :py:data:`~adcbuffer.BufferedInPut` to mybuffer and then
|
||||
/// :py:meth:`~adcbuffer.BufferedInPut.deinit` the hardware. The last step is optional
|
||||
/// because CircuitPython will do it automatically after the program finishes.
|
||||
///
|
||||
/// TODO: For the essentials of `adcbuffer`, see the `CircuitPython Essentials
|
||||
/// Learn guide <https://learn.adafruit.com/circuitpython-essentials/circuitpython-adcbuffer>`_
|
||||
///
|
||||
/// TODO: For more information on using `adcbuffer`, see `this additional Learn guide
|
||||
/// <https://learn.adafruit.com/circuitpython-advanced-analog-inputs-and-outputs>`_
|
||||
/// """
|
||||
///
|
||||
|
||||
STATIC const mp_rom_map_elem_t adcbuffer_module_globals_table[] = {
|
||||
{ MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_adcbuffer) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_Bufferedinput), MP_ROM_PTR(&adcbuffer_bufferedinput_type) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_BufferedInput), MP_ROM_PTR(&adcbuffer_bufferedinput_type) },
|
||||
// #ifdef CIRCUITPY_BUFFEREDINPUT #endif
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue