ATY_LIB V2_102_230218
ATY_LIB for general devices or ALGO
 
Loading...
Searching...
No Matches
fw_mem.c
Go to the documentation of this file.
1// Copyright 2021 IOsetting <iosetting(at)outlook.com>
2//
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#include "fw_mem.h"
16
18{
19 RS0 = WorkRegGroup & 0x01;
20 RS1 = (WorkRegGroup >> 1) & 0x01;
21}
22
24{
25 AUXR = AUXR & ~(0x01 << 1) | (HAL_State << 1);
26}
27
28#if (__CONF_MCU_TYPE == 3 )
30{
31 uint8_t i;
32 P_SW2 = 0x80;
33 for (i = 0; i < 32; i++)
34 {
35 *(buff + i) = MEM_ReadXDATA(CHIPIDxx + i);
36 }
37 P_SW2 = 0x00;
38}
39#endif
__XDATA uint8_t buff[7]
Definition: ds3231.c:17
void MEM_SelectWorkRegGroup(MEM_WorkRegGroup_t WorkRegGroup)
Definition: fw_mem.c:17
void MEM_SetOnchipExtRAM(HAL_State_t HAL_State)
Definition: fw_mem.c:23
MEM_WorkRegGroup_t
Definition: fw_mem.h:26
void MEM_ReadChipID(uint8_t *buff)
#define MEM_ReadXDATA(__ADDR__)
Definition: fw_mem.h:23
#define CHIPIDxx
Definition: fw_reg_stc8h.h:391
HAL_State_t
Definition: fw_types.h:69
unsigned char uint8_t
Definition: fw_types.h:18
uint8_t __XDATA i