- add dependency the system info package.
- almost api return the PERIPHERAL_ERROR_NOT_SUPPORTED
Signed-off-by: Segwon <segwon.han@samsung.com>
Change-Id: I1c3cc4a8575cf18eec0d0338cca862555b02070c
PROJECT(${fw_name})
-SET(dependents "dlog glib-2.0 gio-2.0 gio-unix-2.0 capi-base-common")
+SET(dependents "dlog glib-2.0 gio-2.0 gio-unix-2.0 capi-base-common capi-system-info")
SET(pc_dependents "capi-base-common")
SET(CMAKE_INSTALL_PREFIX ${prefix})
BuildRequires: pkgconfig(gio-2.0)
BuildRequires: pkgconfig(dlog)
BuildRequires: pkgconfig(capi-base-common)
+BuildRequires: pkgconfig(capi-system-info)
Requires(post): /sbin/ldconfig
Requires(postun): /sbin/ldconfig
#include <stdlib.h>
#include <unistd.h>
#include <assert.h>
+#include <system_info.h>
#include "peripheral_io.h"
#include "peripheral_gdbus_gpio.h"
#include "peripheral_internal.h"
#include "peripheral_io_gdbus.h"
+#define PERIPHERAL_IO_GPIO_FEATURE "http://tizen.org/feature/peripheral_io.gpio"
+
+#define GPIO_FEATURE_UNKNOWN -1
+#define GPIO_FEATURE_FALSE 0
+#define GPIO_FEATURE_TRUE 1
+
+static int gpio_feature = GPIO_FEATURE_UNKNOWN;
+
+static bool __is_feature_supported()
+{
+ bool feature = false;
+
+ if (gpio_feature == GPIO_FEATURE_UNKNOWN) {
+ system_info_get_platform_bool(PERIPHERAL_IO_GPIO_FEATURE, &feature);
+ gpio_feature = (feature ? GPIO_FEATURE_TRUE : GPIO_FEATURE_FALSE);
+ }
+ return (gpio_feature == GPIO_FEATURE_TRUE ? true : false);
+}
+
typedef struct {
peripheral_gpio_h handle;
peripheral_gpio_interrupted_cb callback;
int ret = PERIPHERAL_ERROR_NONE;
peripheral_gpio_h handle;
+ RETVM_IF(__is_feature_supported() == false, PERIPHERAL_ERROR_NOT_SUPPORTED, "GPIO feature is not supported");
RETVM_IF(gpio == NULL, PERIPHERAL_ERROR_INVALID_PARAMETER, "Invalid gpio handle");
RETVM_IF(gpio_pin < 0, PERIPHERAL_ERROR_INVALID_PARAMETER, "Invalid gpio pin number");
{
int ret = PERIPHERAL_ERROR_NONE;
+ RETVM_IF(__is_feature_supported() == false, PERIPHERAL_ERROR_NOT_SUPPORTED, "GPIO feature is not supported");
RETVM_IF(gpio == NULL, PERIPHERAL_ERROR_INVALID_PARAMETER, "gpio handle is NULL");
/* call gpio_close */
{
int ret = PERIPHERAL_ERROR_NONE;
+ RETVM_IF(__is_feature_supported() == false, PERIPHERAL_ERROR_NOT_SUPPORTED, "GPIO feature is not supported");
RETVM_IF(gpio == NULL, PERIPHERAL_ERROR_INVALID_PARAMETER, "gpio handle is NULL");
RETVM_IF((direction < PERIPHERAL_GPIO_DIRECTION_IN) || (direction > PERIPHERAL_GPIO_DIRECTION_OUT_INITIALLY_LOW), PERIPHERAL_ERROR_INVALID_PARAMETER, "Invalid direction input");
{
int ret = PERIPHERAL_ERROR_NONE;
+ RETVM_IF(__is_feature_supported() == false, PERIPHERAL_ERROR_NOT_SUPPORTED, "GPIO feature is not supported");
RETVM_IF(gpio == NULL, PERIPHERAL_ERROR_INVALID_PARAMETER, "gpio handle is NULL");
RETVM_IF((edge < PERIPHERAL_GPIO_EDGE_NONE) || (edge > PERIPHERAL_GPIO_EDGE_BOTH), PERIPHERAL_ERROR_INVALID_PARAMETER, "edge input is invalid");
{
int ret = PERIPHERAL_ERROR_NONE;
+ RETVM_IF(__is_feature_supported() == false, PERIPHERAL_ERROR_NOT_SUPPORTED, "GPIO feature is not supported");
RETVM_IF(gpio == NULL, PERIPHERAL_ERROR_INVALID_PARAMETER, "gpio handle is NULL");
RETVM_IF(callback == NULL, PERIPHERAL_ERROR_INVALID_PARAMETER, "gpio interrupted callback is NULL");
{
int ret = PERIPHERAL_ERROR_NONE;
+ RETVM_IF(__is_feature_supported() == false, PERIPHERAL_ERROR_NOT_SUPPORTED, "GPIO feature is not supported");
RETVM_IF(gpio == NULL, PERIPHERAL_ERROR_INVALID_PARAMETER, "gpio handle is NULL");
ret = peripheral_gdbus_gpio_unset_interrupted_cb(gpio);
{
int ret = PERIPHERAL_ERROR_NONE;
+ RETVM_IF(__is_feature_supported() == false, PERIPHERAL_ERROR_NOT_SUPPORTED, "GPIO feature is not supported");
RETVM_IF(gpio == NULL, PERIPHERAL_ERROR_INVALID_PARAMETER, "gpio handle is NULL");
RETVM_IF(value == NULL, PERIPHERAL_ERROR_INVALID_PARAMETER, "gpio read value is invalid");
{
int ret = PERIPHERAL_ERROR_NONE;
+ RETVM_IF(__is_feature_supported() == false, PERIPHERAL_ERROR_NOT_SUPPORTED, "GPIO feature is not supported");
RETVM_IF(gpio == NULL, PERIPHERAL_ERROR_INVALID_PARAMETER, "gpio handle is NULL");
RETVM_IF((value != 0) && (value != 1), PERIPHERAL_ERROR_INVALID_PARAMETER, "gpio value is invalid");
#include <stdlib.h>
#include <unistd.h>
#include <assert.h>
+#include <system_info.h>
#include "peripheral_io.h"
#include "peripheral_gdbus_i2c.h"
#include "peripheral_common.h"
#include "peripheral_internal.h"
+#define PERIPHERAL_IO_I2C_FEATURE "http://tizen.org/feature/peripheral_io.i2c"
+
+#define I2C_FEATURE_UNKNOWN -1
+#define I2C_FEATURE_FALSE 0
+#define I2C_FEATURE_TRUE 1
+
/* i2c_smbus_xfer read or write markers */
#define I2C_SMBUS_READ 1
#define I2C_SMBUS_WRITE 0
#define I2C_SMBUS_BYTE_DATA 2
#define I2C_SMBUS_WORD_DATA 3
+static int i2c_feature = I2C_FEATURE_UNKNOWN;
+
+static bool __is_feature_supported()
+{
+ bool feature = false;
+
+ if (i2c_feature == I2C_FEATURE_UNKNOWN) {
+ system_info_get_platform_bool(PERIPHERAL_IO_I2C_FEATURE, &feature);
+ i2c_feature = (feature ? I2C_FEATURE_TRUE : I2C_FEATURE_FALSE);
+ }
+
+ return (i2c_feature == I2C_FEATURE_TRUE ? true : false);
+}
+
int peripheral_i2c_open(int bus, int address, peripheral_i2c_h *i2c)
{
peripheral_i2c_h handle;
int ret = PERIPHERAL_ERROR_NONE;
+ RETVM_IF(__is_feature_supported() == false, PERIPHERAL_ERROR_NOT_SUPPORTED, "I2C feature is not supported");
RETVM_IF(i2c == NULL, PERIPHERAL_ERROR_INVALID_PARAMETER, "Invalid i2c handle");
RETVM_IF(bus < 0 || address < 0, PERIPHERAL_ERROR_INVALID_PARAMETER, "Invalid parameter");
{
int ret;
+ RETVM_IF(__is_feature_supported() == false, PERIPHERAL_ERROR_NOT_SUPPORTED, "I2C feature is not supported");
RETVM_IF(i2c == NULL, PERIPHERAL_ERROR_INVALID_PARAMETER, "i2c handle is NULL");
ret = peripheral_gdbus_i2c_close(i2c);
{
int ret;
+ RETVM_IF(__is_feature_supported() == false, PERIPHERAL_ERROR_NOT_SUPPORTED, "I2C feature is not supported");
RETVM_IF(i2c == NULL, PERIPHERAL_ERROR_INVALID_PARAMETER, "i2c handle is NULL");
RETVM_IF(data == NULL, PERIPHERAL_ERROR_INVALID_PARAMETER, "Invalid parameter");
{
int ret;
+ RETVM_IF(__is_feature_supported() == false, PERIPHERAL_ERROR_NOT_SUPPORTED, "I2C feature is not supported");
RETVM_IF(i2c == NULL, PERIPHERAL_ERROR_INVALID_PARAMETER, "i2c handle is NULL");
RETVM_IF(data == NULL, PERIPHERAL_ERROR_INVALID_PARAMETER, "Invalid parameter");
int ret;
uint16_t w_data, dummy = 0;
+ RETVM_IF(__is_feature_supported() == false, PERIPHERAL_ERROR_NOT_SUPPORTED, "I2C feature is not supported");
RETVM_IF(i2c == NULL, PERIPHERAL_ERROR_INVALID_PARAMETER, "i2c handle is NULL");
RETVM_IF(data == NULL, PERIPHERAL_ERROR_INVALID_PARAMETER, "Invalid parameter");
int ret;
uint16_t dummy = 0;
+ RETVM_IF(__is_feature_supported() == false, PERIPHERAL_ERROR_NOT_SUPPORTED, "I2C feature is not supported");
RETVM_IF(i2c == NULL, PERIPHERAL_ERROR_INVALID_PARAMETER, "i2c handle is NULL");
ret = peripheral_gdbus_i2c_smbus_ioctl(i2c, I2C_SMBUS_WRITE, reg, I2C_SMBUS_BYTE_DATA, (uint16_t)data, &dummy);
int ret;
uint16_t dummy = 0, data_out;
+ RETVM_IF(__is_feature_supported() == false, PERIPHERAL_ERROR_NOT_SUPPORTED, "I2C feature is not supported");
RETVM_IF(i2c == NULL, PERIPHERAL_ERROR_INVALID_PARAMETER, "i2c handle is NULL");
RETVM_IF(data == NULL, PERIPHERAL_ERROR_INVALID_PARAMETER, "Invalid parameter");
int ret;
uint16_t dummy = 0;
+ RETVM_IF(__is_feature_supported() == false, PERIPHERAL_ERROR_NOT_SUPPORTED, "I2C feature is not supported");
RETVM_IF(i2c == NULL, PERIPHERAL_ERROR_INVALID_PARAMETER, "i2c handle is NULL");
ret = peripheral_gdbus_i2c_smbus_ioctl(i2c, I2C_SMBUS_WRITE, reg, I2C_SMBUS_WORD_DATA, data, &dummy);
#include <stdlib.h>
#include <unistd.h>
#include <assert.h>
+#include <system_info.h>
#include "peripheral_io.h"
#include "peripheral_gdbus_pwm.h"
#include "peripheral_common.h"
#include "peripheral_internal.h"
+#define PERIPHERAL_IO_PWM_FEATURE "http://tizen.org/feature/peripheral_io.pwm"
+
+#define PWM_FEATURE_UNKNOWN -1
+#define PWM_FEATURE_FALSE 0
+#define PWM_FEATURE_TRUE 1
+
+static int pwm_feature = PWM_FEATURE_UNKNOWN;
+
+static bool __is_feature_supported()
+{
+ bool feature = false;
+
+ if (pwm_feature == PWM_FEATURE_UNKNOWN) {
+ system_info_get_platform_bool(PERIPHERAL_IO_PWM_FEATURE, &feature);
+ pwm_feature = (feature ? PWM_FEATURE_TRUE : PWM_FEATURE_FALSE);
+ }
+
+ return (pwm_feature == PWM_FEATURE_TRUE ? true : false);
+}
+
+
int peripheral_pwm_open(int chip, int pin, peripheral_pwm_h *pwm)
{
peripheral_pwm_h handle;
int ret = PERIPHERAL_ERROR_NONE;
+ RETVM_IF(__is_feature_supported() == false, PERIPHERAL_ERROR_NOT_SUPPORTED, "PWM feature is not supported");
RETVM_IF(pwm == NULL, PERIPHERAL_ERROR_INVALID_PARAMETER, "Invalid pwm handle");
RETVM_IF(chip < 0 || pin < 0, PERIPHERAL_ERROR_INVALID_PARAMETER, "Invalid parameter");
{
int ret = PERIPHERAL_ERROR_NONE;
+ RETVM_IF(__is_feature_supported() == false, PERIPHERAL_ERROR_NOT_SUPPORTED, "PWM feature is not supported");
RETVM_IF(pwm == NULL, PERIPHERAL_ERROR_INVALID_PARAMETER, "pwm handle is NULL");
if ((ret = peripheral_gdbus_pwm_close(pwm)) < 0)
{
int ret;
+ RETVM_IF(__is_feature_supported() == false, PERIPHERAL_ERROR_NOT_SUPPORTED, "PWM feature is not supported");
RETVM_IF(pwm == NULL, PERIPHERAL_ERROR_INVALID_PARAMETER, "pwm handle is NULL");
ret = peripheral_gdbus_pwm_set_period(pwm, (int)period_ns);
{
int ret;
+ RETVM_IF(__is_feature_supported() == false, PERIPHERAL_ERROR_NOT_SUPPORTED, "PWM feature is not supported");
RETVM_IF(pwm == NULL, PERIPHERAL_ERROR_INVALID_PARAMETER, "pwm handle is NULL");
ret = peripheral_gdbus_pwm_set_duty_cycle(pwm, (int)duty_cycle_ns);
{
int ret;
+ RETVM_IF(__is_feature_supported() == false, PERIPHERAL_ERROR_NOT_SUPPORTED, "PWM feature is not supported");
RETVM_IF(pwm == NULL, PERIPHERAL_ERROR_INVALID_PARAMETER, "pwm handle is NULL");
RETVM_IF((polarity < PERIPHERAL_PWM_POLARITY_ACTIVE_HIGH) || (polarity > PERIPHERAL_PWM_POLARITY_ACTIVE_LOW), PERIPHERAL_ERROR_INVALID_PARAMETER, "Invalid polarity parameter");
{
int ret;
+ RETVM_IF(__is_feature_supported() == false, PERIPHERAL_ERROR_NOT_SUPPORTED, "PWM feature is not supported");
RETVM_IF(pwm == NULL, PERIPHERAL_ERROR_INVALID_PARAMETER, "pwm handle is NULL");
ret = peripheral_gdbus_pwm_set_enable(pwm, enable);
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
+#include <system_info.h>
#include "peripheral_io.h"
#include "peripheral_gdbus_spi.h"
#include "peripheral_common.h"
#include "peripheral_internal.h"
+#define PERIPHERAL_IO_SPI_FEATURE "http://tizen.org/feature/peripheral_io.spi"
+
+#define SPI_FEATURE_UNKNOWN -1
+#define SPI_FEATURE_FALSE 0
+#define SPI_FEATURE_TRUE 1
+
+static int spi_feature = SPI_FEATURE_UNKNOWN;
+
+static bool __is_feature_supported()
+{
+ bool feature = false;
+
+ if (spi_feature == SPI_FEATURE_UNKNOWN) {
+ system_info_get_platform_bool(PERIPHERAL_IO_SPI_FEATURE, &feature);
+ spi_feature = (feature ? SPI_FEATURE_TRUE : SPI_FEATURE_FALSE);
+ }
+
+ return (spi_feature == SPI_FEATURE_TRUE ? true : false);
+}
+
int peripheral_spi_open(int bus, int cs, peripheral_spi_h *spi)
{
peripheral_spi_h handle;
int ret = PERIPHERAL_ERROR_NONE;
+ RETVM_IF(__is_feature_supported() == false, PERIPHERAL_ERROR_NOT_SUPPORTED, "SPI feature is not supported");
RETVM_IF(spi == NULL, PERIPHERAL_ERROR_INVALID_PARAMETER, "Invalid spi handle");
RETVM_IF(bus < 0 || cs < 0, PERIPHERAL_ERROR_INVALID_PARAMETER, "Invalid parameter");
{
int ret = PERIPHERAL_ERROR_NONE;
+ RETVM_IF(__is_feature_supported() == false, PERIPHERAL_ERROR_NOT_SUPPORTED, "SPI feature is not supported");
RETVM_IF(spi == NULL, PERIPHERAL_ERROR_INVALID_PARAMETER, "spi handle is NULL");
ret = peripheral_gdbus_spi_close(spi);
{
int ret;
+ RETVM_IF(__is_feature_supported() == false, PERIPHERAL_ERROR_NOT_SUPPORTED, "SPI feature is not supported");
RETVM_IF(spi == NULL, PERIPHERAL_ERROR_INVALID_PARAMETER, "spi handle is NULL");
RETVM_IF((mode < PERIPHERAL_SPI_MODE_0) || (mode > PERIPHERAL_SPI_MODE_3), PERIPHERAL_ERROR_INVALID_PARAMETER, "Invalid spi mode parameter");
{
int ret;
+ RETVM_IF(__is_feature_supported() == false, PERIPHERAL_ERROR_NOT_SUPPORTED, "SPI feature is not supported");
RETVM_IF(spi == NULL, PERIPHERAL_ERROR_INVALID_PARAMETER, "spi handle is NULL");
RETVM_IF((bit_order < PERIPHERAL_SPI_BIT_ORDER_MSB) || (bit_order > PERIPHERAL_SPI_BIT_ORDER_LSB), PERIPHERAL_ERROR_INVALID_PARAMETER, "Invalid bit order parameter");
{
int ret;
+ RETVM_IF(__is_feature_supported() == false, PERIPHERAL_ERROR_NOT_SUPPORTED, "SPI feature is not supported");
RETVM_IF(spi == NULL, PERIPHERAL_ERROR_INVALID_PARAMETER, "spi handle is NULL");
ret = peripheral_gdbus_spi_set_bits_per_word(spi, (unsigned char)bits);
{
int ret;
+ RETVM_IF(__is_feature_supported() == false, PERIPHERAL_ERROR_NOT_SUPPORTED, "SPI feature is not supported");
RETVM_IF(spi == NULL, PERIPHERAL_ERROR_INVALID_PARAMETER, "spi handle is NULL");
ret = peripheral_gdbus_spi_set_frequency(spi, (unsigned int)freq_hz);
{
int ret;
+ RETVM_IF(__is_feature_supported() == false, PERIPHERAL_ERROR_NOT_SUPPORTED, "SPI feature is not supported");
RETVM_IF(spi == NULL, PERIPHERAL_ERROR_INVALID_PARAMETER, "spi handle is NULL");
RETVM_IF(data == NULL, PERIPHERAL_ERROR_INVALID_PARAMETER, "Invalid parameter");
{
int ret;
+ RETVM_IF(__is_feature_supported() == false, PERIPHERAL_ERROR_NOT_SUPPORTED, "SPI feature is not supported");
RETVM_IF(spi == NULL, PERIPHERAL_ERROR_INVALID_PARAMETER, "spi handle is NULL");
RETVM_IF(data == NULL, PERIPHERAL_ERROR_INVALID_PARAMETER, "Invalid parameter");
{
int ret;
+ RETVM_IF(__is_feature_supported() == false, PERIPHERAL_ERROR_NOT_SUPPORTED, "SPI feature is not supported");
RETVM_IF(spi == NULL, PERIPHERAL_ERROR_INVALID_PARAMETER, "spi handle is NULL");
RETVM_IF(txdata == NULL || rxdata == NULL, PERIPHERAL_ERROR_INVALID_PARAMETER, "Invalid parameter");
#include <stdlib.h>
#include <unistd.h>
#include <assert.h>
+#include <system_info.h>
#include "peripheral_io.h"
#include "peripheral_gdbus_uart.h"
#include "peripheral_common.h"
#include "peripheral_internal.h"
+#define PERIPHERAL_IO_UART_FEATURE "http://tizen.org/feature/peripheral_io.uart"
+
+#define UART_FEATURE_UNKNOWN -1
+#define UART_FEATURE_FALSE 0
+#define UART_FEATURE_TRUE 1
+
+static int uart_feature = UART_FEATURE_UNKNOWN;
+
+static bool __is_feature_supported()
+{
+ bool feature = false;
+
+ if (uart_feature == UART_FEATURE_UNKNOWN) {
+ system_info_get_platform_bool(PERIPHERAL_IO_UART_FEATURE, &feature);
+ uart_feature = (feature ? UART_FEATURE_TRUE : UART_FEATURE_FALSE);
+ }
+
+ return (uart_feature == UART_FEATURE_TRUE ? true : false);
+}
+
/**
* @brief Initializes uart communication and creates uart handle.
*/
peripheral_uart_h handle;
int ret;
+ RETVM_IF(__is_feature_supported() == false, PERIPHERAL_ERROR_NOT_SUPPORTED, "UART feature is not supported");
RETVM_IF(uart == NULL, PERIPHERAL_ERROR_INVALID_PARAMETER, "Invalid uart handle");
RETVM_IF(port < 0, PERIPHERAL_ERROR_INVALID_PARAMETER, "Invalid port number");
{
int ret;
+ RETVM_IF(__is_feature_supported() == false, PERIPHERAL_ERROR_NOT_SUPPORTED, "UART feature is not supported");
RETVM_IF(uart == NULL, PERIPHERAL_ERROR_INVALID_PARAMETER, "uart handle is NULL");
ret = peripheral_gdbus_uart_close(uart);
{
int ret;
+ RETVM_IF(__is_feature_supported() == false, PERIPHERAL_ERROR_NOT_SUPPORTED, "UART feature is not supported");
RETVM_IF(uart == NULL, PERIPHERAL_ERROR_INVALID_PARAMETER, "uart handle is NULL");
RETVM_IF((baud < PERIPHERAL_UART_BAUD_RATE_0) || (baud > PERIPHERAL_UART_BAUD_RATE_230400), PERIPHERAL_ERROR_INVALID_PARAMETER, "Invalid baud input");
{
int ret;
+ RETVM_IF(__is_feature_supported() == false, PERIPHERAL_ERROR_NOT_SUPPORTED, "UART feature is not supported");
RETVM_IF(uart == NULL, PERIPHERAL_ERROR_INVALID_PARAMETER, "uart handle is NULL");
RETVM_IF((byte_size < PERIPHERAL_UART_BYTE_SIZE_5BIT) || (byte_size > PERIPHERAL_UART_BYTE_SIZE_8BIT), PERIPHERAL_ERROR_INVALID_PARAMETER, "Invalid parameter");
{
int ret;
+ RETVM_IF(__is_feature_supported() == false, PERIPHERAL_ERROR_NOT_SUPPORTED, "UART feature is not supported");
RETVM_IF(uart == NULL, PERIPHERAL_ERROR_INVALID_PARAMETER, "uart handle is NULL");
RETVM_IF((parity < PERIPHERAL_UART_PARITY_NONE) || (parity > PERIPHERAL_UART_PARITY_ODD), PERIPHERAL_ERROR_INVALID_PARAMETER, "Invalid parameter");
{
int ret;
+ RETVM_IF(__is_feature_supported() == false, PERIPHERAL_ERROR_NOT_SUPPORTED, "UART feature is not supported");
RETVM_IF(uart == NULL, PERIPHERAL_ERROR_INVALID_PARAMETER, "uart handle is NULL");
RETVM_IF((stop_bits < PERIPHERAL_UART_STOP_BITS_1BIT) || (stop_bits > PERIPHERAL_UART_STOP_BITS_2BIT), PERIPHERAL_ERROR_INVALID_PARAMETER, "Invalid parameter");
{
int ret;
+ RETVM_IF(__is_feature_supported() == false, PERIPHERAL_ERROR_NOT_SUPPORTED, "UART feature is not supported");
RETVM_IF(uart == NULL, PERIPHERAL_ERROR_INVALID_PARAMETER, "uart handle is NULL");
RETVM_IF((sw_flow_control < PERIPHERAL_UART_SOFTWARE_FLOW_CONTROL_NONE) || (sw_flow_control > PERIPHERAL_UART_SOFTWARE_FLOW_CONTROL_XONXOFF), PERIPHERAL_ERROR_INVALID_PARAMETER, "Invalid sw_flow_control parameter");
RETVM_IF((hw_flow_control < PERIPHERAL_UART_HARDWARE_FLOW_CONTROL_NONE) || (hw_flow_control > PERIPHERAL_UART_HARDWARE_FLOW_CONTROL_AUTO_RTSCTS), PERIPHERAL_ERROR_INVALID_PARAMETER, "Invalid hw_flow_control parameter");
{
int ret;
+ RETVM_IF(__is_feature_supported() == false, PERIPHERAL_ERROR_NOT_SUPPORTED, "UART feature is not supported");
RETVM_IF(uart == NULL, PERIPHERAL_ERROR_INVALID_PARAMETER, "uart handle is NULL");
RETVM_IF(data == NULL, PERIPHERAL_ERROR_INVALID_PARAMETER, "Invalid parameter");
{
int ret;
+ RETVM_IF(__is_feature_supported() == false, PERIPHERAL_ERROR_NOT_SUPPORTED, "UART feature is not supported");
RETVM_IF(uart == NULL, PERIPHERAL_ERROR_INVALID_PARAMETER, "uart handle is NULL");
RETVM_IF(data == NULL, PERIPHERAL_ERROR_INVALID_PARAMETER, "Invalid parameter");