this file contains all the definitions of the functions declared in main.c. It also contains the global variables used in other modules
More...
#include "types.h"
#include "..\SourceCode\USB_Common\descriptors.h"
#include "USB_Common\usb.h"
#include "USBCDC_constructs.h"
#include "USB_CDC_API\UsbCdc.h"
#include "..\SourceCode\USB_Common\descriptors.h"
Go to the source code of this file.
Defines |
| #define | LOW_POWER_MODE LPM0_bits |
| | System definitions.
|
|
#define | Timer1Sec_TAxCTL TA0CTL |
|
#define | Timer1Sec_TAxR TA0R |
|
#define | Timer1Sec_TAxCCTLx TA0CCTL0 |
|
#define | Timer1Sec_TAxCCRx TA0CCR0 |
|
#define | Timer1Sec_TAxIV TA0IV |
|
#define | Timer1Sec_TIMER_VECTOR TIMER0_A0_VECTOR |
|
#define | USB_COMM |
|
#define | MAX_STR_LENGTH 128 |
|
#define | MCLK_FREQ USB_MCLK_FREQ |
Functions |
|
void | Init100mSecTimer (void) |
| | Global Functions.
|
|
void | Disable100mSecTimer (void) |
| void | InitMCU (void) |
| | Local Functions.
|
|
void | Init_Ports (void) |
|
BYTE | retInString (char *) |
|
void | Init_Clock (void) |
| void | InitBQ76PL536ports (void) |
| | Function Name: InitBQ76PL536ports .
|
| void | Init1SecTimer (void) |
| | Function Name: Init1SecTimer .
|
| void | Disable1SecTimer (void) |
| | Function Name: Disable1SecTimer.
|
| void | GoToLowPowerMode (void) |
| | State Machine tasks.
|
| void | BQFaultSignalTask (void) |
| | Function Name: BQFaultSignalTask.
|
| void | BQAlertSignalTask (void) |
| | Function Name: BQAlertSignalTask.
|
| void | Timer1SecExpiredTask (void) |
| | Function Name: Timer1SecExpiredTask.
|
| void | DRDYSignalTask (void) |
| | Function Name: DRDYSignalTask .
|
|
void | USBCommunicationTask (void) |
|
void | UARTCommunicationTask (void) |
| void | HostCommunicationTask (void) |
| | Function Name: HostCommunicationTask.
|
| void | SendFaultMessageToHost (void) |
| | Function Name: SendFaultMessageToHost.
|
| void | SendAlertMessageToHost (void) |
| | Function Name: SendAlertMessageToHost .
|
Variables |
|
char | OutputString [MAX_STR_LENGTH] |
| | Global variables.
|
Detailed Description
this file contains all the definitions of the functions declared in main.c. It also contains the global variables used in other modules
- Author:
- Daniel Torres - Texas Instruments, Inc
- Date:
- November 2010
- Version:
- 1.0 Initial version
- Note:
- Built with IAR for MSP430 Version: 5.10
Definition in file main.h.
Define Documentation
| #define LOW_POWER_MODE LPM0_bits |
System definitions.
System defines
Definition at line 86 of file main.h.
Function Documentation
| void BQAlertSignalTask |
( |
void |
|
) |
|
Function Name: BQAlertSignalTask.
Description : This function executes the corrective actions to be taken when an alert condition is detected by asserting the FAULT line on any of the 'PL536 devices.
- Parameters:
-
- Returns:
- Value :
Definition at line 240 of file main.c.
| void BQFaultSignalTask |
( |
void |
|
) |
|
Function Name: BQFaultSignalTask.
Description : This function executes the corrective actions to be taken when a fault condition is detected by asserting the FAULT line on any of the 'PL536 devices.
- Parameters:
-
- Returns:
- Value : none
Definition at line 204 of file main.c.
| void Disable1SecTimer |
( |
void |
|
) |
|
Function Name: Disable1SecTimer.
Description : Disables the 1 sec timer.
- Parameters:
-
- Returns:
- Value : none
Definition at line 1216 of file main.c.
| void DRDYSignalTask |
( |
void |
|
) |
|
Function Name: DRDYSignalTask .
Description : This is the service routine for the DRDY line .
- Parameters:
-
- Returns:
- Value : none
*BQ76PL536-ADC conversion ready*/
Definition at line 293 of file main.c.
| void GoToLowPowerMode |
( |
void |
|
) |
|
State Machine tasks.
Function Name: GoToLowPowerMode. Description : This function sets the MSP430 in low power mode.
- Parameters:
-
- Returns:
- Value : none
Definition at line 188 of file main.c.
| void HostCommunicationTask |
( |
void |
|
) |
|
Function Name: HostCommunicationTask.
Description : It takes care of the communication interface (UART or USB) with the host, it could be a PC or other MCU.
- Parameters:
-
- Returns:
- Value : none
Definition at line 315 of file main.c.
| void Init1SecTimer |
( |
void |
|
) |
|
Function Name: Init1SecTimer .
Description : initializes the 1 sec timer, TimeAx used to create a 1Sec delay.
- Parameters:
-
- Returns:
- Value : none
Definition at line 1195 of file main.c.
| void InitBQ76PL536ports |
( |
void |
|
) |
|
Function Name: InitBQ76PL536ports .
Description : init IO ports to connect the FAULT,CONV,DRDY & ALERT signals comming from the 'PL536 device.
- Parameters:
-
- Returns:
- Value : none
Definition at line 1128 of file main.c.
Local Functions.
Local Functions.
Function Name: InitMCU. Description : Initializes the MSP430 peripherals and modules.
- Parameters:
-
- Returns:
- Value : none
Definition at line 1061 of file main.c.
| void SendAlertMessageToHost |
( |
void |
|
) |
|
Function Name: SendAlertMessageToHost .
Description : Send message to host when alert condition occurs.
- Parameters:
-
- Returns:
- Value : none
Definition at line 459 of file main.c.
| void SendFaultMessageToHost |
( |
void |
|
) |
|
Function Name: SendFaultMessageToHost.
Description : Sends a fault message to the host when a fault condition occurs.
- Parameters:
-
- Returns:
- Value : none
Definition at line 343 of file main.c.
| void Timer1SecExpiredTask |
( |
void |
|
) |
|
Function Name: Timer1SecExpiredTask.
Description : Service routine for the 1sec timer it triggers the ADC conversion on the 'PL536 devices.
- Parameters:
-
- Returns:
- Value : none
Definition at line 277 of file main.c.