mirror of
git://projects.qi-hardware.com/antorcha.git
synced 2024-11-22 14:05:20 +02:00
fw/: move image data from sweep.[ch] to new image.[ch]
This commit is contained in:
parent
7003c9c35b
commit
6223a58552
@ -30,7 +30,7 @@ OBJCOPY = $(AVR_PREFIX)objcopy
|
||||
#OBJDUMP = $(AVR_PREFIX)objdump
|
||||
SIZE = $(AVR_PREFIX)size
|
||||
|
||||
OBJS = $(NAME).o dispatch.o hash.o reset.o sweep.o $(COMMON_OBJS)
|
||||
OBJS = $(NAME).o dispatch.o hash.o image.o reset.o sweep.o $(COMMON_OBJS)
|
||||
BOOT_OBJS = boot.o flash.o fw.o $(COMMON_OBJS)
|
||||
COMMON_OBJS = rf.o spi.o
|
||||
|
||||
|
17
fw/image.c
Normal file
17
fw/image.c
Normal file
@ -0,0 +1,17 @@
|
||||
/*
|
||||
* fw/image.c - Image data (upload and conversion)
|
||||
*
|
||||
* Written 2012 by Werner Almesberger
|
||||
* Copyright 2012 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 "image.h"
|
||||
|
||||
|
||||
extern struct line image[MAX_LINES];
|
32
fw/image.h
Normal file
32
fw/image.h
Normal file
@ -0,0 +1,32 @@
|
||||
/*
|
||||
* fw/image.h - Image data (upload and conversion)
|
||||
*
|
||||
* Written 2012 by Werner Almesberger
|
||||
* Copyright 2012 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.
|
||||
*/
|
||||
|
||||
|
||||
#ifndef IMAGE_H
|
||||
#define IMAGE_H
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
|
||||
|
||||
#define MAX_LINES 100
|
||||
|
||||
|
||||
struct line {
|
||||
uint8_t d; /* port D0-D7 */
|
||||
uint8_t cb; /* port C0-C5, B6-B7 */
|
||||
};
|
||||
|
||||
|
||||
extern struct line image[MAX_LINES];
|
||||
|
||||
#endif /* !IMAGE_H */
|
@ -17,6 +17,7 @@
|
||||
#include <avr/io.h>
|
||||
#include <avr/interrupt.h>
|
||||
|
||||
#include "image.h"
|
||||
#include "sweep.h"
|
||||
|
||||
|
||||
|
12
fw/sweep.h
12
fw/sweep.h
@ -18,15 +18,6 @@
|
||||
#include <stdint.h>
|
||||
|
||||
|
||||
#define MAX_LINES 100
|
||||
|
||||
|
||||
struct line {
|
||||
uint8_t d; /* port D0-D7 */
|
||||
uint8_t cb; /* port C0-C5, B6-B7 */
|
||||
};
|
||||
|
||||
|
||||
struct sweep {
|
||||
uint32_t wait_ticks; /* number of ticks to wait before image */
|
||||
uint16_t pixel_ticks; /* number of ticks per pixel */
|
||||
@ -36,9 +27,6 @@ struct sweep {
|
||||
};
|
||||
|
||||
|
||||
extern struct line image[MAX_LINES];
|
||||
|
||||
|
||||
void image_sweep(const struct sweep *sweep);
|
||||
void sweep_init(void);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user