jturnsek commented on code in PR #9024: URL: https://github.com/apache/nuttx/pull/9024#discussion_r1173666215
########## arch/arm/src/imxrt/imxrt_flexio.c: ########## @@ -0,0 +1,909 @@ +/**************************************************************************** + * arch/arm/src/imxrt/imxrt_flexio.c + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. The + * ASF licenses this file to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance with the + * License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. + * + ****************************************************************************/ + +/**************************************************************************** + * Included Files + ****************************************************************************/ + +#include <nuttx/config.h> + +#include <sys/types.h> +#include <stdint.h> +#include <stdbool.h> +#include <stdlib.h> +#include <string.h> +#include <errno.h> +#include <assert.h> +#include <debug.h> + +#include <arch/board/board.h> + +#include <nuttx/arch.h> +#include <nuttx/wdog.h> +#include <nuttx/clock.h> +#include <nuttx/kmalloc.h> +#include <nuttx/mutex.h> + +#include "arm_internal.h" +#include "barriers.h" + +#include "imxrt_gpio.h" +#include "imxrt_periphclks.h" +#include "imxrt_flexio.h" +#include "hardware/imxrt_flexio.h" + +#ifdef CONFIG_IMXRT_FLEXIO + +/**************************************************************************** + * Private Types + ****************************************************************************/ + +/* The state of the FlexIO controller. */ + +struct imxrt_flexiodev_s +{ + struct flexio_dev_s flexio; /* Externally visible part of the FlexIO interface */ + uint32_t base; /* FlexIO controller register base address */ + bool initialized; /* TRUE: Controller has been initialized */ +}; + +struct flexio_config_s +{ + bool enable_flexio; /* Enable/disable FlexIO module */ + bool enable_indoze; /* Enable/disable FlexIO operation in doze mode */ + bool enable_indebug; /* Enable/disable FlexIO operation in debug mode */ + bool enable_fast_access; /* Enable/disable fast access to FlexIO registers, fast access requires + * the FlexIO clock to be at least twice the frequency of the bus clock. */ +}; + +static void imxrt_flexio_reset( Review Comment: You mean, we do not need reset function at all? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org