![]() |
libsigrokdecode unreleased development snapshot
sigrok protocol decoding library
|
#include <stdint.h>#include <stdlib.h>
Include dependency graph for irmp-main-sharedlib.h:
This graph shows which files directly or indirectly include this file:Go to the source code of this file.
Data Structures | |
| struct | irmp_result_data |
| IR decoder result data at the library's public API. More... | |
Macros | |
| #define | IRMP_DLLEXPORT __attribute__((visibility("default"))) |
| #define | WITH_IRMP_DETECT_BUFFER 0 |
| #define | IRMP_DATA_FLAG_REPETITION (1 << 0) |
| #define | IRMP_DATA_FLAG_RELEASE (1 << 1) |
Functions | |
| IRMP_DLLEXPORT struct irmp_instance * | irmp_instance_alloc (void) |
| Allocate a decoder instance. | |
| IRMP_DLLEXPORT void | irmp_instance_free (struct irmp_instance *state) |
| Release a decoder instance. | |
| IRMP_DLLEXPORT size_t | irmp_instance_id (struct irmp_instance *state) |
| Get the client ID of an IRMP decoder core instance. | |
| IRMP_DLLEXPORT int | irmp_instance_lock (struct irmp_instance *state, int wait) |
| Acquire a decoder instance's lock. | |
| IRMP_DLLEXPORT void | irmp_instance_unlock (struct irmp_instance *state) |
| Release a decoder instance's lock. | |
| IRMP_DLLEXPORT uint32_t | irmp_get_sample_rate (void) |
| Query the IRMP library's configured sample rate. | |
| IRMP_DLLEXPORT void | irmp_reset_state (void) |
| Reset internal decoder state. | |
| IRMP_DLLEXPORT int | irmp_add_one_sample (int sample) |
| Feed an individual sample to the detector. | |
| IRMP_DLLEXPORT int | irmp_get_result_data (struct irmp_result_data *data) |
| Query result data after detection succeeded. | |
| IRMP_DLLEXPORT const char * | irmp_get_protocol_name (uint32_t protocol) |
| Resolve the protocol identifer to the protocol's name. | |
| #define IRMP_DATA_FLAG_RELEASE (1 << 1) |
Definition at line 93 of file irmp-main-sharedlib.h.
| #define IRMP_DATA_FLAG_REPETITION (1 << 0) |
Definition at line 92 of file irmp-main-sharedlib.h.
| #define IRMP_DLLEXPORT __attribute__((visibility("default"))) |
Definition at line 29 of file irmp-main-sharedlib.h.
| #define WITH_IRMP_DETECT_BUFFER 0 |
Definition at line 34 of file irmp-main-sharedlib.h.
| IRMP_DLLEXPORT int irmp_add_one_sample | ( | int | sample | ) |
Feed an individual sample to the detector.
See irmp_get_result_data() for result retrieval when detection of an IR frame completes. Make sure irmp_reset_state() was called before providing the first sample.
| [in] | sample | The pin value to feed to the detector. |
Definition at line 251 of file irmp-main-sharedlib.c.
References irmp_ISR().
Here is the call graph for this function:| IRMP_DLLEXPORT const char * irmp_get_protocol_name | ( | uint32_t | protocol | ) |
Resolve the protocol identifer to the protocol's name.
| [in] | protocol | The numerical identifier. |
Definition at line 294 of file irmp-main-sharedlib.c.
References ARRAY_SIZE, and irmp_result_data::protocol.
Referenced by irmp_get_result_data().
Here is the caller graph for this function:| IRMP_DLLEXPORT int irmp_get_result_data | ( | struct irmp_result_data * | data | ) |
Query result data after detection succeeded.
| [out] | data | The caller provided result buffer. |
Definition at line 261 of file irmp-main-sharedlib.c.
References IRMP_PACKED_STRUCT::address, irmp_result_data::address, IRMP_PACKED_STRUCT::command, irmp_result_data::command, irmp_result_data::end_sample, IRMP_PACKED_STRUCT::flags, irmp_result_data::flags, irmp_get_data(), irmp_get_protocol_name(), IRMP_PACKED_STRUCT::protocol, irmp_result_data::protocol, irmp_result_data::protocol_name, and irmp_result_data::start_sample.
Here is the call graph for this function:| IRMP_DLLEXPORT uint32_t irmp_get_sample_rate | ( | void | ) |
Query the IRMP library's configured sample rate.
The internally used sample rate is a compile time option. Any data that is provided at runtime needs to match this rate, or detection will fail.
Definition at line 210 of file irmp-main-sharedlib.c.
| IRMP_DLLEXPORT struct irmp_instance * irmp_instance_alloc | ( | void | ) |
Allocate a decoder instance.
Definition at line 136 of file irmp-main-sharedlib.c.
| IRMP_DLLEXPORT void irmp_instance_free | ( | struct irmp_instance * | state | ) |
Release a decoder instance.
| [in] | state | Reference to the instance's state. |
Definition at line 152 of file irmp-main-sharedlib.c.
| IRMP_DLLEXPORT size_t irmp_instance_id | ( | struct irmp_instance * | state | ) |
Get the client ID of an IRMP decoder core instance.
Definition at line 163 of file irmp-main-sharedlib.c.
| IRMP_DLLEXPORT int irmp_instance_lock | ( | struct irmp_instance * | state, |
| int | wait ) |
Acquire a decoder instance's lock.
| [in] | state | Reference to the instance's state. |
| [in] | wait | Whether to block until the lock is acquired. |
Definition at line 171 of file irmp-main-sharedlib.c.
| IRMP_DLLEXPORT void irmp_instance_unlock | ( | struct irmp_instance * | state | ) |
Release a decoder instance's lock.
| [in] | state | Reference to the instance's state. |
Definition at line 197 of file irmp-main-sharedlib.c.
| IRMP_DLLEXPORT void irmp_reset_state | ( | void | ) |
Reset internal decoder state.
This must be called before data processing starts.
Definition at line 215 of file irmp-main-sharedlib.c.
References irmp_get_data(), and irmp_ISR().
Here is the call graph for this function: