#ifndef IR_RECV_H
#define IR_RECV_H

#include <ir.h>

/**
 * @brief Initialize IR receive pipeline (stub).
 *
 * Intended to configure GPIO/interrupts/ppi for future implementation.
 * @return 0 on success, negative errno otherwise.
 */
int ir_recv_init(void);

#ifdef CONFIG_IR_RECV_SIMULATOR

/* Configuration for injecting signal errors */
typedef struct {
    uint8_t noise_flips_per_8; /* Noise: number of inverted samples per block of 8 (0, 1, 2) */
    uint8_t jitter_mark;       /* Jitter for mark pulse: +/- samples (e.g. 2) */
    uint8_t jitter_space_0;    /* Jitter for space0: +/- samples (e.g. 4) */
    uint8_t jitter_space_1;    /* Jitter for space1: +/- samples (e.g. 2) */
} ir_sim_error_t;

/* err can be NULL to send a perfect signal */
void ir_recv_sim_send_packet(ir_packet_t *packet, ir_sim_error_t *err);

#endif

#endif /* IR_RECV_H */
