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
9 = 16;
22{
23 public:
36
42 void Init(dsy_gpio_pin *pin_cfg, size_t num_daisy_chained = 1);
43
48 void Set(uint8_t idx, bool state);
49
52 void Write();
53
54 private:
55 dsy_gpio pin_[NUM_PINS];
56 uint8_t state_[kMaxSr595DaisyChain];
57 size_t num_devices_;
58};
59
60#endif
Device Driver for 8-bit shift register. CD74HC595 - 8-bit serial to parallel output shift.
Definition sr_595.h:22
void Set(uint8_t idx, bool state)
Pins
Definition sr_595.h:28
@ PIN_LATCH
Definition sr_595.h:29
@ PIN_CLK
Definition sr_595.h:30
@ NUM_PINS
Definition sr_595.h:32
@ PIN_DATA
Definition sr_595.h:31
ShiftRegister595()
Definition sr_595.h:34
void Init(dsy_gpio_pin *pin_cfg, size_t num_daisy_chained=1)
~ShiftRegister595()
Definition sr_595.h:35
const size_t kMaxSr595DaisyChain
Definition sr_595.h:9
Definition daisy_core.h:205
Definition gpio.h:175