39 lines
496 B
C
Raw Normal View History

2024-03-26 14:43:02 +01:00
#ifndef _PSG_H_
#define _PSG_H_
2024-03-26 16:47:42 +01:00
#include <stdint.h>
2024-03-26 14:43:02 +01:00
2024-03-26 15:05:39 +01:00
typedef enum {
e_O_1 = 0,
e_O_2,
e_O_3,
e_O_4,
e_O_5,
e_O_6,
e_O_7,
e_O_8
} t_octave;
typedef enum {
e_C = 0,
e_Cis,
e_D,
e_Dis,
e_E,
e_F,
e_Fis,
e_G,
e_Gis,
e_A,
e_Ais,
e_H
} t_note;
void psgInit();
2024-03-26 14:43:02 +01:00
void psgPlayTone(uint8_t channel, t_octave octave, t_note note);
2024-03-26 16:47:42 +01:00
void psgWriteFrequency(uint8_t channel, uint16_t frequencyCode);
void psgWrite(uint8_t address, uint8_t data);
2024-03-26 14:43:02 +01:00
#endif // _PSG_H_