TimJTi commented on code in PR #9252: URL: https://github.com/apache/nuttx/pull/9252#discussion_r1193983370
########## include/nuttx/efuse/sama5_sfc_fuses.h: ########## @@ -0,0 +1,247 @@ +/**************************************************************************** + * include/nuttx/efuse/sama5_sfc_fuses.h + * + * 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. + * + ****************************************************************************/ + +#ifndef __INCLUDE_NUTTX_EFUSE_SAMA5_FUSES_H +#define __INCLUDE_NUTTX_EFUSE_SAMA5_FUSES_H + +/**************************************************************************** + * Pre-processor Definitions + ****************************************************************************/ + +#if defined(ATSAMA5D2) +#define SAM_SFC_EFUSE_MAX_LEN 544 /* Max length of sfc area. */ +#elif defined ATSAMA5D4 +#define SAM_SFC_EFUSE_MAX_LEN 512 /* Max length of sfc area. */ +#endif + +/**************************************************************************** + * Included Files + ****************************************************************************/ + +/**************************************************************************** + * Type Definitions + ****************************************************************************/ + +#if defined(CONFIG_EFUSE) && defined(CONFIG_SAMA5_SFC) Review Comment: My test app references them. There is no documentation, so I have had to make assumptions. For example ``` static const efuse_desc_t SAMA5_SFC_SECURE_DEBUG[] = { { 543, 1 }, }; ``` This refers to a very specific fuse and you need this const to be able to access it. If it isn't declared somewhere that an app can "find" it then it is not helpful. I know this specific fuse probably should not be accessed from an app anyway, but I use it as an example. This is why I have declared generic 32 bit wide constants that at least provide a reference for the app writer to refer to, otherwise it is guess work. I added the comment for just this reason: ``` /* Generic descriptions for the SAM SFC fuses, 32 bits wide. * These can be replaced by user definitions in board code if required. */ ``` If this is NOT the way the efuse system should be used/implemented, please explain as there is nothing anywhere I can find other than the few comments in efuse.c! -- 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]
