mirror of
https://github.com/tillitis/tillitis-key1.git
synced 2025-08-06 13:44:17 -04:00

The FPGA uwg30 package cannot use B3 as an input when an instance of SB_PLL40_CORE is placed. We swap fpga_cts and ch552_cts to make B3 (from here on fpga_cts) an output. For more info check out: FPGA-TN-02052-1-4-iCE40-sysCLOCK-PLL-Design-User-Guide.pdf chapter "5.1 PLL Placement Rules"
21 lines
418 B
C
21 lines
418 B
C
// SPDX-FileCopyrightText: 2024 Tillitis AB <tillitis.se>
|
|
// SPDX-License-Identifier: MIT
|
|
|
|
#ifndef __GPIO_H__
|
|
#define __GPIO_H__
|
|
|
|
#include <stdint.h>
|
|
|
|
#define PIN_P1_4 0x10
|
|
#define PIN_P1_5 0x20
|
|
|
|
#define PIN_FPGA_CTS PIN_P1_5
|
|
#define PIN_CH552_CTS PIN_P1_4
|
|
|
|
void gpio_set(uint8_t pin);
|
|
void gpio_unset(uint8_t pin);
|
|
uint8_t gpio_get(uint8_t pin);
|
|
|
|
void gpio_dir_in(uint8_t pin);
|
|
void gpio_dir_out(uint8_t pin);
|
|
#endif
|