-
Notifications
You must be signed in to change notification settings - Fork 1
/
board.h
51 lines (41 loc) · 1.26 KB
/
board.h
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
48
49
50
/*
* groms-hw.h
*
* GROM hardware dependent definitions. The idea is to create versions
* of this file for the several platforms I have created:
* - StrangeCart
* - TI-GROMmy
* - TI-SuperGROMmy
* - TI-picocart
*
* This version for picocart
*
* Created on: 30 Dec 2022
* Author: erikpiehl
*/
#ifndef _BOARD_H_
#define _BOARD_H_
// GPIO bidirection databus is at bits 8..15
#define PCn_D0 8
#define PCn_D7 15
#define PCn_DATAMASK 0x0000FF00
// GPIO input bit numbers
#define PCnI_ROMCS 19
#define PCnI_WE 18
#define PCnI_GS 17
#define PCnI_DBIN 16
// GPIO control outputs
#define PCnO_CSLOA 6 // Drive low address to databus (active low)
#define PCnO_CSHIA 7 // Drive high address to databus (active low)
#define PCnO_CSDAT 21 // Activate databus buffer (careful!)
#define PCnO_DDIR 20 // Set direction of databus buffer (1=read,0=write)
#define PCnO_GRDY 22 // Drive GREADY low when zero, tristate when 1
#define PCnO_DEBUG26 26 // Labeled ADC0 on the picocart.
#define PCnO_DEBUG27 27
#define PCnI_BA0 28 // Labeled ADC2. Connected to address line 0.
#define LED_PIN 25
void init_grom_server();
unsigned grom_cs_low_process();
unsigned rom_server();
uint16_t read_address();
#endif