static int peripheral_gpio_set_initial_edge_into_handle(peripheral_gpio_h gpio)
{
- static predefined_type_s types[4] = {
+ static const predefined_type_s types[4] = {
{"none", 4},
{"rising", 6},
{"falling", 7},
RETV_IF(gpio->direction == direction, PERIPHERAL_ERROR_NONE);
RETV_IF(gpio->edge != PERIPHERAL_GPIO_EDGE_NONE, PERIPHERAL_ERROR_IO_ERROR);
- static predefined_type_s types[3] = {
+ static const predefined_type_s types[3] = {
{"in", 2},
{"high", 4},
{"low", 3}
RETV_IF(gpio->edge == edge, PERIPHERAL_ERROR_NONE);
RETV_IF(gpio->direction != PERIPHERAL_GPIO_DIRECTION_IN, PERIPHERAL_ERROR_IO_ERROR);
- static predefined_type_s types[4] = {
+ static const predefined_type_s types[4] = {
{"none", 4},
{"rising", 6},
{"falling", 7},
*/
RETV_IF(gpio->direction == PERIPHERAL_GPIO_DIRECTION_IN, PERIPHERAL_ERROR_IO_ERROR);
- static predefined_type_s types[2] = {
+ static const predefined_type_s types[2] = {
{"0", 1},
{"1", 1}
};
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");
- static predefined_type_s types[2] = {
+ static const predefined_type_s types[2] = {
{"normal", 6},
{"inversed", 8}
};
RETVM_IF(!__is_feature_supported(), PERIPHERAL_ERROR_NOT_SUPPORTED, "PWM feature is not supported");
RETVM_IF(pwm == NULL, PERIPHERAL_ERROR_INVALID_PARAMETER, "pwm handle is NULL");
- static predefined_type_s types[2] = {
+ static const predefined_type_s types[2] = {
{"0", 1},
{"1", 1}
};