S32K144_MDK_Projet1_Freertos LED
所属分类:单片机开发
开发工具:C/C++
文件大小:4702KB
下载次数:39
上传日期:2018-08-09 16:01:02
上 传 者:
WalkerXiao
说明: S32K144_ Keil MDK开发 Freertos GPIO操作 LED例程
(S32K144_ Keil MDK Development Freertos GPIO Operation LED Routine)
文件列表:
S32K144_MDK_Projet1_Freertos0418 (0, 2018-07-19)
S32K144_MDK_Projet1_Freertos0418\EventRecorderStub.scvd (339, 2017-08-01)
S32K144_MDK_Projet1_Freertos0418\led.uvguix.Administrator (180874, 2018-04-18)
S32K144_MDK_Projet1_Freertos0418\led.uvguix.Walker-Xiao (90167, 2018-07-19)
S32K144_MDK_Projet1_Freertos0418\led.uvoptx (7174, 2018-07-19)
S32K144_MDK_Projet1_Freertos0418\led.uvprojx (21823, 2018-07-12)
S32K144_MDK_Projet1_Freertos0418\Listings (0, 2017-07-27)
S32K144_MDK_Projet1_Freertos0418\Listings\led.map (137764, 2018-04-18)
S32K144_MDK_Projet1_Freertos0418\Listings\startup_s32k144.lst (131222, 2018-04-18)
S32K144_MDK_Projet1_Freertos0418\Objects (0, 2018-04-18)
S32K144_MDK_Projet1_Freertos0418\Objects\clock_manager.crf (489947, 2017-07-26)
S32K144_MDK_Projet1_Freertos0418\Objects\clock_manager.d (2299, 2017-07-26)
S32K144_MDK_Projet1_Freertos0418\Objects\clock_manager.o (519508, 2017-07-26)
S32K144_MDK_Projet1_Freertos0418\Objects\clock_s32k144.crf (496545, 2017-07-26)
S32K144_MDK_Projet1_Freertos0418\Objects\clock_s32k144.d (2188, 2017-07-26)
S32K144_MDK_Projet1_Freertos0418\Objects\clock_s32k144.o (562928, 2017-07-26)
S32K144_MDK_Projet1_Freertos0418\Objects\croutine.crf (47258, 2018-04-18)
S32K144_MDK_Projet1_Freertos0418\Objects\croutine.d (1471, 2018-04-18)
S32K144_MDK_Projet1_Freertos0418\Objects\croutine.o (43496, 2018-04-18)
S32K144_MDK_Projet1_Freertos0418\Objects\event_groups.crf (59317, 2018-04-18)
S32K144_MDK_Projet1_Freertos0418\Objects\event_groups.d (1621, 2018-04-18)
S32K144_MDK_Projet1_Freertos0418\Objects\event_groups.o (68864, 2018-04-18)
S32K144_MDK_Projet1_Freertos0418\Objects\ExtDll.iex (19, 2017-08-01)
S32K144_MDK_Projet1_Freertos0418\Objects\flexio_hal.crf (465160, 2017-07-26)
S32K144_MDK_Projet1_Freertos0418\Objects\flexio_hal.d (1169, 2017-07-26)
S32K144_MDK_Projet1_Freertos0418\Objects\flexio_hal.o (493572, 2017-07-26)
S32K144_MDK_Projet1_Freertos0418\Objects\freertos_evr.crf (63282, 2018-04-18)
S32K144_MDK_Projet1_Freertos0418\Objects\freertos_evr.d (1946, 2018-04-18)
S32K144_MDK_Projet1_Freertos0418\Objects\freertos_evr.o (62580, 2018-04-18)
S32K144_MDK_Projet1_Freertos0418\Objects\heap_4.crf (52575, 2018-04-18)
S32K144_MDK_Projet1_Freertos0418\Objects\heap_4.d (1338, 2018-04-18)
S32K144_MDK_Projet1_Freertos0418\Objects\heap_4.o (56376, 2018-04-18)
S32K144_MDK_Projet1_Freertos0418\Objects\led.axf (150332, 2018-04-18)
S32K144_MDK_Projet1_Freertos0418\Objects\led.build_log.htm (4956, 2018-04-18)
S32K144_MDK_Projet1_Freertos0418\Objects\led.htm (101454, 2018-04-18)
S32K144_MDK_Projet1_Freertos0418\Objects\led.lnp (601, 2018-04-18)
S32K144_MDK_Projet1_Freertos0418\Objects\led.sct (479, 2017-07-26)
S32K144_MDK_Projet1_Freertos0418\Objects\led_s32k144-evb.crf (453894, 2017-07-27)
S32K144_MDK_Projet1_Freertos0418\Objects\led_s32k144-evb.d (1477, 2017-07-27)
S32K144_MDK_Projet1_Freertos0418\Objects\led_s32k144-evb.o (502780, 2017-07-27)
... ...
/**
** @ingroup soc_header
** @defgroup soc_header_usage Header File Usage
** @{
**
** ## Introduction ##
**
** The following lines describe our recommendations of usage for the S32 SDK
** header files that are supposed to improve both code reuse and code
** portability.\n
** It presents typical use cases such as:
** - 1. Initialize register
** - 2. Initialize bit / bit-field
** - 3. Set bit-field in register
** - 4. Clear bit-field in register
** - 5. Read bit / bit-field
** - 6. Initialize bit using read/modify/write solution
** - 7. Modifying register values when at least 1 bit is w1c
** - 8. Using Interrupts
** .
** Any assignment of a hard coded value is highly discouraged. It is recommended
** the usage of variables or macros for code consistency and reuse reasons.\n
** Information contained in the Header Files:
** - Interrupt vector numbers\n
** Example:
** @code
** HardFault_IRQn = -13
** MemoryManagement_IRQn = -12
** BusFault_IRQn = -11
** ...
** @endcode
**
** - Peripheral device memory map\n
** Example:
** @code
** typedef struct {
** ...
** __IO uint32_t YOFS;
** __IO uint32_t G;
** __IO uint32_t UG;
** __IO uint32_t CLPS;
** ...
** } ADC_Type, *ADC_MemMapPtr;
** @endcode
**
** - Peripheral device register access macros:\n
** + a macro which speecifies the bit-field mask
** + a macro which speecifies the bit-field offset
** + a macro which speecifies the bit-field width
** + a macro which maps a value to a bit-field
** .
** Example:
** @code
** #define ADC_YOFS_YOFS_MASK 0xFFu
** #define ADC_YOFS_YOFS_SHIFT 0u
** #define ADC_YOFS_YOFS_WIDTH 8u
** #define ADC_YOFS_YOFS(x) (((uint32_t)(((uint32_t)(x))< General form:
** @code
** _BASE_PTRS->regName = value;
** @endcode
**
** Example:
** @code
** #define PIN_PTR 5U
** PORTC->PCR[PIN_PTR] = regValue;
** @endcode
**
** ### 2. Initialize bit / bit-field \n###
**
** This method is used for initializing a bit or bit-field.\n
** The benefit of using this method is that modifications of register addresses
** or bit-field offsets will not require code changes when this method is used.
** \n
** General form:
** @code
** _BASE_PTRS->regName &= ~MASK;
** _BASE_PTRS->regName |= (value << SHIFT) & MASK;
** @endcode
**
** Example:
** @code
** #define PIN_IDX 5U
** GPIO_PORT->PTOR &= ~GPIO_PTOR_PTTO_MASK;
** GPIO_PORT->PTOR |= GPIO_PTOR_PTTO(PIN_IDX);
** @endcode
**
** ### 3. Set bit-field in register \n###
**
** This method is used to perform a bitwise OR between a bit-field and a given
** value.\n
**
** General form:
** @code
** _BASE_PTRS->regName |= (value << shift) & MASK ;
** @endcode
**
** Example:
** @code
** GPIO_PORT->PTOR |= (value << GPIO_PTOR_PTTO_SHIFT) & GPIO_PTOR_PTTO_MASK;
** @endcode
**
** ### 4. Clear bit-field in register \n###
**
** This method is used for clearing a bit-field in a register.\n
** For registers where there is at least one w1c bit please see section 8.\n
**
** General form:
** @code
** _BASE_PTRS->regName &= ~MASK;
** @endcode
**
** Example:
** @code
** GPIO_PORT->PTOR &= ~GPIO_PTOR_PTTO_MASK;
** @endcode
**
** ### 5. Read bit / bit-field \n###
**
** This method is used for reading the value of a bit-field from a register.
**
** General form:
** @code
** x = (_BASE_PTRS->regName & mask) >> shift
** @endcode
**
** Example:
** @code
** pcr_mux_value = (base->PCR[pin] & PORT_PCR_MUX_MASK) >> PORT_PCR_MUX_SHIFT;
** @endcode
**
** ### 6. Initialize bit using read/modify/write solution ###
**
** This method is used for clearing / setting a value to a bit in a
** register taking into consideration the previous value.\n
** For w1c bits please consult section 8.
**
** General form:
** @code
** regValue = _BASE_PTRS->regName;
** regValue &= ~MASK;
** regValue |= (value << shift) & MASK;
** _BASE_PTRS->regName = regValue;
** @endcode
**
** Example:
** @code
** regValue = base->PCR[pin];
** regValue &= ~(PORT_PCR_MUX_MASK);
** regValue |= PORT_PCR_MUX(pcr_mux_value);
** base->PCR[pin] = regValue;
** @endcode
**
** ### 7. Modifying register values when at least 1 bit is w1c \n###
** When a register has at least one W1C bit different approaches are suggested
** depending on each particular case:
** - clearing a w1c bit in registers where there are only w1c bits\n
** For this case it is recommended that the bit mask is written at the
** register address.\n
** General form:
** @code
** _BASE_PTRS->regName = MASK;
** @endcode
**
** Example:
** @code
** LPI2C_BASE_PTRS->MSR = LPI2C_MSR_RDF_MASK;
** @endcode
**
** - clearing a w1c bit in registers where there are also "normal" bits\n
** For this case it is recommended that a read-modify-write method is
** used with the mask of the bit-field that will leave the values of
** the other bits unchanged.\n
** General form:
** @code
** _BASE_PTRS->regName |= MASK;
** @endcode
**
** Example:
** @code
** CMP_BASE_PTRS->C0 |= CMP_C0_CFF_MASK;
** @endcode
**
** - clearing a "normal" bit-field in registers where there are also w1c
** bits \n
** For this case it is recommended that a special mask is applied to
** the register. The mask should be created by applying an AND
** operation between the negated mask of the bit-field that is
** intended to be cleared and the negated masks of all the w1c
** bit-fields.\n
** General form:
** @code
** MASK = ~BITFIELD_MASK & ~W1C_BITFIELDS_MASKS
** _BASE_PTRS->regName &= MASK;
** @endcode
**
** Example:
** @code
** MASK = ~CMP_C0_SE_MASK & (~CMP_C0_CFR_MASK & ~CMP_C0_CFF_MASK);
** CMP_BASE_PTRS->C0 &= MASK;
** @endcode
**
** - setting a "normal" bit-field in registers where there are also w1c
** bits \n
** For this case it is recommended that a clearing is done as in the
** previous step and then the bit-field is set as in step 3\n
** General form:
** @code
** MASK = ~BITFIELD_MASK & ~W1C_BITFIELDS_MASKS
** _BASE_PTRS->regName &= MASK;
** _BASE_PTRS->regName |= (value << shift) & MASK;
** @endcode
**
** Example:
** @code
** MASK = ~CMP_C0_SE_MASK & (~CMP_C0_CFR_MASK & ~CMP_C0_CFF_MASK);
** CMP_BASE_PTRS->C0 &= MASK;
** CMP_BASE_PTRS->C0 |= (value< Example: \n
** Enable WakeUp interrupt for instance = 0
** @code
** uint32_t instance = 0;
**
** const IRQn_Type g_flexcanWakeUpIrqId[] = CAN_Wake_Up_IRQS;
**
** INT_SYS_EnableIRQ(g_flexcanWakeUpIrqId[instance]);
** @endcode
**
** @}
*/
近期下载者:
相关文件:
收藏者: