#pragma once
#include <stm32f10x.h>
#include <stdbool.h>
#include "usb.h"
#define USER_PROGRAM (FLASH_BASE + 2*1024) // 2 KiByte Bootloader size
extern byte UploadState;
void set_sysclock();
void revert_sysclock();
namespace flash{
void writeInit(uint32_t flash);
void writeDone();
}
namespace usb{
void shutdown();
void init();
void poll();
}
#define BB_BIT(a,b) (*(volatile uint32_t*)(((uint32_t)&(a)&0xFF000000)+0x02000000+((uint32_t)&(a)&0x00FFFFFFF)*32+(b)*4))
// macros LED_INIT, LED, PAGE_SIZE come from Makefile
Detected encoding: ASCII (7 bit) | 2
|