• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2022 ASR Microelectronics (Shanghai) Co., Ltd. All rights reserved.
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at
6  *
7  *     http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  */
15 
16 #ifndef _DUET_EFUSE_H_
17 #define _DUET_EFUSE_H_
18 
19 #define EFUSE_READ_OP_WAIT_CYCLE        5
20 #define EFUSE_WRITE_OP_WAIT_CYCLE       (SYSTEM_CLOCK/100000) // 10us
21 #define EFUSE_DIV_OP_WAIT_CYCLE         31
22 
23 #define EFUSE_LDO25_OPEN  1
24 #define EFUSE_LDO25_CLOSE 0
25 
26 void duet_efuse_init(uint8_t ldo25_open);
27 
28 uint8_t duet_efuse_byte_read(uint16_t addr);
29 
30 uint32_t duet_efuse_word_read(uint16_t addr);
31 
32 void duet_efuse_byte_write(uint16_t addr, uint8_t data);
33 
34 void duet_efuse_word_write(uint16_t addr, uint32_t data);
35 
36 void duet_efuse_multi_read(uint16_t start_addr, uint16_t size_in_bytes, uint8_t *pData);
37 
38 #endif // _LEGA_EFUSE_H_
39