Skip to content

Instantly share code, notes, and snippets.

View KingAtoki's full-sized avatar

Christopher Atoki KingAtoki

  • Philadelphia, PA
View GitHub Profile
@KingAtoki
KingAtoki / bmp.swift
Created July 8, 2025 15:37
ER BMP sending
/**
* Performs a single BMP transfer attempt to a peripheral
*
* This is the core BMP transfer protocol implementation using Java-style approach:
* 1. Splits BMP data into 194-byte chunks with proper addressing
* 2. Sends packets sequentially with minimal delays
* 3. Sends end command (0x20, 0x0d, 0x0e)
* 4. Sends CRC verification using standard CRC32
*
* @param peripheral: The target CBPeripheral device