linux/drivers/media/rc/ir-nec-decoder.c

// SPDX-License-Identifier: GPL-2.0
// ir-nec-decoder.c - handle NEC IR Pulse/Space protocol
//
// Copyright (C) 2010 by Mauro Carvalho Chehab

#include <linux/bitrev.h>
#include <linux/module.h>
#include "rc-core-priv.h"

#define NEC_NBITS
#define NEC_UNIT
#define NEC_HEADER_PULSE
#define NECX_HEADER_PULSE
#define NEC_HEADER_SPACE
#define NEC_REPEAT_SPACE
#define NEC_BIT_PULSE
#define NEC_BIT_0_SPACE
#define NEC_BIT_1_SPACE
#define NEC_TRAILER_PULSE
#define NEC_TRAILER_SPACE
#define NECX_REPEAT_BITS

enum nec_state {};

/**
 * ir_nec_decode() - Decode one NEC pulse or space
 * @dev:	the struct rc_dev descriptor of the device
 * @ev:		the struct ir_raw_event descriptor of the pulse/space
 *
 * This function returns -EINVAL if the pulse violates the state machine
 */
static int ir_nec_decode(struct rc_dev *dev, struct ir_raw_event ev)
{}

/**
 * ir_nec_scancode_to_raw() - encode an NEC scancode ready for modulation.
 * @protocol:	specific protocol to use
 * @scancode:	a single NEC scancode.
 */
static u32 ir_nec_scancode_to_raw(enum rc_proto protocol, u32 scancode)
{}

static const struct ir_raw_timings_pd ir_nec_timings =;

/**
 * ir_nec_encode() - Encode a scancode as a stream of raw events
 *
 * @protocol:	protocol to encode
 * @scancode:	scancode to encode
 * @events:	array of raw ir events to write into
 * @max:	maximum size of @events
 *
 * Returns:	The number of events written.
 *		-ENOBUFS if there isn't enough space in the array to fit the
 *		encoding. In this case all @max events will have been written.
 */
static int ir_nec_encode(enum rc_proto protocol, u32 scancode,
			 struct ir_raw_event *events, unsigned int max)
{}

static struct ir_raw_handler nec_handler =;

static int __init ir_nec_decode_init(void)
{}

static void __exit ir_nec_decode_exit(void)
{}

module_init();
module_exit(ir_nec_decode_exit);

MODULE_LICENSE();
MODULE_AUTHOR();
MODULE_AUTHOR();
MODULE_DESCRIPTION();