Thursday, July 18, 2013

IE_stm32.h

/*
 **********************************************************************
 *name:         IE_stm32.h
 *author:       Samuel Igwe
 *date:         07/16/2013
 *description:  Igbo Embedded stm32.c header
 **********************************************************************
 */
#ifndef IE_STM32
#define IE_STM32



#include "IE_stm32_core.h"
#include "IE_stm32_uart.h"
#include "IE_stm32_gpio.h"
#include "IE_stm32_dma.h"
#include "IE_stm32_rstcc.h"
#include "IE_stm32_timer.h"
#include "IE_stm32_usb.h"
#include "IE_stm32_usbdev.h"


#ifndef TRUE
#define TRUE                                            1
#endif

#ifndef FALSE
#define FALSE                                           0
#endif



/*
 **********************************************************************
 *mappings
 *PA0           = external wire jumpered to usb d+
 *PB9 + PB8     = GPIO (LED)
 *PC0 + PC1     = GPIO (SWITCHES)
 *PA11+PA12     = USB  (alt function)
 *PA9 + PA10    = UART (alt function)
 **********************************************************************
 */
#define STM32_GPIO_PIN_USB                              0

#define STM32_GPIO_PIN_UART_TX                          9
#define STM32_GPIO_PIN_UART_RX                          10

#define STM32_GPIO_PIN_USB_DPLUS                        11
#define STM32_GPIO_PIN_USB_DMINUS                       12

#define STM32_GPIO_PIN_LED1                             8
#define STM32_GPIO_PIN_LED2                             9

#define STM32_GPIO_PIN_SW1                              0
#define STM32_GPIO_PIN_SW2                              1





/*
 **********************************************************************
 *init() routines
 *nvic_isr() routines
 **********************************************************************
 */
void    stm32_init(void);


void    stm32_nvic_uninstall_isr(unsigned int wdIrqNum);
void    stm32_nvic_install_isr(unsigned int wdIrqNum,\
                               unsigned int wdIsrAddr);

void    stm32_uart_puts(unsigned char *ptrString, int wdBytelen);

void    stm32_systick_hook_services(void (*ptrFunc)(void));
void    stm32_systick_timer_services(void (*ptrFunc)(void));

int     stm32_systick_get_mS_tick(void);
int     stm32_systick_get_seconds(void);

void    stm32_timer_uS_delay(unsigned int wdUs);

#endif

No comments:

Post a Comment