mirror of
git://projects.qi-hardware.com/ben-wpan.git
synced 2024-11-05 06:37:29 +02:00
e8bed1f3c1
- 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
47 lines
751 B
C
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;
|
|
}
|