1/* 2 * Copyright 2020, Data61 3 * Commonwealth Scientific and Industrial Research Organisation (CSIRO) 4 * ABN 41 687 119 230. 5 * 6 * This software may be distributed and modified according to the terms of 7 * the BSD 2-Clause license. Note that NO WARRANTY is provided. 8 * See "LICENSE_BSD2.txt" for details. 9 * 10 * @TAG(DATA61_BSD) 11 */ 12 13#include <assert.h> 14#include <string.h> 15#include <errno.h> 16#include <camkes.h> 17#include <camkes/io.h> 18#include <utils/util.h> 19#include <gpiomuxserver.h> 20 21/*- set connection_name = configuration[me.parent.name].get('connection_name') -*/ 22mux_sys_t /*? connection_name?*/_server_wrapper; 23 24static int MUXServer_client_init(ps_io_ops_t *io_ops) { 25 26 int error = gpiomuxserver_mux_interface_init(/*? connection_name?*/_feature_enable, /*? connection_name?*/_feature_disable, 27 &/*? connection_name?*/_server_wrapper); 28 if (error) { 29 ZF_LOGE("Failed to initialise the GPIOMUXServer interface"); 30 return error; 31 } 32 33 return 0; 34} 35 36CAMKES_PRE_INIT_MODULE_DEFINE(mux_client_setup, MUXServer_client_init); 37