mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-03-19 05:40:38 +01:00
Merge "Final pass at removing the warnings."
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
void ion_set_pixel(uint8_t x, uint8_t y, uint8_t color);
|
||||
void ion_set_pixel(uint16_t x, uint16_t y, uint8_t color);
|
||||
|
||||
#define SCREEN_WIDTH 320
|
||||
#define SCREEN_HEIGHT 240
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#include <stdint.h>
|
||||
#include <ion.h>
|
||||
|
||||
void ion_set_pixel(uint8_t x, uint8_t y, uint8_t color) {
|
||||
void ion_set_pixel(uint16_t x, uint16_t y, uint8_t color) {
|
||||
}
|
||||
|
||||
bool ion_key_down(ion_key_t key) {
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
* those pixels and have to resort to two pixels per byte using the following
|
||||
* format : AAxBBxxx, where AA and BB are the bits for two contiguous pixels. */
|
||||
|
||||
void ion_set_pixel(uint8_t x, uint8_t y, uint8_t color) {
|
||||
void ion_set_pixel(uint16_t x, uint16_t y, uint8_t color) {
|
||||
assert(x <= FRAMEBUFFER_WIDTH);
|
||||
assert(y <= FRAMEBUFFER_HEIGHT);
|
||||
|
||||
|
||||
@@ -32,8 +32,8 @@ typedef struct {
|
||||
static void perform_instruction(st7586_t * c, instruction_t instruction) {
|
||||
if (instruction.mode == DELAY_MODE) {
|
||||
// FIXME: Should sleep instruction->payload miliseconds
|
||||
// FIXME: This can be optimized away by the compiler!
|
||||
for (volatile int i = 0; i < 800*instruction.payload; i++) {
|
||||
for (int i = 0; i < 800*instruction.payload; i++) {
|
||||
__asm volatile("nop");
|
||||
}
|
||||
} else {
|
||||
c->data_command_pin_write(instruction.mode);
|
||||
|
||||
@@ -24,7 +24,6 @@ void init_platform() {
|
||||
int margin = 10;
|
||||
int screen_width = SCREEN_WIDTH;
|
||||
int screen_height = SCREEN_HEIGHT;
|
||||
// keyboard_width == screen_width
|
||||
int keyboard_height = screen_width;
|
||||
|
||||
Fl_Window * window = new Fl_Window(screen_width+2*margin, margin+screen_height+margin+keyboard_height+margin);
|
||||
@@ -35,10 +34,10 @@ void init_platform() {
|
||||
sKeyboard = new FltkKbd(margin, margin+screen_height+margin, screen_width, keyboard_height);
|
||||
|
||||
window->end();
|
||||
window->show(NULL, NULL);
|
||||
window->show(0, NULL);
|
||||
}
|
||||
|
||||
void ion_set_pixel(uint8_t x, uint8_t y, uint8_t color) {
|
||||
void ion_set_pixel(uint16_t x, uint16_t y, uint8_t color) {
|
||||
assert(x <= SCREEN_WIDTH);
|
||||
assert(y <= SCREEN_HEIGHT);
|
||||
char * byte = (char *)(FRAMEBUFFER_ADDRESS) + ((y*SCREEN_WIDTH)+x);
|
||||
|
||||
Reference in New Issue
Block a user