summaryrefslogtreecommitdiffstats
path: root/app/project.h
blob: 6ba80123dbf15e749a85ac4ea8511e68e479b234 (plain)
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
#include <stdlib.h>
#include <libopencm3/stm32/rcc.h>
#include <libopencm3/stm32/pwr.h>
#include <libopencm3/stm32/f1/bkp.h>
#include <libopencm3/stm32/flash.h>
#include <libopencm3/stm32/gpio.h>
#include <libopencm3/stm32/adc.h>
#include <libopencm3/stm32/usart.h>
#include <libopencm3/stm32/usb.h>
#include <libopencm3/stm32/exti.h>
#include <libopencm3/stm32/timer.h>
#include <libopencm3/cm3/systick.h>
#include <libopencm3/cm3/nvic.h>
#include <libopencm3/cm3/cortex.h>
#include <libopencm3/cm3/scb.h>
#include <libopencm3/usb/usbd.h>
#include <libopencm3/usb/cdc.h>
#include <stm32f101cb_clock.h>
#include <string.h>


#include <libopencm3/cm3/scb.h>
#include <libopencm3/usb/dfu.h>

#include <stdio.h>
#include <errno.h>


#include "ring.h"

#ifndef SLIM
#include "i2c.h"
#endif

#define POWER_RETENTION_TIME 10
#define USB_RETENTION_TIME 60

#define POWER_LOCK_TIME 500
#define USB_LOCK_TIME 500

#ifndef USB_REQ_TYPE_OUT
#define USB_REQ_TYPE_OUT 0x0
#endif

#include "prototypes.h"