-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathsn76489.cpp
48 lines (35 loc) · 840 Bytes
/
sn76489.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
/*
SignalDEV SoundBoard
Library for playing VGM music using legacy AY-3-891x and SN76489 with an Arduino
Created by Cecil Meeks (cbmeeks)
http://signaldev.com
http://meeks.co
BSD license, all text above must be included in any redistribution
*/
#include <Arduino.h>
#include "sn76489.h"
/*
Constructor
*/
SN76489::SN76489() {
// sr74595.begin(SR_74595_SI, SR_74595_RCK, SR_74595_SCK);
pinMode(SN76489_PIN_WE, OUTPUT);
pinMode(SN76489_PIN_CE, OUTPUT);
digitalWrite(SN76489_PIN_CE, LOW);
digitalWrite(SN76489_PIN_WE, HIGH);
}
void SN76489::disable() {
}
void SN76489::enable() {
}
/*
Write data to an SN76489
*/
void SN76489::write(uint8_t data) {
// sr74595.write(data);
// Strobe SN76489_PIN_WE
digitalWrite(SN76489_PIN_WE, LOW);
delayMicroseconds(5);
digitalWrite(SN76489_PIN_WE, HIGH);
}