Code formatting.

This commit is contained in:
2021-03-19 18:52:50 +01:00
parent 3408e35786
commit 3fce356abf
5 changed files with 140 additions and 230 deletions

View File

@ -8,10 +8,8 @@
#ifndef MAX7456REGISTERS_H_
#define MAX7456REGISTERS_H_
#include <Arduino.h>
/**
* @typedef charact
* @brief Represents a character as stored in MAX7456 character memory.
@ -28,7 +26,7 @@ typedef byte charact[54];
union REG_VM0
{
/**@brief The whole value*/
unsigned char whole ;
unsigned char whole;
/**
* @var bits
* @brief access to individual bits*/
@ -38,7 +36,7 @@ union REG_VM0
* @li 0 = Enable
* @li 1 = Disable(VOUT is high impedance)
*/
unsigned char videoBuffer :1;
unsigned char videoBuffer : 1;
/**@brief Software Reset Bit
* @li When bit set all register are set to default.
@ -68,7 +66,7 @@ union REG_VM0
* @li 0 = NTSC
* @li 1 = PAL
*/
unsigned char videoSelect :1;
unsigned char videoSelect : 1;
/**@brief don't care*/
unsigned char unused : 1;
@ -76,7 +74,6 @@ union REG_VM0
} bits;
};
#define VM1_ADDRESS_WRITE 0x01
#define VM1_ADDRESS_READ 0x81
@ -101,7 +98,6 @@ union REG_VM1
*/
unsigned char blinkingDutyCycle : 2;
/**@brief Blinking Time (BT)
* @li b00 (0) = 2 fields (NTSC = 33ms ; PAL = 40ms)
* @li b01 (1) = 4 fields (NTSC = 67ms ; PAL = 80ms)
@ -110,7 +106,6 @@ union REG_VM1
*/
unsigned char blinkingTime : 2;
/**@brief Background Mode Brightness
* @li b000 (0) = 0%
* @li b001 (1) = 7%
@ -163,7 +158,6 @@ union REG_HOS
} bits;
};
#define VOS_ADDRESS_WRITE 0x03
#define VOS_ADDRESS_READ 0x83
@ -264,12 +258,9 @@ union REG_DMM
/**@brief Don't care*/
unsigned char unsused : 1;
} bits;
};
#define DMAH_ADDRESS_WRITE 0x05
#define DMAH_ADDRESS_READ 0x85
/**@union REG_DMAH
@ -293,12 +284,10 @@ union REG_DMAH
} bits;
};
#define DMAL_ADDRESS_WRITE 0x06
#define DMAL_ADDRESS_READ 0x86
typedef unsigned char REG_DMAL;
#define DMDI_ADDRESS_WRITE 0x07
#define DMDI_ADDRESS_READ 0x87
typedef unsigned char REG_DMDI;
@ -353,7 +342,6 @@ union REG_CMDI
} bits;
};
#define OSDM_ADDRESS_WRITE 0x0C
#define OSDM_ADDRESS_READ 0x8C
@ -380,7 +368,6 @@ union REG_OSDM
*/
unsigned char osdInsertionMuxSwitchingTime : 3;
/**@brief OSD Rise And Fall Time
* @li b000 (0) : 20ns (maximum sharpness/maximum crosscolor artifacts )
* @li b001 (1) : 30ns
@ -391,14 +378,12 @@ union REG_OSDM
*/
unsigned char osdRiseAndFallTime : 3;
/**@brief don't care*/
unsigned char unused : 2;
} bits;
};
#define RB0_ADDRESS_WRITE 0x10
#define RB0_ADDRESS_READ 0x90
@ -562,7 +547,6 @@ union REG_STAT
} bits;
};
#define DMDO_ADDRESS_READ 0xB0
/**@typedef DMDO
@ -595,33 +579,26 @@ union REG_CMDO
} bits;
};
/**\def COLOR_BLACK
* \brief Black value for a pixel (2bits)
*/
#define COLOR_BLACK 0
#define COLOR_BLACK 0
/**\def COLOR_WHITE
* \brief White value for a pixel (2bits)
*/
#define COLOR_WHITE 2
#define COLOR_WHITE 2
/**\def COLOR_TRANSPARENT
* \brief Transparent value for a pixel (2bits)
*/
#define COLOR_TRANSPARENT 1
/**\def COLOR_GREY
* \brief Grey value for a pixel (2bits)
*/
#define COLOR_GREY COLOR_TRANSPARENT
/**@struct PIXEL
* @brief represent a 4-pixels value
*/
@ -634,10 +611,8 @@ struct PIXEL
/**@brief 2nd pixel*/
byte pix1 : 2;
/**@brief 1st pixel*/
byte pix0 : 2;
};
/**@union LINE
@ -651,7 +626,6 @@ union LINE
struct PIXEL pixels[3];
};
/**
* @union CARACT
* @brief Represents a character with lines and pixels.
@ -665,20 +639,20 @@ union CARACT
union LINE line[18];
};
enum{
_BT_BT=0,
_BT_2BT,
_BT_3BT,
_3BT_BT
enum
{
_BT_BT = 0,
_BT_2BT,
_BT_3BT,
_3BT_BT
};
enum{
_2fields=0,
_4fields,
_6fields,
_8fields
enum
{
_2fields = 0,
_4fields,
_6fields,
_8fields
};
#endif /* MAX7456REGISTERS_H_ */