code wiki / (root) / nx_fb_1bpp.nx

nx_fb_1bpp.nx

buildroot/runtime/nx_fb_1bpp.nx

5978 B183 linesdepth 2pulls 2 transitivereach 6 importersview sourcekind librarytopic fb
docsdependenciesstructsconstsfunctions

about

nx_fb_1bpp.nx -- 1-bit-per-pixel framebuffer. Monochrome framebuffer for OLED / E-ink / sub-watt displays. 128×64 = 1024 bytes; the canonical T1/MCU display size. Per substrate-tier-ladder cardinal: minimum-hardware-floor primitives must scale to NX_TIER_MCU; 1bpp is the floor. Bit-pack layout (compatible with SSD1306 page layout — the canonical OLED controller): 8 vertically-adjacent pixels share one byte, with bit 0 = top pixel, bit 7 = bottom pixel. width pixels per row, height pixels per column. byte_count = (height/8) * width. Composes: nx_palette -- caller's palette index maps to ON / OFF bit nx_raycast_voxel -- hit face brightness maps to pixel ON/OFF via a 4-level dither pattern

dependencies 2 imports · 6 importers

nx_syscalls.nx nx_tier.nx nx_fb_1bpp.nx nx_fb_1bpp_test.nx nx_game_engine_compose_test.nx nx_game_session_drive.nx nx_minecraft_mcu_compose_test.nx nx_text_render.nx nx_text_render_test.nx

imports: nx_syscalls.nxnx_tier.nx

imported by: nx_fb_1bpp_test.nxnx_game_engine_compose_test.nxnx_game_session_drive.nxnx_minecraft_mcu_compose_test.nxnx_text_render.nxnx_text_render_test.nx

structs

27struct NxFb1bpp

consts

21const NX_FB_OK: nx_int = 0
22const NX_FB_ERR_BAD_DIM: nx_int = 1
23const NX_FB_ERR_BAD_COORD: nx_int = 2

functions

34func nx_fb_1bpp_new(width: nx_size, height: nx_size) -> *NxFb1bpp
called by 4: mainmainmainmain calls 1: sys_mmap
50func nx_fb_1bpp_clear(f: *NxFb1bpp) -> nx_int
called by 4: mainmainmainmain
61func nx_fb_1bpp_fill(f: *NxFb1bpp) -> nx_int
called by 1: main
75func nx_fb_1bpp_set_pixel(f: *NxFb1bpp, x: nx_size, y: nx_size, on: nx_int) -> nx_int
94func nx_fb_1bpp_get_pixel(f: *NxFb1bpp, x: nx_size, y: nx_size) -> nx_int
called by 1: main
111func nx_fb_1bpp_fill_rect(f: *NxFb1bpp,
called by 2: maings_render calls 1: nx_fb_1bpp_set_pixel
135func nx_fb_1bpp_dither_4(f: *NxFb1bpp,
called by 3: mainmainmain calls 1: nx_fb_1bpp_set_pixel
170func nx_fb_1bpp_count_on(f: *NxFb1bpp) -> nx_int
called by 4: mainmainmainmain