Stay close to r0ket firmware and just #define away some lowlevel functions
This commit is contained in:
parent
ff6a7882a1
commit
ed74ed76c4
|
@ -1,2 +1,34 @@
|
|||
/* AUTOGENERATED SOURCE FILE */
|
||||
#include "../../../../firmware/core/i2c/i2c.c"
|
||||
|
||||
// dummy implementation instead of #include "../../../../firmware/core/i2c/i2c.c"
|
||||
|
||||
|
||||
#include "i2c.h"
|
||||
|
||||
volatile uint32_t I2CMasterState = I2CSTATE_IDLE;
|
||||
volatile uint32_t I2CSlaveState = I2CSTATE_IDLE;
|
||||
|
||||
volatile uint8_t I2CMasterBuffer[I2C_BUFSIZE];
|
||||
volatile uint8_t I2CSlaveBuffer[I2C_BUFSIZE];
|
||||
volatile uint32_t I2CReadLength;
|
||||
volatile uint32_t I2CWriteLength;
|
||||
|
||||
volatile uint32_t RdIndex = 0;
|
||||
volatile uint32_t WrIndex = 0;
|
||||
|
||||
|
||||
void I2C_IRQHandler(void) {
|
||||
}
|
||||
|
||||
uint32_t i2cInit( uint32_t I2cMode ) {
|
||||
return( TRUE );
|
||||
}
|
||||
|
||||
uint32_t i2cEngine( void ) {
|
||||
return I2CSTATE_IDLE;
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
** End Of File
|
||||
******************************************************************************/
|
||||
|
||||
|
||||
|
|
|
@ -1,56 +1,14 @@
|
|||
#if 0
|
||||
#include "../firmware/lcd/display.c"
|
||||
#else
|
||||
#define lcdDisplay _hideaway_lcdDisplay
|
||||
#define lcdInit _hideaway_lcdInit
|
||||
#include "../../../firmware/lcd/display.c"
|
||||
#undef lcdDisplay
|
||||
#undef lcdInit
|
||||
|
||||
#include "../firmware/lcd/display.h"
|
||||
#include "simulator.h"
|
||||
|
||||
uint8_t lcdBuffer[RESX*RESY_B];
|
||||
int lcd_layout = 0;
|
||||
const int TYPE_DATA=0;
|
||||
|
||||
|
||||
void lcdInit(void) {
|
||||
fprintf(stderr,"lcdInit(void)\n");
|
||||
}
|
||||
|
||||
|
||||
void lcdFill(char f){
|
||||
int x;
|
||||
for(x=0;x<RESX*RESY_B;x++) {
|
||||
lcdBuffer[x]=f;
|
||||
}
|
||||
};
|
||||
|
||||
void lcdSetPixel(char x, char y, bool f){
|
||||
char y_byte = (RESY-(y+1)) / 8;
|
||||
char y_off = (RESY-(y+1)) % 8;
|
||||
char byte = lcdBuffer[y_byte*RESX+(RESX-(x+1))];
|
||||
if (f) {
|
||||
byte |= (1 << y_off);
|
||||
} else {
|
||||
byte &= ~(1 << y_off);
|
||||
}
|
||||
lcdBuffer[y_byte*RESX+(RESX-(x+1))] = byte;
|
||||
}
|
||||
|
||||
bool lcdGetPixel(char x, char y){
|
||||
char y_byte = (RESY-(y+1)) / 8;
|
||||
char y_off = (RESY-(y+1)) % 8;
|
||||
char byte = lcdBuffer[y_byte*RESX+(RESX-(x+1))];
|
||||
return byte & (1 << y_off);
|
||||
}
|
||||
|
||||
void lcdDisplay() {
|
||||
simlcdDisplayUpdate();
|
||||
}
|
||||
|
||||
inline void lcdInvert(void) {
|
||||
lcdToggleFlag(LCD_INVERTED);
|
||||
void lcdInit() {
|
||||
}
|
||||
|
||||
void lcdToggleFlag(int flag) {
|
||||
lcd_layout=lcd_layout ^ flag;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue