Digital Power Starter Kit 3 Firmware
dsPIC33C Buck Converter Voltage Mode Control Example
init_gpio.c
1
/*
2
* File: init_gpio.c
3
* Author: M91406
4
*
5
* Created on July 8, 2019, 6:26 PM
6
*/
7
8
9
#include <xc.h>
10
#include "init_gpio.h"
11
12
27
volatile
uint16_t
sysGpio_Initialize
(
void
) {
28
29
volatile
uint16_t retval=1;
30
31
// Reset all analog inputs to be Digital I/Os
32
ANSELA = 0x0000;
// Port A is available on all devices
33
ANSELB = 0x0000;
// Port B is available on all devices
34
35
#if defined (ANSELC) // Pre-compile check if this device has a Port C
36
ANSELC = 0x0000;
// Port C is only available on higher pin-count devices
37
#endif
38
#if defined (ANSELD) // Pre-compile check if this device has a Port D
39
ANSELD = 0x0000;
// Port D is only available on higher pin-count devices
40
#endif
41
#if defined (ANSELE) // Pre-compile check if this device has a Port E
42
ANSELE = 0x0000;
// Port E is only available on higher pin-count devices
43
#endif
44
45
return
(retval);
46
}
47
48
// end of file
sysGpio_Initialize
volatile uint16_t sysGpio_Initialize(void)
Resets the device input/output pins to digital inputs.
Definition:
init_gpio.c:27
dpsk_buck_vmc.X
sources
config
init
init_gpio.c
© 2021, Microchip Technology Inc.