From f3f228d4bac73d2e71371d5978f9660252ce895c Mon Sep 17 00:00:00 2001 From: liumin Date: Sun, 6 Jul 2025 16:11:56 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=A0=E9=99=A4=20IO.C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- IO.C | 296 ----------------------------------------------------------- 1 file changed, 296 deletions(-) delete mode 100644 IO.C diff --git a/IO.C b/IO.C deleted file mode 100644 index ab7720d..0000000 --- a/IO.C +++ /dev/null @@ -1,296 +0,0 @@ -//**************************************************************************** -// @Module GPIO -// @Filename IO.C -// @Project CL2.0.dav -//---------------------------------------------------------------------------- -// @Controller Infineon XC886CLM-8FF -// -// @Compiler Keil -// -// @Codegenerator 1.3 -// -// @Description: This file contains functions that use the IO module. -// -//---------------------------------------------------------------------------- -// @Date 2025/1/18 20:45:29 -// -//**************************************************************************** - -// USER CODE BEGIN (IO_General,1) - -// USER CODE END - - - -//**************************************************************************** -// @Project Includes -//**************************************************************************** - -#include "MAIN.H" - -// USER CODE BEGIN (IO_General,2) - -// USER CODE END - - -//**************************************************************************** -// @Macros -//**************************************************************************** - -// USER CODE BEGIN (IO_General,3) - -// USER CODE END - - -//**************************************************************************** -// @Defines -//**************************************************************************** - -// USER CODE BEGIN (IO_General,4) - -// USER CODE END - - -//**************************************************************************** -// @Typedefs -//**************************************************************************** - -// USER CODE BEGIN (IO_General,5) - -// USER CODE END - - -//**************************************************************************** -// @Imported Global Variables -//**************************************************************************** - -// USER CODE BEGIN (IO_General,6) - -// USER CODE END - - -//**************************************************************************** -// @Global Variables -//**************************************************************************** - -// USER CODE BEGIN (IO_General,7) - -// USER CODE END - - -//**************************************************************************** -// @External Prototypes -//**************************************************************************** - -// USER CODE BEGIN (IO_General,8) - -// USER CODE END - - -//**************************************************************************** -// @Prototypes Of Local Functions -//**************************************************************************** - -// USER CODE BEGIN (IO_General,9) - -// USER CODE END - - -//**************************************************************************** -// @Function void IO_vInit(void) -// -//---------------------------------------------------------------------------- -// @Description This is the initialization function of the IO function -// library. It is assumed that the SFRs used by this library -// are in their reset state. -// -//---------------------------------------------------------------------------- -// @Returnvalue None -// -//---------------------------------------------------------------------------- -// @Parameters None -// -//---------------------------------------------------------------------------- -// @Date 2025/1/18 -// -//**************************************************************************** - -// USER CODE BEGIN (IO_Init,1) - -// USER CODE END - -void IO_vInit(void) -{ - // USER CODE BEGIN (IO_Init,2) - - // USER CODE END - - - /// *********************************************************************** - /// Note : All peripheral related IO configurations are done in the - /// respective peripheral modules (alternate functions selection) - /// - /// If no pins are selected DAvE assumes that registers are in default - /// settings - /// *********************************************************************** - - /// ----------------------------------------------------------------------- - /// Configuration of Port P0: - /// ----------------------------------------------------------------------- - /// P0.0: - /// - is used as general purpose output - /// - push/pull output is selected - /// - the pin status is low level - /// - pull-down device is assigned - /// P0.1: - /// - is used as alternate input for the UART Receive Input - /// - pull-up device is assigned - /// P0.2: - /// - is used as general purpose output - /// - push/pull output is selected - /// - the pin status is high level - /// - pull-up device is assigned - /// P0.3: - /// - is used as general purpose output - /// - open drain output is selected - /// - the pin status is high level - /// - pull-up device is assigned - /// P0.5: - /// - is used as alternate input for the External Interrupt Input 0 - /// - pull-up device is assigned - - SFR_PAGE(_pp3, noSST); // switch to page 3 - P0_OD = 0x08; // load open-drain register - - SFR_PAGE(_pp1, noSST); // switch to page 1 - P0_PUDSEL = 0xFE; // load pullup/pulldown select register - P0_PUDEN = 0xEF; // load pullup/pulldown enable register - - SFR_PAGE(_pp0, noSST); // switch to page 0 - P0_DIR = 0x0D; // load direction register - P0_DATA = 0x0C; // load data output register - - - /// ----------------------------------------------------------------------- - /// Configuration of Port P1: - /// ----------------------------------------------------------------------- - /// P1.0: - /// - is used as alternate input for the MCAN Node 0 Receiver Input - /// - pull-up device is assigned - /// P1.1: - /// - is used as alternate output for the MCAN Node 0 Transmitter Output - /// - push/pull output is selected - /// - pull-up device is assigned - /// P1.2: - /// - is used as general input - /// - pull-up device is assigned - /// P1.3: - /// - is used as general input - /// - pull-up device is assigned - /// P1.4: - /// - is used as general input - /// - pull-up device is assigned - /// P1.5: - /// - is used as general purpose output - /// - push/pull output is selected - /// - the pin status is low level - /// - pull-down device is assigned - /// P1.6: - /// - is used as general purpose output - /// - push/pull output is selected - /// - the pin status is low level - /// - pull device is disabled (tristate) - - SFR_PAGE(_pp3, noSST); // switch to page 3 - P1_OD = 0x00; // load open-drain register - - SFR_PAGE(_pp1, noSST); // switch to page 1 - P1_PUDSEL = 0xDF; // load pullup/pulldown select register - P1_PUDEN = 0xBF; // load pullup/pulldown enable register - - SFR_PAGE(_pp0, noSST); // switch to page 0 - P1_DIR = 0x60; // load direction register - - - /// ----------------------------------------------------------------------- - /// Configuration of Port P2: - /// ----------------------------------------------------------------------- - /// - no pin of port P2 is used - - /// ----------------------------------------------------------------------- - /// Configuration of Port P3: - /// ----------------------------------------------------------------------- - /// P3.2: - /// - is used as general purpose output - /// - open drain output is selected - /// - the pin status is low level - /// - pull-up device is assigned - /// P3.3: - /// - is used as general purpose output - /// - open drain output is selected - /// - the pin status is low level - /// - pull-up device is assigned - /// P3.4: - /// - is used as general purpose output - /// - open drain output is selected - /// - the pin status is low level - /// - pull-up device is assigned - /// P3.5: - /// - is used as general purpose output - /// - open drain output is selected - /// - the pin status is low level - /// - pull-up device is assigned - /// P3.6: - /// - is used as general purpose output - /// - push/pull output is selected - /// - the pin status is low level - /// - pull-down device is assigned - /// P3.7: - /// - is used as general purpose output - /// - push/pull output is selected - /// - the pin status is low level - /// - pull-down device is assigned - - SFR_PAGE(_pp3, noSST); // switch to page 3 - P3_OD = 0x3C; // load open-drain register - - SFR_PAGE(_pp1, noSST); // switch to page 1 - P3_PUDSEL = 0x3F; // load pullup/pulldown select register - P3_PUDEN = 0xFC; // load pullup/pulldown enable register - - SFR_PAGE(_pp0, noSST); // switch to page 0 - P3_DIR = 0xFC; // load direction register - - - /// ----------------------------------------------------------------------- - /// Configuration of Port P4: - /// ----------------------------------------------------------------------- - /// P4.3: - /// - is used as general purpose output - /// - push/pull output is selected - /// - the pin status is low level - /// - pull-down device is assigned - - - SFR_PAGE(_pp1, noSST); // switch to page 1 - P4_PUDSEL = 0x00; // load pullup/pulldown select register - P4_PUDEN = 0x08; // load pullup/pulldown enable register - - SFR_PAGE(_pp0, noSST); // switch to page 0 - P4_DIR = 0x08; // load direction register - - - - // USER CODE BEGIN (IO_Init,3) - - // USER CODE END - -} // End of function IO_vInit - - - - -// USER CODE BEGIN (IO_General,10) - -// USER CODE END -