File SR_4021.cpp¶
FileList > examples > SR_4021 > SR_4021.cpp
Go to the source code of this file
#include "daisy_seed.h"
Public Types¶
Type | Name |
---|---|
typedef daisy::ShiftRegister4021< 1, 1 > | ButtonSr |
Public Attributes¶
Type | Name |
---|---|
uint8_t | btn_data |
uint32_t | btn_rising_edge_time |
ButtonSr | btn_shiftreg |
daisy::GPIO | callback_pin |
daisy::DaisySeed | hw |
Public Static Attributes¶
Type | Name |
---|---|
constexpr daisy::Pin | kCallbackPin = daisy::seed::D23 |
constexpr daisy::Pin | kPinSrClk = daisy::seed::D7 |
constexpr daisy::Pin | kPinSrData = daisy::seed::D19 |
constexpr daisy::Pin | kPinSrLatch = daisy::seed::D21 |
constexpr uint32_t | kUsbPrintPeriod = 250 |
Public Functions¶
Type | Name |
---|---|
void | AudioCallback (daisy::AudioHandle::InputBuffer in, daisy::AudioHandle::OutputBuffer out, size_t size) |
int | main (void) |
Public Types Documentation¶
typedef ButtonSr¶
SR 4021 Example This demonstrates the use of an CD4021 input shift register to read 8 buttons. Some auxillary code is included to debounce, and time the length presses.
The AudioCallback is utilized to read the buttons at 1kHz. Values are output via the USB Micro port.
Public Attributes Documentation¶
variable btn_data¶
variable btn_rising_edge_time¶
variable btn_shiftreg¶
variable callback_pin¶
variable hw¶
Public Static Attributes Documentation¶
variable kCallbackPin¶
variable kPinSrClk¶
variable kPinSrData¶
variable kPinSrLatch¶
variable kUsbPrintPeriod¶
Public Functions Documentation¶
function AudioCallback¶
void AudioCallback (
daisy::AudioHandle::InputBuffer in,
daisy::AudioHandle::OutputBuffer out,
size_t size
)
function main¶
The documentation for this class was generated from the following file external-docs/libDaisy/examples/SR_4021/SR_4021.cpp