/** * Copyright (c) 2021 Dominic Masters * * This software is released under the MIT License. * https://opensource.org/licenses/MIT */ #pragma once #include "../libs.h" /** Maximum breakpoints that the list can support. */ #define BREAKPOINT_COUNT_MAX 0x04 /** Callback for when a new breakpint is reached. */ typedef void breakpointcallback_t(void *user, uint8_t i, float breakpoint); typedef struct { /** List of breakpoints */ float breakpoints[BREAKPOINT_COUNT_MAX]; uint8_t breakpointCount; /** Which breakpoint is current */ uint8_t breakpointCurrent; /** Pointer to any custom user data. */ void *user; /** Callback for when a breakpoint is reached */ breakpointcallback_t *onBreakpoint; } breakpointlist_t;