mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-03-18 21:30:38 +01:00
Working text on CalcOne!
This commit is contained in:
@@ -21,7 +21,7 @@ MEMORY {
|
||||
*/
|
||||
}
|
||||
|
||||
FRAMEBUFFER_SIZE = 9600;
|
||||
FRAMEBUFFER_SIZE = 19200;
|
||||
STACK_SIZE = 4K;
|
||||
|
||||
SECTIONS {
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
|
||||
#include <ion.h>
|
||||
#include <string.h>
|
||||
#include <assert.h>
|
||||
|
||||
#include "display/gpio.h"
|
||||
#include "display/spi.h"
|
||||
@@ -40,6 +41,8 @@ void ion_display_off() {
|
||||
}
|
||||
|
||||
void init_display() {
|
||||
assert(FRAMEBUFFER_LENGTH == (FRAMEBUFFER_WIDTH*FRAMEBUFFER_HEIGHT*FRAMEBUFFER_BITS_PER_PIXEL)/8);
|
||||
|
||||
display_gpio_init();
|
||||
display_spi_init();
|
||||
|
||||
@@ -57,9 +60,5 @@ void init_display() {
|
||||
|
||||
memset(FRAMEBUFFER_ADDRESS, 0, FRAMEBUFFER_LENGTH);
|
||||
|
||||
for (int i=0;i<10;i++) {
|
||||
ion_set_pixel(i,i,0x3);
|
||||
}
|
||||
|
||||
display_dma_init();
|
||||
}
|
||||
|
||||
@@ -38,7 +38,8 @@ void display_dma_init() {
|
||||
|
||||
// 9 - Data transfer direction, peripheral/memory increment, single burst or transaction, peripheral and memory data width
|
||||
REGISTER_SET_VALUE(DMA_SCR(DMA1,LCD_DMA_STREAM), DMA_DIR, DMA_DIR_MEMORY_TO_PERIPHERAL);
|
||||
//DMA_SCR(DMA1,LCD_DMA_STREAM) |= DMA_CIRC;
|
||||
|
||||
DMA_SCR(DMA1,LCD_DMA_STREAM) |= DMA_CIRC;
|
||||
|
||||
// Memory address is incremented
|
||||
DMA_SCR(DMA1,LCD_DMA_STREAM) |= DMA_MINC;
|
||||
@@ -51,4 +52,9 @@ void display_dma_init() {
|
||||
|
||||
// 11 - Bonux: enable DMA requests on SPI
|
||||
SPI_CR2(SPI2) |= SPI_TXDMAEN;
|
||||
|
||||
/*while (DMA_SCR(DMA1,LCD_DMA_STREAM) & DMA_EN) {
|
||||
}
|
||||
DMA_SCR(DMA1,LCD_DMA_STREAM) |= DMA_EN;
|
||||
*/
|
||||
}
|
||||
|
||||
@@ -3,6 +3,6 @@ extern char _framebuffer_end;
|
||||
|
||||
#define FRAMEBUFFER_ADDRESS (&_framebuffer_start)
|
||||
#define FRAMEBUFFER_LENGTH (&_framebuffer_end-&_framebuffer_start)
|
||||
#define FRAMEBUFFER_WIDTH 160
|
||||
#define FRAMEBUFFER_WIDTH 240
|
||||
#define FRAMEBUFFER_HEIGHT 160
|
||||
#define FRAMEBUFFER_BITS_PER_PIXEL 4
|
||||
|
||||
@@ -8,6 +8,9 @@ extern "C" {
|
||||
#include <poincare.h>
|
||||
|
||||
void hello() {
|
||||
|
||||
KDDrawString("Hello, world!", (KDPoint){.x = x, .y = 10});
|
||||
|
||||
char input[255];
|
||||
|
||||
int index = 0;
|
||||
|
||||
Reference in New Issue
Block a user