Date:2012-06-20 12:45:04 (8 years 1 month ago)
Author:Werner Almesberger
Commit:6223a58552f54b9bb7ad50f1fee09dc305bd66b8
Message:fw/: move image data from sweep.[ch] to new image.[ch]

Files: fw/Makefile (1 diff)
fw/image.c (1 diff)
fw/image.h (1 diff)
fw/sweep.c (1 diff)
fw/sweep.h (2 diffs)

Change Details

fw/Makefile
3030#OBJDUMP = $(AVR_PREFIX)objdump
3131SIZE = $(AVR_PREFIX)size
3232
33OBJS = $(NAME).o dispatch.o hash.o reset.o sweep.o $(COMMON_OBJS)
33OBJS = $(NAME).o dispatch.o hash.o image.o reset.o sweep.o $(COMMON_OBJS)
3434BOOT_OBJS = boot.o flash.o fw.o $(COMMON_OBJS)
3535COMMON_OBJS = rf.o spi.o
3636
fw/image.c
1/*
2 * fw/image.c - Image data (upload and conversion)
3 *
4 * Written 2012 by Werner Almesberger
5 * Copyright 2012 Werner Almesberger
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
11 */
12
13
14#include "image.h"
15
16
17extern struct line image[MAX_LINES];
fw/image.h
1/*
2 * fw/image.h - Image data (upload and conversion)
3 *
4 * Written 2012 by Werner Almesberger
5 * Copyright 2012 Werner Almesberger
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
11 */
12
13
14#ifndef IMAGE_H
15#define IMAGE_H
16
17#include <stdbool.h>
18#include <stdint.h>
19
20
21#define MAX_LINES 100
22
23
24struct line {
25    uint8_t d; /* port D0-D7 */
26    uint8_t cb; /* port C0-C5, B6-B7 */
27};
28
29
30extern struct line image[MAX_LINES];
31
32#endif /* !IMAGE_H */
fw/sweep.c
1717#include <avr/io.h>
1818#include <avr/interrupt.h>
1919
20#include "image.h"
2021#include "sweep.h"
2122
2223
fw/sweep.h
1818#include <stdint.h>
1919
2020
21#define MAX_LINES 100
22
23
24struct line {
25    uint8_t d; /* port D0-D7 */
26    uint8_t cb; /* port C0-C5, B6-B7 */
27};
28
29
3021struct sweep {
3122    uint32_t wait_ticks; /* number of ticks to wait before image */
3223    uint16_t pixel_ticks; /* number of ticks per pixel */
...... 
3627};
3728
3829
39extern struct line image[MAX_LINES];
40
41
4230void image_sweep(const struct sweep *sweep);
4331void sweep_init(void);
4432

Archive Download the corresponding diff file

Branches:
master
tornado-v1



interactive