summaryrefslogtreecommitdiff
path: root/src/usbtrng-v2.0
diff options
context:
space:
mode:
Diffstat (limited to 'src/usbtrng-v2.0')
-rw-r--r--src/usbtrng-v2.0/.gitignore2
-rw-r--r--src/usbtrng-v2.0/Makefile70
-rw-r--r--src/usbtrng-v2.0/ao_pins.h68
-rw-r--r--src/usbtrng-v2.0/ao_usbtrng.c44
-rw-r--r--src/usbtrng-v2.0/flash-loader/.gitignore2
-rw-r--r--src/usbtrng-v2.0/flash-loader/Makefile8
-rw-r--r--src/usbtrng-v2.0/flash-loader/ao_pins.h32
7 files changed, 0 insertions, 226 deletions
diff --git a/src/usbtrng-v2.0/.gitignore b/src/usbtrng-v2.0/.gitignore
deleted file mode 100644
index 93b38d11..00000000
--- a/src/usbtrng-v2.0/.gitignore
+++ /dev/null
@@ -1,2 +0,0 @@
-ao_product.h
-usbtrng-*
diff --git a/src/usbtrng-v2.0/Makefile b/src/usbtrng-v2.0/Makefile
deleted file mode 100644
index 49798f1c..00000000
--- a/src/usbtrng-v2.0/Makefile
+++ /dev/null
@@ -1,70 +0,0 @@
-#
-# AltOS build
-#
-#
-
-include ../stmf0/Makefile.defs
-
-INC = \
- ao.h \
- ao_arch.h \
- ao_arch_funcs.h \
- ao_pins.h \
- ao_product.h \
- ao_task.h \
- ao_adc_fast.h \
- stm32f0.h
-
-#
-# Common AltOS sources
-#
-ALTOS_SRC = \
- ao_interrupt.c \
- ao_timer.c \
- ao_panic.c \
- ao_mutex.c \
- ao_dma_stm.c \
- ao_adc_fast.c \
- ao_crc_stm.c \
- ao_stdio.c \
- ao_led.c \
- ao_romconfig.c \
- ao_boot_chain.c \
- ao_cmd.c \
- ao_usb_stm.c \
- ao_trng.c \
- ao_task.c \
- ao_product.c
-
-PRODUCT=usbtrng-v2.0
-PRODUCT_DEF=-DUSBTRNG_V_2_0
-IDPRODUCT=0x0028
-
-CFLAGS = $(PRODUCT_DEF) $(STMF0_CFLAGS) -g -Os
-
-PROGNAME=usbtrng-v2.0
-PROG=$(PROGNAME)-$(VERSION).elf
-HEX=$(PROGNAME)-$(VERSION).ihx
-
-SRC=$(ALTOS_SRC) ao_usbtrng.c
-OBJ=$(SRC:.c=.o)
-
-all: $(PROG) $(HEX)
-
-$(PROG): Makefile $(OBJ) altos.ld
- $(call quiet,CC) $(LDFLAGS) $(CFLAGS) -o $(PROG) $(OBJ) $(LIBS)
-
-ao_product.h: ao-make-product.5c ../Version
- $(call quiet,NICKLE,$<) $< -m altusmetrum.org -i $(IDPRODUCT) -p $(PRODUCT) -v $(VERSION) > $@
-
-$(OBJ): $(INC)
-
-distclean: clean
-
-clean:
- rm -f *.o $(PROGNAME)-*.elf $(PROGNAME)-*.ihx
- rm -f ao_product.h
-
-install:
-
-uninstall:
diff --git a/src/usbtrng-v2.0/ao_pins.h b/src/usbtrng-v2.0/ao_pins.h
deleted file mode 100644
index 2b23f967..00000000
--- a/src/usbtrng-v2.0/ao_pins.h
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * Copyright © 2015 Keith Packard <keithp@keithp.com>
- *
- * 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; either version 2 of the License, or
- * (at your option) any later version.
- *
- * 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.
- */
-
-#ifndef _AO_PINS_H_
-#define _AO_PINS_H_
-
-#define LED_PORT_ENABLE STM_RCC_AHBENR_IOPAEN
-#define LED_PORT (&stm_gpioa)
-#define LED_PIN_RED 2
-#define LED_PIN_GREEN 3
-#define AO_LED_RED (1 << LED_PIN_RED)
-#define AO_LED_GREEN (1 << LED_PIN_GREEN)
-
-#define LEDS_AVAILABLE (AO_LED_RED | AO_LED_GREEN)
-
-#define HAS_BEEP 0
-
-/* 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_USB 1
-#define AO_USB_DIRECTIO 1
-#define AO_PA11_PA12_RMP 0
-
-#define IS_FLASH_LOADER 0
-
-/* ADC */
-
-#define AO_ADC_PIN0_PORT (&stm_gpioa)
-#define AO_ADC_PIN0_PIN 6
-#define AO_ADC_PIN0_CH 6
-
-#define AO_ADC_RCC_AHBENR ((1 << STM_RCC_AHBENR_IOPAEN))
-
-#define AO_NUM_ADC 1
-
-/* CRC */
-#define AO_CRC_WIDTH 32
-#define AO_CRC_INIT 0xffffffff
-
-/* TRNG */
-#define AO_LED_TRNG_READ AO_LED_RED
-#define AO_LED_TRNG_WRITE AO_LED_GREEN
-
-#endif /* _AO_PINS_H_ */
diff --git a/src/usbtrng-v2.0/ao_usbtrng.c b/src/usbtrng-v2.0/ao_usbtrng.c
deleted file mode 100644
index e34babec..00000000
--- a/src/usbtrng-v2.0/ao_usbtrng.c
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * Copyright © 2014 Keith Packard <keithp@keithp.com>
- *
- * 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; either version 2 of the License, or
- * (at your option) any later version.
- *
- * 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.
- */
-
-#include <ao.h>
-#include <ao_adc_fast.h>
-#include <ao_crc.h>
-#include <ao_trng.h>
-
-void main(void)
-{
- ao_led_init(LEDS_AVAILABLE);
- ao_led_on(AO_LED_RED);
- ao_clock_init();
- ao_task_init();
- ao_timer_init();
- ao_dma_init();
- ao_adc_init();
- ao_crc_init();
-
- ao_cmd_init();
-
- ao_usb_init();
-
- ao_trng_init();
-
- ao_led_off(AO_LED_RED);
-
- ao_start_scheduler();
-}
diff --git a/src/usbtrng-v2.0/flash-loader/.gitignore b/src/usbtrng-v2.0/flash-loader/.gitignore
deleted file mode 100644
index 32dbbbcf..00000000
--- a/src/usbtrng-v2.0/flash-loader/.gitignore
+++ /dev/null
@@ -1,2 +0,0 @@
-ao_product.h
-usbtrng*
diff --git a/src/usbtrng-v2.0/flash-loader/Makefile b/src/usbtrng-v2.0/flash-loader/Makefile
deleted file mode 100644
index a2bf199f..00000000
--- a/src/usbtrng-v2.0/flash-loader/Makefile
+++ /dev/null
@@ -1,8 +0,0 @@
-#
-# AltOS flash loader build
-#
-#
-
-TOPDIR=../..
-HARDWARE=usbtrng-v2.0
-include $(TOPDIR)/stmf0/Makefile-flash.defs
diff --git a/src/usbtrng-v2.0/flash-loader/ao_pins.h b/src/usbtrng-v2.0/flash-loader/ao_pins.h
deleted file mode 100644
index 9e7c2c33..00000000
--- a/src/usbtrng-v2.0/flash-loader/ao_pins.h
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * Copyright © 2013 Keith Packard <keithp@keithp.com>
- *
- * 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; either version 2 of the License, or
- * (at your option) any later version.
- *
- * 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.
- */
-
-#ifndef _AO_PINS_H_
-#define _AO_PINS_H_
-
-#include <ao_flash_stm_pins.h>
-
-/* Red LED */
-
-#define AO_BOOT_PIN 1
-#define AO_BOOT_APPLICATION_GPIO stm_gpioa
-#define AO_BOOT_APPLICATION_PIN 2
-#define AO_BOOT_APPLICATION_VALUE 0
-#define AO_BOOT_APPLICATION_MODE AO_EXTI_MODE_PULL_DOWN
-
-#endif /* _AO_PINS_H_ */