![]() |
Nano100BN Series BSP
V3.03.002
The Board Support Package for Nano100BN Series
|
Data Structures | |
| struct | PWM_Capture_T |
Macros | |
| #define | _PWM_Source_Clock 12000000 |
| #define | _PWM_Resolution 65536 |
| #define | _PWM_Prescale_Max 256 |
| #define | _PWM_Duty_Scale 100 |
| #define | _ADC_Clock 300000 |
| #define | SEG_A_ON PA2=0 |
| #define | SEG_B_ON PA3=0 |
| #define | SEG_C_ON PA4=0 |
| #define | SEG_D_ON PA5=0 |
| #define | SEG_E_ON PA6=0 |
| #define | SEG_F_ON PA7=0 |
| #define | SEG_G_ON PD6=0 |
| #define | SEG_H_ON PD7=0 |
| #define | SEG_CONTROL1_ON PD14=1 |
| #define | SEG_CONTROL2_ON PD15=1 |
| #define | SEG_A_OFF PA2=1 |
| #define | SEG_B_OFF PA3=1 |
| #define | SEG_C_OFF PA4=1 |
| #define | SEG_D_OFF PA5=1 |
| #define | SEG_E_OFF PA6=1 |
| #define | SEG_F_OFF PA7=1 |
| #define | SEG_G_OFF PD6=1 |
| #define | SEG_H_OFF PD7=1 |
| #define | SEG_CONTROL1_OFF PD14=0 |
| #define | SEG_CONTROL2_OFF PD15=0 |
| #define | KEY1_INPUT PD12 |
| #define | KEY2_INPUT PE12 |
| #define | KEY3_INPUT PD0 |
| #define | KEY4_INPUT PD1 |
| #define | Buzzer_Power_ON PE6=1 |
| Control Buzzer module power on. More... | |
| #define | Buzzer_Power_OFF PE6=0 |
| Control Buzzer module power down. More... | |
| #define | NEC_LDC_MARK 16 |
| #define | NEC_LDC_SPACE 8 |
| #define | NEC_BIT_MARK 1 |
| #define | NEC_ONE_SPACE 3 |
| #define | NEC_ZERO_SPACE 1 |
| #define | NEC_BYTES 4 |
| #define | LED1_ON PB0=0 |
| #define | LED2_ON PB1=0 |
| #define | LED3_ON PE9=0 |
| #define | LED4_ON PE10=0 |
| #define | LED5_ON PE11=0 |
| #define | LED6_ON PD8=0 |
| #define | LED7_ON PD9=0 |
| #define | LED8_ON PC7=0 |
| #define | LED1_OFF PB0=1 |
| #define | LED2_OFF PB1=1 |
| #define | LED3_OFF PE9=1 |
| #define | LED4_OFF PE10=1 |
| #define | LED5_OFF PE11=1 |
| #define | LED6_OFF PD8=1 |
| #define | LED7_OFF PD9=1 |
| #define | LED8_OFF PC7=1 |
Typedefs | |
| typedef void(* | IrDA_Code_Exe) (volatile uint8_t *IR_CODE) |
Enumerations | |
| enum | E_Edge { Rising = 0, Falling = 1 } |
Functions | |
| void | Show_Seven_Segment (unsigned char no, unsigned char number) |
| This function turn on 7_Segment LED to show numbers. More... | |
| void | Close_Seven_Segment (void) |
| This function turn off 7_Segment LED. More... | |
| void | Open_Seven_Segment (void) |
| This function turn on 7_Segment LED. More... | |
| void | Initial_KEY_INPUT (void) |
| Set Button GPIO to input mode. More... | |
| unsigned char | Get_KEY_INPUT (void) |
| This function get button status. More... | |
| void | Open_Buzzer (void) |
| This function enable PWM1 module clock and set clock source to start Buzzer module. More... | |
| void | Close_Buzzer (void) |
| This function power down the Buzzer module. More... | |
| void | Write_Buzzer (unsigned int frequence, unsigned int duty) |
| This function set PWM output frequence and duty to drive Buzzer module. More... | |
| void | Open_CLK_OUT (uint32_t Clock_Source, uint32_t FRQDIV_FSEL) |
| This function enable frequency divider module clock, enable frequency divider clock function and configure frequency divider. More... | |
| void | Close_CLK_OUT (void) |
| This function disable frequency output function. More... | |
| void | I2C_EEPROM_Init (uint8_t u8Divider) |
| This function initializes the I2C module, bit-rate = 100 kHz and enable the corresponding interrupt. More... | |
| void | I2C_EEPROM_Write (uint16_t u16Address, uint8_t u8Data) |
| This function do the I2C data writing to EEPROM device. More... | |
| uint8_t | I2C_EEPROM_Read (uint16_t u16Address) |
| This function do the I2C data reading from EEPROM device. More... | |
| void | Open_EINT1 (void) |
| This function enables EINT1 interrupt and IRQ handler, and configs trigger condition for falling edge. More... | |
| void | SendNEC (uint8_t *data) |
| This function is used to transmit IrDA NEC waveform through PC 15 (PWM1_CH3) More... | |
| void | IrDA_NEC_TxRx_Init (IrDA_Code_Exe pfnIrDA_Code_Exe) |
| This function is used to initiate PWM for IrDA NEC. More... | |
| void | IrDa_NEC_Rx (uint32_t u32Time) |
| This function is used to detect NEC IR procotol. More... | |
| void | initial_led (void) |
| Set LED GPIO to output mode. More... | |
| void | LED_on (unsigned int temp) |
| This function turn on LED numbers to open or close. More... | |
| void | Open_PWM6_OUT (uint32_t PWM_Frequency, uint32_t PWM_Duty) |
| void | Close_PWM6_OUT (void) |
| void | Open_PWM7_Capture (void) |
| void | Close_PWM7_Capture (void) |
| void | Get_PWM7_Capture_Data (void) |
| void | Open_PWM3_Capture (void) |
| void | Close_PWM3_Capture (void) |
| void | Get_PWM3_Capture_Data (void) |
| void | Initial_PWM_DAC (void) |
| This function is used to setup multi-function pin of PC12 for PWM1_CH0. More... | |
| void | Write_PWMDAC (void) |
| This function is used to set PWM for PWM DAC. More... | |
| void | Initial_PWM_LED (void) |
| Set multi-function pins for PWM0 channel 0,1,2. More... | |
| void | PWM_LED (void) |
| Set PWM clock enable and HCLK as PWM clock source, PWM frequency is 100Hz, duty 30% and enable output of all PWM channels. More... | |
| void | Open_SPI_Flash (void) |
| Open GPIO port for SPI interface and configure this SPI controller as Master, MSB first, clock idle low, TX at falling-edge, RX at rising-edge, 32-bit length transaction, disable the automatic hardware slave select function and SPI serial clock rate = 2 MHz. More... | |
| unsigned int | SpiFlash_ReadMidDid (void) |
| Read back the Manufacturer ID and Device ID from SPI Flash device. More... | |
| void | SpiFlash_ChipErase (void) |
| This function do the chip erasing to SPI Flash device. More... | |
| unsigned int | SpiFlash_ReadStatusReg1 (void) |
| Read back the Status Register 1 from SPI Flash device. More... | |
| unsigned int | SpiFlash_ReadStatusReg2 (void) |
| Read back the Status Register 2 from SPI Flash device. More... | |
| void | SpiFlash_WaitReady (void) |
| Waiting for the BUSY bit of SPI Flash that be cleared to 0. More... | |
| void | SpiFlash_PageProgram (unsigned char *DataBuffer, unsigned int StartAddress, unsigned int ByteCount) |
| This function do the page programming to SPI Flash device. More... | |
| void | SpiFlash_ReadData (unsigned char *DataBuffer, unsigned int StartAddress, unsigned int ByteCount) |
| This function do the data reading from SPI Flash device. More... | |
| void | Init_PDMA_CH1_for_SPI0_TX (uint32_t u32SrcAddr) |
| This function initializes the PDMA channel 1 for SPI0 transmitting TX and the data that will be transmiitted out are stored in the source buffer. More... | |
| void | Init_PDMA_CH2_for_SPI0_RX (uint32_t u32DstAddr) |
| This function initializes the PDMA channel 2 for SPI0 receiving RX and the receiving data will be stored into the destination buffer. More... | |
| unsigned int | SpiFlash_w_PDMA_ReadMidDid (void) |
| Read back the Manufacturer ID and Device ID from SPI Flash device. More... | |
| void | SpiFlash_w_PDMA_ChipErase (void) |
| This function do the chip erasing to SPI Flash device. More... | |
| unsigned int | SpiFlash_w_PDMA_ReadStatusReg1 (void) |
| Read back the Status Register 1 from SPI Flash device. More... | |
| unsigned int | SpiFlash_w_PDMA_ReadStatusReg2 (void) |
| Read back the Status Register 2 from SPI Flash device. More... | |
| void | SpiFlash_w_PDMA_WaitReady (void) |
| Waiting for the BUSY bit of SPI Flash that be cleared to 0. More... | |
| void | SpiFlash_w_PDMA_PageProgram (unsigned int StartAddress, unsigned int ByteCount) |
| This function do the page programming to SPI Flash device. More... | |
| void | SpiFlash_w_PDMA_ReadData (unsigned int StartAddress, unsigned int ByteCount) |
| This function do the data reading from SPI Flash device. More... | |
| void | SYS_Init (void) |
| This function enables HXT, LXT and LIRC clock and sets HCLK source from HXT to 42MHz. More... | |
| void | Open_Threshold_Knob (void) |
| void | Close_Threshold_Knob (void) |
| uint32_t | Get_Threshold_Knob (void) |
| void | Initial_Timer_Outport (void) |
| void | initial_Timer_Toggle (void) |
| This function is enable TM2 toggle. More... | |
| void | UART0_Init (void) |
| Initiate UART0 as 8-N-1 and 115200 BPS. More... | |
| void | Open_Volume_Knob (void) |
| void | Close_Volume_Knob (void) |
| uint32_t | Get_Volume_Knob (void) |
| void | Initial_SEG_GPIO (void) |
| Set 7_Segment LED GPIO to output mode. More... | |
| void | Initial_PWM_GPIO (void) |
| This function config PC.13 multi-function for PWM to drive Buzzer module, and config PE.6 multi-function for GPIO to control Buzzer power. More... | |
| __INLINE void | I2C_PIN_Init (void) |
| Open GPIO port for I2C interface and enable this I2C controller clock and reset it. More... | |
| void | I2C1_IRQHandler (void) |
| I2C interrupt handler. Checks the I2C interrupt flag, clears the corresponding event flag and calls the related handler subroutine. More... | |
| void | I2C_MasterRx (uint32_t u32Status) |
| This function checks the status of I2C, sets the related control bit and data if needed when this I2C module is master receiver. More... | |
| void | I2C_MasterTx (uint32_t u32Status) |
| This function checks the status of I2C, sets the related control bit and data if needed when this I2C module is master transmitter. More... | |
| void | Initial_EINT1_GPIO (void) |
| This function initializes PB.15 multi-function for EINT1 to detect external interrupt. More... | |
| void | Mark (uint8_t N) |
| This function is used to transmit MASK waveform Pulse = 1/3 duty @38KHz frequency. More... | |
| void | SPACE (uint8_t N) |
| This function is used to transmit SPACE waveform. More... | |
| void | initial_close (void) |
| Set LED GPIO to input mode. More... | |
| void | PDMA_IRQHandler (void) |
| PDMA interrupt handler. Check the PDMA interrupt flag and clear the corresponding event flag. More... | |
| void | Initial_Timer_port (void) |
| This function is used to TM2 output and TMR3 capture function. More... | |
| void | initial_Timer_count (void) |
| This function is enable TM2 count. More... | |
| void | initial_Timer_capture (void) |
| This function is enable TM3 Capture. More... | |
Variables | |
| uint32_t | PWM67_Clock |
| uint32_t | Open_PWM6_OUT_Fail |
| uint32_t | Open_PWM3_Capture_Fail |
| uint32_t | Open_PWM7_Capture_Fail |
| PWM_Capture_T | PWM3 |
| PWM_Capture_T | PWM7 |
| uint32_t | Open_Volume_Knob_Fail |
| #define _ADC_Clock 300000 |
Definition at line 27 of file NuEdu-Basic01_Volume_Knob.h.
| #define _PWM_Duty_Scale 100 |
Definition at line 28 of file NuEdu-Basic01_PWM_Capture.h.
| #define _PWM_Prescale_Max 256 |
Definition at line 27 of file NuEdu-Basic01_PWM_Capture.h.
| #define _PWM_Resolution 65536 |
Definition at line 26 of file NuEdu-Basic01_PWM_Capture.h.
| #define _PWM_Source_Clock 12000000 |
Definition at line 25 of file NuEdu-Basic01_PWM_Capture.h.
| #define Buzzer_Power_OFF PE6=0 |
Control Buzzer module power down.
Definition at line 29 of file NuEdu-Basic01_Buzzer.c.
| #define Buzzer_Power_ON PE6=1 |
Control Buzzer module power on.
Definition at line 28 of file NuEdu-Basic01_Buzzer.c.
| #define KEY1_INPUT PD12 |
GPIO PD12 for Button1
Definition at line 28 of file NuEdu-Basic01_Button.c.
| #define KEY2_INPUT PE12 |
GPIO PE12 for Button2
Definition at line 29 of file NuEdu-Basic01_Button.c.
| #define KEY3_INPUT PD0 |
GPIO PD0 for Button3
Definition at line 30 of file NuEdu-Basic01_Button.c.
| #define KEY4_INPUT PD1 |
GPIO PD1 for Button4
Definition at line 31 of file NuEdu-Basic01_Button.c.
| #define LED1_OFF PB0=1 |
Definition at line 40 of file NuEdu-Basic01_LED.c.
| #define LED1_ON PB0=0 |
Definition at line 31 of file NuEdu-Basic01_LED.c.
| #define LED2_OFF PB1=1 |
Definition at line 41 of file NuEdu-Basic01_LED.c.
| #define LED2_ON PB1=0 |
Definition at line 32 of file NuEdu-Basic01_LED.c.
| #define LED3_OFF PE9=1 |
Definition at line 42 of file NuEdu-Basic01_LED.c.
| #define LED3_ON PE9=0 |
Definition at line 33 of file NuEdu-Basic01_LED.c.
| #define LED4_OFF PE10=1 |
Definition at line 43 of file NuEdu-Basic01_LED.c.
| #define LED4_ON PE10=0 |
Definition at line 34 of file NuEdu-Basic01_LED.c.
| #define LED5_OFF PE11=1 |
Definition at line 44 of file NuEdu-Basic01_LED.c.
| #define LED5_ON PE11=0 |
Definition at line 35 of file NuEdu-Basic01_LED.c.
| #define LED6_OFF PD8=1 |
Definition at line 45 of file NuEdu-Basic01_LED.c.
| #define LED6_ON PD8=0 |
Definition at line 36 of file NuEdu-Basic01_LED.c.
| #define LED7_OFF PD9=1 |
Definition at line 46 of file NuEdu-Basic01_LED.c.
| #define LED7_ON PD9=0 |
Definition at line 37 of file NuEdu-Basic01_LED.c.
| #define LED8_OFF PC7=1 |
Definition at line 47 of file NuEdu-Basic01_LED.c.
| #define LED8_ON PC7=0 |
Definition at line 38 of file NuEdu-Basic01_LED.c.
| #define NEC_BIT_MARK 1 |
Definition at line 141 of file NuEdu-Basic01_IrDA_NEC.c.
| #define NEC_BYTES 4 |
Definition at line 144 of file NuEdu-Basic01_IrDA_NEC.c.
| #define NEC_LDC_MARK 16 |
Definition at line 139 of file NuEdu-Basic01_IrDA_NEC.c.
| #define NEC_LDC_SPACE 8 |
Definition at line 140 of file NuEdu-Basic01_IrDA_NEC.c.
| #define NEC_ONE_SPACE 3 |
Definition at line 142 of file NuEdu-Basic01_IrDA_NEC.c.
| #define NEC_ZERO_SPACE 1 |
Definition at line 143 of file NuEdu-Basic01_IrDA_NEC.c.
| #define SEG_A_OFF PA2=1 |
Turn off segment A
Definition at line 41 of file NuEdu-Basic01_7_Segment.c.
| #define SEG_A_ON PA2=0 |
Turn on segment A
Definition at line 30 of file NuEdu-Basic01_7_Segment.c.
| #define SEG_B_OFF PA3=1 |
Turn off segment B
Definition at line 42 of file NuEdu-Basic01_7_Segment.c.
| #define SEG_B_ON PA3=0 |
Turn on segment B
Definition at line 31 of file NuEdu-Basic01_7_Segment.c.
| #define SEG_C_OFF PA4=1 |
Turn off segment C
Definition at line 43 of file NuEdu-Basic01_7_Segment.c.
| #define SEG_C_ON PA4=0 |
Turn on segment C
Definition at line 32 of file NuEdu-Basic01_7_Segment.c.
| #define SEG_CONTROL1_OFF PD14=0 |
Turn off 7_segment1
Definition at line 49 of file NuEdu-Basic01_7_Segment.c.
| #define SEG_CONTROL1_ON PD14=1 |
Turn on 7_segment1
Definition at line 38 of file NuEdu-Basic01_7_Segment.c.
| #define SEG_CONTROL2_OFF PD15=0 |
Turn off 7_segment2
Definition at line 50 of file NuEdu-Basic01_7_Segment.c.
| #define SEG_CONTROL2_ON PD15=1 |
Turn on 7_segment2
Definition at line 39 of file NuEdu-Basic01_7_Segment.c.
| #define SEG_D_OFF PA5=1 |
Turn off segment D
Definition at line 44 of file NuEdu-Basic01_7_Segment.c.
| #define SEG_D_ON PA5=0 |
Turn on segment D
Definition at line 33 of file NuEdu-Basic01_7_Segment.c.
| #define SEG_E_OFF PA6=1 |
Turn off segment E
Definition at line 45 of file NuEdu-Basic01_7_Segment.c.
| #define SEG_E_ON PA6=0 |
Turn on segment E
Definition at line 34 of file NuEdu-Basic01_7_Segment.c.
| #define SEG_F_OFF PA7=1 |
Turn off segment F
Definition at line 46 of file NuEdu-Basic01_7_Segment.c.
| #define SEG_F_ON PA7=0 |
Turn on segment F
Definition at line 35 of file NuEdu-Basic01_7_Segment.c.
| #define SEG_G_OFF PD6=1 |
Turn off segment G
Definition at line 47 of file NuEdu-Basic01_7_Segment.c.
| #define SEG_G_ON PD6=0 |
Turn on segment G
Definition at line 36 of file NuEdu-Basic01_7_Segment.c.
| #define SEG_H_OFF PD7=1 |
Turn off segment H
Definition at line 48 of file NuEdu-Basic01_7_Segment.c.
| #define SEG_H_ON PD7=0 |
Turn on segment H
Definition at line 37 of file NuEdu-Basic01_7_Segment.c.
| typedef void(* IrDA_Code_Exe) (volatile uint8_t *IR_CODE) |
Definition at line 46 of file NuEdu-Basic01_IrDA_NEC.h.
| enum E_Edge |
| Enumerator | |
|---|---|
| Rising | |
| Falling | |
Definition at line 41 of file NuEdu-Basic01_PWM_Capture.h.
| void Close_Buzzer | ( | void | ) |
This function power down the Buzzer module.
Definition at line 91 of file NuEdu-Basic01_Buzzer.c.
| void Close_CLK_OUT | ( | void | ) |
This function disable frequency output function.
Definition at line 73 of file NuEdu-Basic01_ClkOut.c.
| void Close_PWM3_Capture | ( | void | ) |
Definition at line 332 of file NuEdu-Basic01_PWM_Capture.c.
| void Close_PWM6_OUT | ( | void | ) |
Definition at line 113 of file NuEdu-Basic01_PWM_Capture.c.
| void Close_PWM7_Capture | ( | void | ) |
Definition at line 189 of file NuEdu-Basic01_PWM_Capture.c.
| void Close_Seven_Segment | ( | void | ) |
This function turn off 7_Segment LED.
Definition at line 93 of file NuEdu-Basic01_7_Segment.c.
| void Close_Threshold_Knob | ( | void | ) |
Definition at line 34 of file NuEdu-Basic01_Threshold_Knob.c.
| void Close_Volume_Knob | ( | void | ) |
Definition at line 47 of file NuEdu-Basic01_ADC_Knob.c.
| unsigned char Get_KEY_INPUT | ( | void | ) |
This function get button status.
Definition at line 48 of file NuEdu-Basic01_Button.c.
| void Get_PWM3_Capture_Data | ( | void | ) |
Definition at line 357 of file NuEdu-Basic01_PWM_Capture.c.
| void Get_PWM7_Capture_Data | ( | void | ) |
Definition at line 212 of file NuEdu-Basic01_PWM_Capture.c.
| uint32_t Get_Threshold_Knob | ( | void | ) |
Definition at line 62 of file NuEdu-Basic01_Threshold_Knob.c.
| uint32_t Get_Volume_Knob | ( | void | ) |
Definition at line 64 of file NuEdu-Basic01_ADC_Knob.c.
| void I2C1_IRQHandler | ( | void | ) |
I2C interrupt handler. Checks the I2C interrupt flag, clears the corresponding event flag and calls the related handler subroutine.
Definition at line 71 of file NuEdu-Basic01_I2C_EEPROM.c.
| void I2C_EEPROM_Init | ( | uint8_t | u8Divider | ) |
This function initializes the I2C module, bit-rate = 100 kHz and enable the corresponding interrupt.
| [in] | u8Divider | A divider of I2C clock source. |
Definition at line 99 of file NuEdu-Basic01_I2C_EEPROM.c.
| uint8_t I2C_EEPROM_Read | ( | uint16_t | u16Address | ) |
This function do the I2C data reading from EEPROM device.
| [in] | u16Address | An address of EEPROM that will be read. |
Definition at line 260 of file NuEdu-Basic01_I2C_EEPROM.c.
| void I2C_EEPROM_Write | ( | uint16_t | u16Address, |
| uint8_t | u8Data | ||
| ) |
This function do the I2C data writing to EEPROM device.
| [in] | u16Address | An address of EEPROM that will be written. |
| [in] | u18Data | The data will be written to EEPROM. |
Definition at line 234 of file NuEdu-Basic01_I2C_EEPROM.c.
| void I2C_MasterRx | ( | uint32_t | u32Status | ) |
This function checks the status of I2C, sets the related control bit and data if needed when this I2C module is master receiver.
| [in] | u32Status | The current value of I2C status register. |
Definition at line 121 of file NuEdu-Basic01_I2C_EEPROM.c.
| void I2C_MasterTx | ( | uint32_t | u32Status | ) |
This function checks the status of I2C, sets the related control bit and data if needed when this I2C module is master transmitter.
| [in] | u32Status | The current value of I2C status register. |
Definition at line 184 of file NuEdu-Basic01_I2C_EEPROM.c.
| __INLINE void I2C_PIN_Init | ( | void | ) |
Open GPIO port for I2C interface and enable this I2C controller clock and reset it.
Definition at line 52 of file NuEdu-Basic01_I2C_EEPROM.c.
| void Init_PDMA_CH1_for_SPI0_TX | ( | uint32_t | u32SrcAddr | ) |
This function initializes the PDMA channel 1 for SPI0 transmitting TX and the data that will be transmiitted out are stored in the source buffer.
| [in] | u32SrcAddr | A source address for the transmitting data buffer. |
Definition at line 117 of file NuEdu-Basic01_SPI_Flash_w_PDMA.c.
| void Init_PDMA_CH2_for_SPI0_RX | ( | uint32_t | u32DstAddr | ) |
This function initializes the PDMA channel 2 for SPI0 receiving RX and the receiving data will be stored into the destination buffer.
| [in] | u32DstAddr | A destination address for the receiving data buffer. |
Definition at line 163 of file NuEdu-Basic01_SPI_Flash_w_PDMA.c.
| void initial_close | ( | void | ) |
| void Initial_EINT1_GPIO | ( | void | ) |
This function initializes PB.15 multi-function for EINT1 to detect external interrupt.
Definition at line 33 of file NuEdu-Basic01_Interrupt.c.
| void Initial_KEY_INPUT | ( | void | ) |
| void initial_led | ( | void | ) |
| void Initial_PWM_DAC | ( | void | ) |
This function is used to setup multi-function pin of PC12 for PWM1_CH0.
Definition at line 51 of file NuEdu-Basic01_PWMDAC.c.
| void Initial_PWM_GPIO | ( | void | ) |
This function config PC.13 multi-function for PWM to drive Buzzer module, and config PE.6 multi-function for GPIO to control Buzzer power.
Definition at line 42 of file NuEdu-Basic01_Buzzer.c.
| void Initial_PWM_LED | ( | void | ) |
Set multi-function pins for PWM0 channel 0,1,2.
Definition at line 33 of file NuEdu-Basic01_RGBLED.c.
| void Initial_SEG_GPIO | ( | void | ) |
Set 7_Segment LED GPIO to output mode.
Definition at line 56 of file NuEdu-Basic01_7_Segment.c.
| void initial_Timer_capture | ( | void | ) |
This function is enable TM3 Capture.
Definition at line 94 of file NuEdu-Basic01_Timer_Ouput_Capture.c.
| void initial_Timer_count | ( | void | ) |
This function is enable TM2 count.
Definition at line 72 of file NuEdu-Basic01_Timer_Ouput_Capture.c.
| void Initial_Timer_Outport | ( | void | ) |
| void Initial_Timer_port | ( | void | ) |
This function is used to TM2 output and TMR3 capture function.
Definition at line 31 of file NuEdu-Basic01_Timer_Ouput_Capture.c.
| void initial_Timer_Toggle | ( | void | ) |
This function is enable TM2 toggle.
Definition at line 49 of file NuEdu-Basic01_Timer_Ouput_Capture.c.
| void IrDa_NEC_Rx | ( | uint32_t | u32Time | ) |
This function is used to detect NEC IR procotol.
| [in] | u32Time | is the time length of received bit |
Definition at line 48 of file NuEdu-Basic01_IrDA_NEC.c.
| void IrDA_NEC_TxRx_Init | ( | IrDA_Code_Exe | pfnIrDA_Code_Exe | ) |
This function is used to initiate PWM for IrDA NEC.
| [in] | pfnIrDA_Code_Exe | is function pointer that will be executed after received IrDA NEC command |
Definition at line 206 of file NuEdu-Basic01_IrDA_NEC.c.
| void LED_on | ( | unsigned int | temp | ) |
This function turn on LED numbers to open or close.
| [in] | temp | Turn on which LED open number |
Definition at line 75 of file NuEdu-Basic01_LED.c.
| void Mark | ( | uint8_t | N | ) |
This function is used to transmit MASK waveform Pulse = 1/3 duty @38KHz frequency.
| [in] | N | is time length of MASK |
Definition at line 152 of file NuEdu-Basic01_IrDA_NEC.c.
| void Open_Buzzer | ( | void | ) |
This function enable PWM1 module clock and set clock source to start Buzzer module.
Definition at line 58 of file NuEdu-Basic01_Buzzer.c.
| void Open_CLK_OUT | ( | uint32_t | Clock_Source, |
| uint32_t | FRQDIV_FSEL | ||
| ) |
This function enable frequency divider module clock, enable frequency divider clock function and configure frequency divider.
| [in] | Clock_Source | is ClkOut function clock source |
| [in] | FRQDIV_FSEL | is divider output frequency selection |
Output selected clock to FCLKO. The output clock frequency is divided by FRQDIV_FSEL. The formula is: FCLKO frequency = (Clock_Source frequency) / 2^(FRQDIV_FSEL + 1)
Definition at line 44 of file NuEdu-Basic01_ClkOut.c.
| void Open_EINT1 | ( | void | ) |
This function enables EINT1 interrupt and IRQ handler, and configs trigger condition for falling edge.
Definition at line 46 of file NuEdu-Basic01_Interrupt.c.
| void Open_PWM3_Capture | ( | void | ) |
Definition at line 273 of file NuEdu-Basic01_PWM_Capture.c.
| void Open_PWM6_OUT | ( | uint32_t | PWM_Frequency, |
| uint32_t | PWM_Duty | ||
| ) |
Definition at line 25 of file NuEdu-Basic01_PWM_Capture.c.
| void Open_PWM7_Capture | ( | void | ) |
Definition at line 132 of file NuEdu-Basic01_PWM_Capture.c.
| void Open_Seven_Segment | ( | void | ) |
This function turn on 7_Segment LED.
Definition at line 76 of file NuEdu-Basic01_7_Segment.c.
| void Open_SPI_Flash | ( | void | ) |
Open GPIO port for SPI interface and configure this SPI controller as Master, MSB first, clock idle low, TX at falling-edge, RX at rising-edge, 32-bit length transaction, disable the automatic hardware slave select function and SPI serial clock rate = 2 MHz.
Definition at line 43 of file NuEdu-Basic01_SPI_Flash.c.
| void Open_Threshold_Knob | ( | void | ) |
Definition at line 5 of file NuEdu-Basic01_Threshold_Knob.c.
| void Open_Volume_Knob | ( | void | ) |
Definition at line 9 of file NuEdu-Basic01_ADC_Knob.c.
| void PDMA_IRQHandler | ( | void | ) |
PDMA interrupt handler. Check the PDMA interrupt flag and clear the corresponding event flag.
Definition at line 55 of file NuEdu-Basic01_SPI_Flash_w_PDMA.c.
| void PWM_LED | ( | void | ) |
Set PWM clock enable and HCLK as PWM clock source, PWM frequency is 100Hz, duty 30% and enable output of all PWM channels.
Definition at line 47 of file NuEdu-Basic01_RGBLED.c.
| void SendNEC | ( | uint8_t * | data | ) |
This function is used to transmit IrDA NEC waveform through PC 15 (PWM1_CH3)
| [in] | data | is pointer of trasnmitted data |
Definition at line 174 of file NuEdu-Basic01_IrDA_NEC.c.
| void Show_Seven_Segment | ( | unsigned char | no, |
| unsigned char | number | ||
| ) |
This function turn on 7_Segment LED to show numbers.
| [in] | no | Turn on which 7_Segment LED |
| [in] | number | 7_Segment LED show number 0~9 |
Definition at line 115 of file NuEdu-Basic01_7_Segment.c.
| void SPACE | ( | uint8_t | N | ) |
This function is used to transmit SPACE waveform.
| [in] | N | is time length of SPACE |
Definition at line 164 of file NuEdu-Basic01_IrDA_NEC.c.
| void SpiFlash_ChipErase | ( | void | ) |
This function do the chip erasing to SPI Flash device.
Definition at line 127 of file NuEdu-Basic01_SPI_Flash.c.
| void SpiFlash_PageProgram | ( | unsigned char * | DataBuffer, |
| unsigned int | StartAddress, | ||
| unsigned int | ByteCount | ||
| ) |
This function do the page programming to SPI Flash device.
| [in] | *DataBuffer | A Point that point to source data buffer. |
| [in] | StartAddress | A start address of SPI Flash that will be programmed. |
| [in] | ByteCount | Byte count number that will be programmed. |
Definition at line 261 of file NuEdu-Basic01_SPI_Flash.c.
| void SpiFlash_ReadData | ( | unsigned char * | DataBuffer, |
| unsigned int | StartAddress, | ||
| unsigned int | ByteCount | ||
| ) |
This function do the data reading from SPI Flash device.
| [in] | *DataBuffer | A Point that point to destination data buffer. |
| [in] | StartAddress | A start address of SPI Flash that will be read. |
| [in] | ByteCount | Byte count number that will be read. |
Definition at line 335 of file NuEdu-Basic01_SPI_Flash.c.
| unsigned int SpiFlash_ReadMidDid | ( | void | ) |
Read back the Manufacturer ID and Device ID from SPI Flash device.
Definition at line 71 of file NuEdu-Basic01_SPI_Flash.c.
| unsigned int SpiFlash_ReadStatusReg1 | ( | void | ) |
Read back the Status Register 1 from SPI Flash device.
Definition at line 169 of file NuEdu-Basic01_SPI_Flash.c.
| unsigned int SpiFlash_ReadStatusReg2 | ( | void | ) |
Read back the Status Register 2 from SPI Flash device.
Definition at line 203 of file NuEdu-Basic01_SPI_Flash.c.
| void SpiFlash_w_PDMA_ChipErase | ( | void | ) |
This function do the chip erasing to SPI Flash device.
Definition at line 264 of file NuEdu-Basic01_SPI_Flash_w_PDMA.c.
| void SpiFlash_w_PDMA_PageProgram | ( | unsigned int | StartAddress, |
| unsigned int | ByteCount | ||
| ) |
This function do the page programming to SPI Flash device.
| [in] | StartAddress | A start address of SPI Flash that will be programmed. |
| [in] | ByteCount | Byte count number that will be programmed. |
Definition at line 396 of file NuEdu-Basic01_SPI_Flash_w_PDMA.c.
| void SpiFlash_w_PDMA_ReadData | ( | unsigned int | StartAddress, |
| unsigned int | ByteCount | ||
| ) |
This function do the data reading from SPI Flash device.
| [in] | StartAddress | A start address of SPI Flash that will be read. |
| [in] | ByteCount | Byte count number that will be read. |
Definition at line 473 of file NuEdu-Basic01_SPI_Flash_w_PDMA.c.
| unsigned int SpiFlash_w_PDMA_ReadMidDid | ( | void | ) |
Read back the Manufacturer ID and Device ID from SPI Flash device.
Definition at line 208 of file NuEdu-Basic01_SPI_Flash_w_PDMA.c.
| unsigned int SpiFlash_w_PDMA_ReadStatusReg1 | ( | void | ) |
Read back the Status Register 1 from SPI Flash device.
Definition at line 306 of file NuEdu-Basic01_SPI_Flash_w_PDMA.c.
| unsigned int SpiFlash_w_PDMA_ReadStatusReg2 | ( | void | ) |
Read back the Status Register 2 from SPI Flash device.
Definition at line 340 of file NuEdu-Basic01_SPI_Flash_w_PDMA.c.
| void SpiFlash_w_PDMA_WaitReady | ( | void | ) |
Waiting for the BUSY bit of SPI Flash that be cleared to 0.
Definition at line 374 of file NuEdu-Basic01_SPI_Flash_w_PDMA.c.
| void SpiFlash_WaitReady | ( | void | ) |
Waiting for the BUSY bit of SPI Flash that be cleared to 0.
Definition at line 237 of file NuEdu-Basic01_SPI_Flash.c.
| void SYS_Init | ( | void | ) |
This function enables HXT, LXT and LIRC clock and sets HCLK source from HXT to 42MHz.
Definition at line 37 of file NuEdu-Basic01_System.c.
| void UART0_Init | ( | void | ) |
Initiate UART0 as 8-N-1 and 115200 BPS.
Definition at line 34 of file NuEdu-Basic01_UART.c.
| void Write_Buzzer | ( | unsigned int | frequence, |
| unsigned int | duty | ||
| ) |
This function set PWM output frequence and duty to drive Buzzer module.
Definition at line 78 of file NuEdu-Basic01_Buzzer.c.
| void Write_PWMDAC | ( | void | ) |
This function is used to set PWM for PWM DAC.
Definition at line 33 of file NuEdu-Basic01_PWMDAC.c.
| uint32_t Open_PWM3_Capture_Fail |
Definition at line 19 of file NuEdu-Basic01_PWM_Capture.c.
| uint32_t Open_PWM6_OUT_Fail |
Definition at line 18 of file NuEdu-Basic01_PWM_Capture.c.
| uint32_t Open_PWM7_Capture_Fail |
Definition at line 20 of file NuEdu-Basic01_PWM_Capture.c.
| uint32_t Open_Volume_Knob_Fail |
Definition at line 7 of file NuEdu-Basic01_ADC_Knob.c.
| PWM_Capture_T PWM3 |
Definition at line 22 of file NuEdu-Basic01_PWM_Capture.c.
| uint32_t PWM67_Clock |
Definition at line 17 of file NuEdu-Basic01_PWM_Capture.c.
| PWM_Capture_T PWM7 |
Definition at line 23 of file NuEdu-Basic01_PWM_Capture.c.
1.8.15