raiden00pl commented on code in PR #10328: URL: https://github.com/apache/nuttx/pull/10328#discussion_r1304229615
########## arch/arm/src/stm32h7/stm32_hsem.c: ########## @@ -0,0 +1,291 @@ +/**************************************************************************** + * arch/arm/src/stm32h7/stm32_hsem.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 <debug.h> + +#include "nvic.h" + +#include "arm_internal.h" +#include "stm32_hsem.h" + +/**************************************************************************** + * Private Types + ****************************************************************************/ + +/* HSEM receive channel configuration */ + +struct stm32_hsem_recv_s +{ + hsem_callback_t callback; + void *args; +}; + +/* HSEM device */ + +struct stm32_hsem_s +{ + struct stm32_hsem_recv_s recv[STM32_HSEM_CHANS]; + uint32_t irq; + uint8_t block; +}; + +/**************************************************************************** + * Private Data + ****************************************************************************/ + +struct stm32_hsem_s g_stm32_hsem; + +/**************************************************************************** + * Private Functions + ****************************************************************************/ + +/**************************************************************************** + * Name: stm32_hsem_interrupt + ****************************************************************************/ + +static int stm32_hsem_interrupt(int irq, void *context, void *args) +{ + struct stm32_hsem_s *dev = args; + uint32_t regval = 0; + int i = 0; + + regval = getreg32(STM32_HSEM_CXMISR(dev->block)); + + _info("HSEM interrupt 0x%" PRIx32 "\n", regval); + + for (i = 0; i < STM32_HSEM_CHANS; i += 1) Review Comment: fixed ########## arch/arm/src/stm32h7/stm32_mpuinit.c: ########## @@ -42,18 +58,25 @@ * Name: stm32_mpuinitialize * * Description: - * Configure the MPU to permit user-space access to only restricted SAM3U - * resources. + * Configure the MPU. + * + * If PROTETECTED build: Review Comment: fixed -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
