#pragma once

#include "main.h"
#include "spi_cs_if.h"

typedef struct
{
    cs_handle_t super;
    GPIO_TypeDef *cs_port;
    uint16_t cs_pin;
    uint8_t cs_idle;
} MCU_cs_t;

void mcu_cs_init(MCU_cs_t *hcs, GPIO_TypeDef *cs_port, uint16_t cs_pin, uint8_t cs_idle);
void mcu_cs_on(cs_handle_t *me);
void mcu_cs_off(cs_handle_t *me);