nx_fb_1bpp.nx
buildroot/runtime/nx_fb_1bpp.nx
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
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
| 27 | struct NxFb1bpp |
consts
| 21 | const NX_FB_OK: nx_int = 0 |
| 22 | const NX_FB_ERR_BAD_DIM: nx_int = 1 |
| 23 | const NX_FB_ERR_BAD_COORD: nx_int = 2 |
functions
| 34 | func nx_fb_1bpp_new(width: nx_size, height: nx_size) -> *NxFb1bpp |
| 50 | func nx_fb_1bpp_clear(f: *NxFb1bpp) -> nx_int |
| 61 | func nx_fb_1bpp_fill(f: *NxFb1bpp) -> nx_int called by 1: main |
| 75 | func nx_fb_1bpp_set_pixel(f: *NxFb1bpp, x: nx_size, y: nx_size, on: nx_int) -> nx_int |
| 94 | func nx_fb_1bpp_get_pixel(f: *NxFb1bpp, x: nx_size, y: nx_size) -> nx_int called by 1: main |
| 111 | func nx_fb_1bpp_fill_rect(f: *NxFb1bpp, |
| 135 | func nx_fb_1bpp_dither_4(f: *NxFb1bpp, |
| 170 | func nx_fb_1bpp_count_on(f: *NxFb1bpp) -> nx_int |