From 5ddd4e10bd8ddb4a00a0ccd8982db3311ec5a9e7 Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Wed, 20 Jan 2016 00:00:07 -0800 Subject: altos: Add µPusb v3.0 project MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This replaces the ft230 with a stm32f04, saving a bit of BOM and giving us control over the firmware. Signed-off-by: Keith Packard --- src/mpusb-v3.0/ao_pins.h | 65 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 src/mpusb-v3.0/ao_pins.h (limited to 'src/mpusb-v3.0/ao_pins.h') diff --git a/src/mpusb-v3.0/ao_pins.h b/src/mpusb-v3.0/ao_pins.h new file mode 100644 index 00000000..0c211861 --- /dev/null +++ b/src/mpusb-v3.0/ao_pins.h @@ -0,0 +1,65 @@ +/* + * Copyright © 2012 Keith Packard + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; version 2 of the License. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. + */ + +/* Using TeleMetrum v1.9 board */ + +#ifndef _AO_PINS_H_ +#define _AO_PINS_H_ + +#define HAS_TASK_QUEUE 1 + +#define IS_FLASH_LOADER 0 + +#define AO_POWER_MANAGEMENT 1 + +/* 48MHz clock based on USB */ +#define AO_HSI48 1 + +/* HCLK = 48MHz */ +#define AO_AHB_PRESCALER 1 +#define AO_RCC_CFGR_HPRE_DIV STM_RCC_CFGR_HPRE_DIV_1 + +/* APB = 48MHz */ +#define AO_APB_PRESCALER 1 +#define AO_RCC_CFGR_PPRE_DIV STM_RCC_CFGR_PPRE_DIV_1 + +#define HAS_EEPROM 0 +#define USE_INTERNAL_FLASH 0 +#define USE_STORAGE_CONFIG 0 +#define USE_EEPROM_CONFIG 0 + +#define HAS_BEEP 0 + +#define HAS_USB 1 +#define AO_USB_DIRECTIO 0 +#define AO_PA11_PA12_RMP 1 + +#define HAS_SPI_0 0 + +#define LOW_LEVEL_DEBUG 0 + +#define HAS_SERIAL_2 1 +#define USE_SERIAL_2_STDIN 0 +#define SERIAL_2_PA2_PA3 1 +#define SERIAL_2_SWAP 0 + +#define ao_up_getchar ao_serial2_getchar +#define ao_up_putchar ao_serial2_putchar +#define _ao_up_pollchar _ao_serial2_pollchar +#define ao_up_set_speed ao_serial2_set_speed + +#endif /* _AO_PINS_H_ */ -- cgit v1.2.3 From 71acc79f8e828d56296db282c72cf4492a8aa4f4 Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Mon, 7 May 2018 09:43:27 -0700 Subject: altos/mpusb-v3.0: Make it compile again A few things have changed since this code was written. Signed-off-by: Keith Packard --- src/mpusb-v3.0/Makefile | 1 + src/mpusb-v3.0/ao_pins.h | 2 ++ 2 files changed, 3 insertions(+) (limited to 'src/mpusb-v3.0/ao_pins.h') diff --git a/src/mpusb-v3.0/Makefile b/src/mpusb-v3.0/Makefile index 5d42b53b..96156741 100644 --- a/src/mpusb-v3.0/Makefile +++ b/src/mpusb-v3.0/Makefile @@ -31,6 +31,7 @@ ALTOS_SRC = \ ao_mutex.c \ ao_usb_stm.c \ ao_power.c \ + ao_gpio.c \ ao_serial_stm.c PRODUCT=MicroPeakUSB-v3.0 diff --git a/src/mpusb-v3.0/ao_pins.h b/src/mpusb-v3.0/ao_pins.h index 0c211861..3e79aad3 100644 --- a/src/mpusb-v3.0/ao_pins.h +++ b/src/mpusb-v3.0/ao_pins.h @@ -56,6 +56,8 @@ #define USE_SERIAL_2_STDIN 0 #define SERIAL_2_PA2_PA3 1 #define SERIAL_2_SWAP 0 +#define USE_SERIAL_2_FLOW 0 +#define USE_SERIAL_2_SW_FLOW 0 #define ao_up_getchar ao_serial2_getchar #define ao_up_putchar ao_serial2_putchar -- cgit v1.2.3