|
Tizen HAL API
1.0
|
The Radio provides functions for radio devices.
#include <hal-radio.h> The radio devices have various specifications, so it's hard to control them using single code. The radio HAL provides common abstraction interfaces to control radio devices which are different.
The radio HAL allows creation of components required in listening to the radio including:
| FUNCTION | PRE-STATE | POST-STATE | SYNC TYPE |
|---|---|---|---|
| hal_radio_init() | N/A | INITIALIZED | SYNC |
| hal_radio_deinit() | INITIALIZED | N/A | SYNC |
| hal_radio_prepare() | INITIALIZED | PREPARED | SYNC |
| hal_radio_unprepare() | PREPARED | INITIALIZED | SYNC |
| hal_radio_open() | PREPARED | OPENED | SYNC |
| hal_radio_close() | OPENED | PREPARED | SYNC |
| hal_radio_start() | OPENED | PLAYING | SYNC |
| hal_radio_stop() | PLAYING | OPENED | SYNC |
| hal_radio_seek() | PLAYING | PLAYING | SYNC |
| hal_radio_seek() | PLAYING | PLAYING | SYNC |
| hal_radio_set_frequency() | PLAYING | PLAYING | SYNC |
| hal_radio_get_frequency() | PLAYING | PLAYING | SYNC |
| hal_radio_get_signal_strength() | PLAYING | PLAYING | SYNC |
For more information on the radio features and the macros, see HAL radio programming guides and tutorials.
Typedefs | |
| typedef enum hal_radio_error | hal_radio_error_e |
| Enumeration for the radio error. | |
| typedef enum hal_radio_seek_direction_type | hal_radio_seek_direction_type_e |
| Enumeration for the radio seek direction. | |
| typedef struct _hal_backend_radio_funcs | hal_backend_radio_funcs |
| The structure type of the radio HAL functions. | |
| struct _hal_backend_radio_funcs |
The structure type of the radio HAL functions.
Data Fields | |
| hal_radio_error_e(* | init )(void **radio_handle) |
| hal_radio_error_e(* | deinit )(void *radio_handle) |
| hal_radio_error_e(* | prepare )(void *radio_handle) |
| hal_radio_error_e(* | unprepare )(void *radio_handle) |
| hal_radio_error_e(* | open )(void *radio_handle) |
| hal_radio_error_e(* | close )(void *radio_handle) |
| hal_radio_error_e(* | start )(void *radio_handle) |
| hal_radio_error_e(* | stop )(void *radio_handle) |
| hal_radio_error_e(* | seek )(void *radio_handle, hal_radio_seek_direction_type_e direction) |
| hal_radio_error_e(* | get_frequency )(void *radio_handle, uint32_t *frequency) |
| hal_radio_error_e(* | set_frequency )(void *radio_handle, uint32_t frequency) |
| hal_radio_error_e(* _hal_backend_radio_funcs::close)(void *radio_handle) |
Starts the device of radio
| hal_radio_error_e(* _hal_backend_radio_funcs::deinit)(void *radio_handle) |
Prepare the device of radio
| hal_radio_error_e(* _hal_backend_radio_funcs::get_frequency)(void *radio_handle, uint32_t *frequency) |
Sets the radio frequency (khz)
| hal_radio_error_e(* _hal_backend_radio_funcs::init)(void **radio_handle) |
< Initialize HAL backend handle Initialize HAL backend handle
| hal_radio_error_e(* _hal_backend_radio_funcs::open)(void *radio_handle) |
Closes the device of radio
| hal_radio_error_e(* _hal_backend_radio_funcs::prepare)(void *radio_handle) |
Unprepare the device of radio
| hal_radio_error_e(* _hal_backend_radio_funcs::seek)(void *radio_handle, hal_radio_seek_direction_type_e direction) |
Gets the radio frequency (khz)
| hal_radio_error_e(* _hal_backend_radio_funcs::set_frequency)(void *radio_handle, uint32_t frequency) |
Gets the current signal strength of the radio (dBm)
| hal_radio_error_e(* _hal_backend_radio_funcs::start)(void *radio_handle) |
Stops the device of radio
| hal_radio_error_e(* _hal_backend_radio_funcs::stop)(void *radio_handle) |
Seeks (up or down) the effective frequency of the radio
| hal_radio_error_e(* _hal_backend_radio_funcs::unprepare)(void *radio_handle) |
Opens the device of radio
| typedef struct _hal_backend_radio_funcs hal_backend_radio_funcs |
The structure type of the radio HAL functions.
| typedef enum hal_radio_error hal_radio_error_e |
Enumeration for the radio error.
Enumeration for the radio seek direction.
| enum hal_radio_error |
Enumeration for the radio error.