From d651c23a04c145128a8c5c704332916f6e70fce3 Mon Sep 17 00:00:00 2001 From: Werner Almesberger Date: Wed, 27 Jun 2012 02:47:28 -0300 Subject: [PATCH] fw/proto.h: assorted cleanup and corrections - remove struct params.clkT_period - correct size of tp_*_start - correct size of tp_*_pix - move MAX_LINES from image.h to proto.h (to ease sharing with tools) Things now work a bit differently from how they were planned back when clkT_period was added. --- fw/image.h | 3 --- fw/proto.h | 15 +++++++-------- 2 files changed, 7 insertions(+), 11 deletions(-) diff --git a/fw/image.h b/fw/image.h index c53b0b3..81282b3 100644 --- a/fw/image.h +++ b/fw/image.h @@ -22,9 +22,6 @@ #include "proto.h" -#define MAX_LINES 80 - - struct line { uint8_t d; /* port D0-D7 */ uint8_t cb; /* port C0-C5, B6-B7 */ diff --git a/fw/proto.h b/fw/proto.h index d143cea..c691ea2 100644 --- a/fw/proto.h +++ b/fw/proto.h @@ -34,6 +34,8 @@ enum pck_type { }; +#define MAX_LINES 80 + #define XA_HIGH_DEFAULT 850 #define XA_LOW_DEFAULT 170 @@ -47,11 +49,8 @@ enum pck_type { #define TP_FWD_PIX_DEFAULT 1100 /* 1.1 ms */ #define TP_BWD_PIX_DEFAULT 1100 /* 1.1 ms */ + struct params { - /* Timer ticks */ - - uint16_t clkT_period; /* Timer period */ - /* Accelerator thresholds */ uint16_t xa_high; /* X acceleration high threshold */ @@ -66,10 +65,10 @@ struct params { /* Timer periods, for imaging */ - uint16_t tp_fwd_start; /* forward image start */ - uint16_t tp_bwd_start; /* backward image start */ - uint8_t tp_fwd_pix; /* pixel size in forward move */ - uint8_t tp_bwd_pix; /* pixel size in backward move */ + uint32_t tp_fwd_start; /* forward image start */ + uint32_t tp_bwd_start; /* backward image start */ + uint16_t tp_fwd_pix; /* pixel size in forward move */ + uint16_t tp_bwd_pix; /* pixel size in backward move */ }; #endif /* !PROTO_H */