1
0
mirror of git://projects.qi-hardware.com/ben-wpan.git synced 2024-11-05 06:37:29 +02:00
ben-wpan/atusb/fw/flash.c
Werner Almesberger e8bed1f3c1 atusb/fw/: flash a boot loader instead of the application (in progress)
- boot.c: basic boot loader that runs DFU for 2 s, then starts the payload
- board.h (DFU_USB_VENDOR, DFU_USB_PRODUCT): added USB IDs for DFU
- flash.c: stubs for board-specific Flash functions
- Makefile: build boot.hex for the boot loader
- Makefile (prog): load the boot loader at its rightful place
- Makefile (prog): also set hfuse and the lock fuse
2011-03-09 00:41:32 -03:00

47 lines
751 B
C

/*
* fw/flash.c - Board-specific flash functions
*
* Written 2011 by Werner Almesberger
* Copyright 2011 Werner Almesberger
*
* 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.
*/
#include <stdint.h>
#include <avr/io.h>
#include <avr/interrupt.h>
#define F_CPU 8000000UL
#include <util/delay.h>
#include "dfu.h"
#include "board.h"
void flash_start(void)
{
}
int flash_can_write(uint16_t size)
{
return 0;
}
void flash_write(const uint8_t *buf, uint16_t size)
{
}
uint16_t flash_read(uint8_t *buf, uint16_t size)
{
return 0;
}