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