1 /***************************************************************************
2  * Copyright (c) 2024 Microsoft Corporation
3  *
4  * This program and the accompanying materials are made available under the
5  * terms of the MIT License which is available at
6  * https://opensource.org/licenses/MIT.
7  *
8  * SPDX-License-Identifier: MIT
9  **************************************************************************/
10 
11 
12 /**************************************************************************/
13 /**************************************************************************/
14 /**                                                                       */
15 /** LevelX Component                                                      */
16 /**                                                                       */
17 /**   NOR Flash                                                           */
18 /**                                                                       */
19 /**************************************************************************/
20 /**************************************************************************/
21 
22 #define LX_SOURCE_CODE
23 
24 
25 /* Include necessary system files.  */
26 
27 #include "lx_api.h"
28 
29 
30 /* Define the NOR flash opened list head and opened count.  */
31 
32 LX_NOR_FLASH   *_lx_nor_flash_opened_ptr;
33 ULONG           _lx_nor_flash_opened_count;
34 
35 
36 /**************************************************************************/
37 /*                                                                        */
38 /*  FUNCTION                                               RELEASE        */
39 /*                                                                        */
40 /*    _lx_nor_flash_initialize                            PORTABLE C      */
41 /*                                                           6.1.7        */
42 /*  AUTHOR                                                                */
43 /*                                                                        */
44 /*    William E. Lamie, Microsoft Corporation                             */
45 /*                                                                        */
46 /*  DESCRIPTION                                                           */
47 /*                                                                        */
48 /*    This function initializes the NOR flash data structures.            */
49 /*                                                                        */
50 /*  INPUT                                                                 */
51 /*                                                                        */
52 /*    None                                                                */
53 /*                                                                        */
54 /*  OUTPUT                                                                */
55 /*                                                                        */
56 /*    return status                                                       */
57 /*                                                                        */
58 /*  CALLS                                                                 */
59 /*                                                                        */
60 /*    None                                                                */
61 /*                                                                        */
62 /*  CALLED BY                                                             */
63 /*                                                                        */
64 /*    Application Code                                                    */
65 /*                                                                        */
66 /*  RELEASE HISTORY                                                       */
67 /*                                                                        */
68 /*    DATE              NAME                      DESCRIPTION             */
69 /*                                                                        */
70 /*  05-19-2020     William E. Lamie         Initial Version 6.0           */
71 /*  09-30-2020     William E. Lamie         Modified comment(s),          */
72 /*                                            resulting in version 6.1    */
73 /*  06-02-2021     Bhupendra Naphade        Modified comment(s),          */
74 /*                                            resulting in version 6.1.7  */
75 /*                                                                        */
76 /**************************************************************************/
_lx_nor_flash_initialize(void)77 UINT  _lx_nor_flash_initialize(void)
78 {
79 
80     /* Clear open list head pointer and opened count.  */
81     _lx_nor_flash_opened_ptr =    LX_NULL;
82     _lx_nor_flash_opened_count =  0;
83 
84     /* Return success!  */
85     return(LX_SUCCESS);
86 }
87 
88