I am very new to C and am encountering an issue while trying to store my next_frame in a variable.
If I just change the following it works fine. Only when I try to store the next_frame in a variable does it not compile. How can I fix it?
// Doesn't compile
oled_write_raw_P(next_frame, FRAME_SIZE);
// Compiles
oled_write_raw_P(frames[abs((FRAME_COUNT - 1) - current_frame)];, FRAME_SIZE);
Full Code
#define FRAME_COUNT 5 // Animation Frames
#define FRAME_SIZE 256
#define FRAME_DURATION 200 // MS duration of each frame
// Variables
uint32_t timer = 0;
uint8_t current_frame = 0;
char next_frame;
static void render_animation(void) {
    static const char PROGMEM frames[FRAME_COUNT][FRAME_SIZE] = {
        // Images here, removed for example
    };
    // If timer is more than 200ms, animate
    if (timer_elapsed32(timer) > FRAME_DURATION) {
        timer = timer_read32();
        current_frame = (current_frame + 1) % FRAME_COUNT;
        next_frame = frames[abs((FRAME_COUNT - 1) - current_frame)];
        // Set cursor position
        oled_set_cursor(128, 0);
        // Write next frame
        oled_write_raw_P(next_frame, FRAME_SIZE);
    }
}
These are the errors:
error: assignment to 'char' from 'const char *' makes integer from pointer without a cast [-Werror=int-conversion] next_frame = frames[abs((FRAME_COUNT - 1) - current_frame)];
error: passing argument 1 of 'oled_write_raw_P' makes pointer from integer without a cast [-Werror=int-conversion] oled_write_raw_P(next_frame, FRAME_SIZE);
 
     
    