Skip to content

Commit 632ad47

Browse files
committed
software composite
1 parent b6b0afd commit 632ad47

File tree

6 files changed

+1298
-1
lines changed

6 files changed

+1298
-1
lines changed

CMakeLists.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ option(TFT "Enable TFT display" OFF)
1111
option(ILI9341 "Enable TFT ILI9341 display" OFF)
1212
option(HDMI "Enable HDMI display" OFF)
1313
option(TV "Enable TV composite output" OFF)
14+
option(SOFTTV "Enable TV soft composite output" OFF)
15+
1416

1517
set(CMAKE_C_STANDARD 11)
1618
set(CMAKE_CXX_STANDARD 17)
@@ -34,6 +36,7 @@ add_subdirectory(drivers/vga-nextgen)
3436
add_subdirectory(drivers/hdmi)
3537
add_subdirectory(drivers/st7789)
3638
add_subdirectory(drivers/tv)
39+
add_subdirectory(drivers/tv-software)
3740

3841
add_subdirectory(drivers/graphics)
3942

@@ -77,6 +80,10 @@ ELSEIF(TV)
7780
target_compile_definitions(${PROJECT_NAME} PRIVATE TV)
7881
target_link_libraries(${PROJECT_NAME} PRIVATE tv)
7982
SET(BUILD_NAME "${BUILD_NAME}-TV")
83+
ELSEIF(SOFTTV)
84+
target_compile_definitions(${PROJECT_NAME} PRIVATE SOFTTV)
85+
target_link_libraries(${PROJECT_NAME} PRIVATE tv-software)
86+
SET(BUILD_NAME "${BUILD_NAME}-TV-SOFT")
8087
ELSE()
8188
target_compile_definitions(${PROJECT_NAME} PRIVATE VGA)
8289
target_link_libraries(${PROJECT_NAME} PRIVATE vga-nextgen)

drivers/graphics/graphics.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@ extern "C" {
1919
#ifdef TV
2020
#include "tv.h"
2121
#endif
22+
#ifdef SOFTTV
23+
#include "tv-software.h"
24+
#endif
25+
2226

2327
#include "font6x8.h"
2428
#include "font8x8.h"

drivers/tv-software/CMakeLists.txt

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
add_library(tv-software INTERFACE)
2+
3+
target_sources(tv-software INTERFACE ${CMAKE_CURRENT_LIST_DIR}/tv-software.c)
4+
5+
target_link_libraries(tv-software INTERFACE hardware_pio hardware_clocks hardware_dma)
6+
7+
target_include_directories(tv-software INTERFACE
8+
${CMAKE_CURRENT_LIST_DIR}
9+
)
10+

0 commit comments

Comments
 (0)