libDaisy
Hardware Library for Daisy
Loading...
Searching...
No Matches
sr_595.h
Go to the documentation of this file.
1#pragma once
2#ifndef DSY_DEV_SR_595_H
3#define DSY_DEV_SR_595_H
4
5#include "daisy_core.h"
6#include "per/gpio.h"
7
8namespace daisy
9{
11 = 16;
24{
25 public:
39
45 void Init(Pin *pin_cfg, size_t num_daisy_chained = 1);
46
51 void Set(uint8_t idx, bool state);
52
55 void Write();
56
57 private:
58 GPIO pin_[NUM_PINS];
60 size_t num_devices_;
61};
62} // namespace daisy
63
64#endif
General Purpose I/O control.
Definition gpio.h:22
Definition leddriver.h:33
Device Driver for 8-bit shift register. CD74HC595 - 8-bit serial to parallel output shift.
Definition sr_595.h:24
void Set(uint8_t idx, bool state)
ShiftRegister595()
Definition sr_595.h:37
Pins
Definition sr_595.h:31
~ShiftRegister595()
Definition sr_595.h:38
void Init(Pin *pin_cfg, size_t num_daisy_chained=1)
@ PIN_DATA
Definition sr_595.h:34
@ NUM_PINS
Definition sr_595.h:35
@ PIN_CLK
Definition sr_595.h:33
@ PIN_LATCH
Definition sr_595.h:32
Hardware defines and helpers for daisy field platform.
Definition index.h:2
const size_t kMaxSr595DaisyChain
Definition sr_595.h:11
representation of hardware port/pin combination
Definition daisy_core.h:193