display useless things
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
#include e-Paper subdirectories
|
||||
add_subdirectory(epaper/Config)
|
||||
add_subdirectory(epaper/e-Paper)
|
||||
add_subdirectory(epaper/Fonts)
|
||||
add_subdirectory(epaper/GUI)
|
||||
add_subdirectory(epaper)
|
||||
add_subdirectory(mare)
|
||||
|
||||
|
||||
4
libs/epaper/CMakeLists.txt
Normal file
4
libs/epaper/CMakeLists.txt
Normal file
@@ -0,0 +1,4 @@
|
||||
add_subdirectory(Config)
|
||||
add_subdirectory(e-Paper)
|
||||
add_subdirectory(Fonts)
|
||||
add_subdirectory(GUI)
|
||||
13
libs/mare/CMakeLists.txt
Normal file
13
libs/mare/CMakeLists.txt
Normal file
@@ -0,0 +1,13 @@
|
||||
|
||||
# Find all source files in a single current directory
|
||||
# Save the name to DIR_Config_SRCS
|
||||
aux_source_directory(. DIR_Config_SRCS)
|
||||
|
||||
|
||||
include_directories(../epaper/Config)
|
||||
include_directories(../epaper/e-Paper)
|
||||
include_directories(../epaper/Fonts)
|
||||
|
||||
# Generate the link library
|
||||
add_library(Mare ${DIR_Config_SRCS})
|
||||
target_link_libraries(Mare PUBLIC Config ePaper pico_stdlib hardware_spi)
|
||||
12
libs/mare/mare.cpp
Normal file
12
libs/mare/mare.cpp
Normal file
@@ -0,0 +1,12 @@
|
||||
/*******************************************
|
||||
* Most Awesome Renderer Ever
|
||||
*******************************************/
|
||||
#include "mare.h"
|
||||
|
||||
namespace Render {
|
||||
|
||||
Mare::Mare(){
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
22
libs/mare/mare.h
Normal file
22
libs/mare/mare.h
Normal file
@@ -0,0 +1,22 @@
|
||||
/*******************************************
|
||||
* Most Awesome Renderer Ever
|
||||
*******************************************/
|
||||
|
||||
#include <DEV_Config.h>
|
||||
#include <EPD_2in9b_V3.h>
|
||||
#include <fonts.h>
|
||||
|
||||
namespace Render{
|
||||
|
||||
class Mare {
|
||||
public:
|
||||
Mare();
|
||||
virtual ~Mare();
|
||||
|
||||
public:
|
||||
void render();
|
||||
|
||||
private:
|
||||
int _var;
|
||||
};
|
||||
}
|
||||
@@ -4,6 +4,7 @@ include_directories(../libs/epaper/Config)
|
||||
include_directories(../libs/epaper/e-Paper)
|
||||
include_directories(../libs/epaper/GUI)
|
||||
include_directories(../libs/epaper/Fonts)
|
||||
include_directories(../libs/mare)
|
||||
|
||||
#add executable for main
|
||||
add_executable(emon main.cpp)
|
||||
|
||||
25
src/main.cpp
25
src/main.cpp
@@ -3,10 +3,11 @@
|
||||
|
||||
// Ricrdarsi di inserire cosi' tutte le lebrerie C altrimenti non LINKA, vaccamiseria
|
||||
extern "C" {
|
||||
#include <EPD_2in9d.h>
|
||||
#include <EPD_2in9_V2.h>
|
||||
}
|
||||
|
||||
#include <myclass.h>
|
||||
#include <mare.h>
|
||||
|
||||
int main(){
|
||||
stdio_init_all();
|
||||
@@ -15,17 +16,29 @@ int main(){
|
||||
gpio_set_dir(LED_PIN, GPIO_OUT);
|
||||
bool s=false;
|
||||
uint32_t i=0;
|
||||
uint8_t img[EPD_2IN9_V2_HEIGHT/8*EPD_2IN9_V2_WIDTH];
|
||||
|
||||
auto a(Myclass(3));
|
||||
a.culo();
|
||||
for (int x=0; x < EPD_2IN9_V2_HEIGHT/8*EPD_2IN9_V2_WIDTH; ++x){
|
||||
img[x] = 0x01;
|
||||
}
|
||||
|
||||
EPD_2IN9D_Init();
|
||||
int rv;
|
||||
DEV_Delay_ms(500);
|
||||
if((rv=DEV_Module_Init())!=0){
|
||||
printf("Init Failed, %d",rv);
|
||||
return -1;
|
||||
}
|
||||
EPD_2IN9_V2_Init();
|
||||
EPD_2IN9_V2_Clear();
|
||||
|
||||
while (true) {
|
||||
while(true){
|
||||
EPD_2IN9_V2_Display((uint8_t*)img);
|
||||
sleep_ms(10000);
|
||||
EPD_2IN9_V2_Clear();
|
||||
printf("[%u] Hello, world!\n",i++);
|
||||
gpio_put(LED_PIN,s);
|
||||
s = s ? false : true;
|
||||
sleep_ms(1000);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user