Changeset 7258c6a in buchla-68k for vlib/glcinit.c


Ignore:
Timestamp:
07/09/2017 04:45:34 PM (7 years ago)
Author:
Thomas Lopatic <thomas@…>
Branches:
master
Children:
8618599
Parents:
0292fbb
Message:

Use standard integer types.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • vlib/glcinit.c

    r0292fbb r7258c6a  
    6363#include "glcdefs.h"
    6464
    65 unsigned        lcdbase;        /* LCD graphics base address */
    66 unsigned        lcdbit;         /* LCD graphics pixel bit mask */
    67 unsigned        lcdcol;         /* LCD text column */
    68 unsigned        lcdctl1;        /* LCD display control -- command */
    69 unsigned        lcdctl2;        /* LCD display control -- data */
    70 unsigned        lcdcurs;        /* LCD graphics pixel byte address */
    71 unsigned        lcdrow;         /* LCD text row */
    72 unsigned        lcdx;           /* LCD graphics x */
    73 unsigned        lcdy;           /* LCD graphics y */
     65uint16_t        lcdbase;        /* LCD graphics base address */
     66uint16_t        lcdbit;         /* LCD graphics pixel bit mask */
     67uint16_t        lcdcol;         /* LCD text column */
     68uint16_t        lcdctl1;        /* LCD display control -- command */
     69uint16_t        lcdctl2;        /* LCD display control -- data */
     70uint16_t        lcdcurs;        /* LCD graphics pixel byte address */
     71uint16_t        lcdrow;         /* LCD text row */
     72uint16_t        lcdx;           /* LCD graphics x */
     73uint16_t        lcdy;           /* LCD graphics y */
    7474
    7575/* GLC initialization values */
    7676
    77 char glc_is1[] = { 0x12, 0x05, 0x07, 0x54, 0x58, 0x3F, 0x55, 0x00 };
    78 char glc_is2[] = { 0x00, 0x00, 0x3F, 0x00, 0x20, 0x3F, 0x00, 0x00 };
     77int8_t glc_is1[] = { 0x12, 0x05, 0x07, 0x54, 0x58, 0x3F, 0x55, 0x00 };
     78int8_t glc_is2[] = { 0x00, 0x00, 0x3F, 0x00, 0x20, 0x3F, 0x00, 0x00 };
    7979
    8080/*
     
    8989*/
    9090
    91 void GLCdisp(short dsp, short crs, short blk1, short blk2, short blk3)
    92 {
    93         register short val;
     91void GLCdisp(int16_t dsp, int16_t crs, int16_t blk1, int16_t blk2, int16_t blk3)
     92{
     93        register int16_t val;
    9494
    9595        val = ((blk3 & 3) << 6) | ((blk2 & 3) << 4) | ((blk1 & 3) << 2) |
     
    110110*/
    111111
    112 void GLCcurs(short crs)
     112void GLCcurs(int16_t crs)
    113113{
    114114        lcdctl2 = (crs & 3) | (lcdctl2 & ~3);
     
    131131void GLCinit(void)
    132132{
    133         register int    i;
    134         register long ic;
    135         register char *gp;
     133        register int16_t        i;
     134        register int32_t ic;
     135        register int8_t *gp;
    136136
    137137        lcdbase = G_PLANE2;     /* set defaults for graphics variables */
     
    205205*/
    206206
    207 unsigned GLCcrc(unsigned row, unsigned col)
    208 {
    209         unsigned curad;
     207uint16_t GLCcrc(uint16_t row, uint16_t col)
     208{
     209        uint16_t curad;
    210210
    211211        curad = col + (row * 85);       /* calculate cursor location */
     
    235235*/
    236236
    237 unsigned GLCcxy(unsigned x, unsigned y)
    238 {
    239         register unsigned curad, xby6;
     237uint16_t GLCcxy(uint16_t x, uint16_t y)
     238{
     239        register uint16_t curad, xby6;
    240240
    241241        /* calculate cursor address */
     
    277277*/
    278278
    279 void GLCwrts(char *s)
     279void GLCwrts(int8_t *s)
    280280{
    281281        LCD_WC = G_CRSMRT;      /* set cursor motion =  right */
     
    304304*/
    305305
    306 void GLCtext(unsigned row, unsigned col, char *s)
    307 {
    308         register unsigned curad;
     306void GLCtext(uint16_t row, uint16_t col, int8_t *s)
     307{
     308        register uint16_t curad;
    309309
    310310        curad = col + (row * 85);       /* calculate cursor address */
Note: See TracChangeset for help on using the changeset viewer.