Pi Firmware: Final set of gpio changes for CPLD

Change-Id: I6e287507185cd703ee40c6b1f5a60279c892fb14
issue_1022
David Banks 2018-06-12 12:41:38 +01:00
rodzic 2f05954d32
commit f3a3ad241a
2 zmienionych plików z 23 dodań i 19 usunięć

Wyświetl plik

@ -122,13 +122,13 @@
#define SW3_PIN (19) // active low
#define PSYNC_PIN (17)
#define CSYNC_PIN (23)
#define MODE7_PIN (22)
#define MODE7_PIN (25)
#define GPCLK_PIN (21)
#define SP_CLK_PIN (20)
#define SP_CLKEN_PIN (1)
#define SP_DATA_PIN (0)
#define MUX_PIN (24)
#define LINK_PIN (25)
#define SPARE_PIN (22)
#define VERSION_PIN (18) // active low, connects to GSR
// LED1 is left LED, driven by the Pi

Wyświetl plik

@ -319,24 +319,28 @@ static void init_hardware() {
for (i = 0; i < 12; i++) {
RPI_SetGpioPinFunction(PIXEL_BASE + i, FS_INPUT);
}
RPI_SetGpioPinFunction(PSYNC_PIN, FS_INPUT);
RPI_SetGpioPinFunction(CSYNC_PIN, FS_INPUT);
RPI_SetGpioPinFunction(MODE7_PIN, FS_OUTPUT);
RPI_SetGpioPinFunction(SP_CLK_PIN, FS_OUTPUT);
RPI_SetGpioPinFunction(SP_CLKEN_PIN, FS_OUTPUT);
RPI_SetGpioPinFunction(SP_DATA_PIN, FS_OUTPUT);
RPI_SetGpioPinFunction(MUX_PIN, FS_OUTPUT);
RPI_SetGpioPinFunction(LED1_PIN, FS_OUTPUT);
RPI_SetGpioPinFunction(SW1_PIN, FS_INPUT);
RPI_SetGpioPinFunction(LINK_PIN, FS_INPUT);
RPI_SetGpioPinFunction(VERSION_PIN, FS_OUTPUT);
RPI_SetGpioPinFunction(PSYNC_PIN, FS_INPUT);
RPI_SetGpioPinFunction(CSYNC_PIN, FS_INPUT);
RPI_SetGpioPinFunction(SW1_PIN, FS_INPUT);
RPI_SetGpioPinFunction(SW2_PIN, FS_INPUT);
RPI_SetGpioPinFunction(SW3_PIN, FS_INPUT);
RPI_SetGpioPinFunction(SPARE_PIN, FS_INPUT);
RPI_SetGpioValue(VERSION_PIN, 1);
RPI_SetGpioValue(SP_CLK_PIN, 1);
RPI_SetGpioValue(SP_DATA_PIN, 0);
RPI_SetGpioValue(MUX_PIN, 0);
RPI_SetGpioValue(LED1_PIN, 1); // 1 is off
RPI_SetGpioValue(SP_CLKEN_PIN, 0);
RPI_SetGpioPinFunction(VERSION_PIN, FS_OUTPUT);
RPI_SetGpioPinFunction(MODE7_PIN, FS_OUTPUT);
RPI_SetGpioPinFunction(MUX_PIN, FS_OUTPUT);
RPI_SetGpioPinFunction(SP_CLK_PIN, FS_OUTPUT);
RPI_SetGpioPinFunction(SP_DATA_PIN, FS_OUTPUT);
RPI_SetGpioPinFunction(SP_CLKEN_PIN, FS_OUTPUT);
RPI_SetGpioPinFunction(LED1_PIN, FS_OUTPUT);
RPI_SetGpioValue(VERSION_PIN, 1);
RPI_SetGpioValue(MODE7_PIN, 1);
RPI_SetGpioValue(MUX_PIN, 0);
RPI_SetGpioValue(SP_CLK_PIN, 1);
RPI_SetGpioValue(SP_DATA_PIN, 0);
RPI_SetGpioValue(SP_CLKEN_PIN, 0);
RPI_SetGpioValue(LED1_PIN, 0); // active high
#ifdef DOUBLE_BUFFER
// This line enables IRQ interrupts