EasyManua.ls Logo

Texas Instruments MSP430

Texas Instruments MSP430
413 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
401
.inputBits = BIT3,
// When using an abstracted function to measure the element
// the 100*(maxResponse - threshold) < 0xFFFF
// ie maxResponse - threshold < 655
.maxResponse = (100 + 655),
.threshold = 100
};
//*** CAP TOUCH HANDLER *******************************************************/
// This defines the grouping of sensors, the method to measure change in
// capacitance, and the function of the group
const struct Sensor multi_buttons =
{
.halDefinition = RO_PINOSC_TA0_WDTp,
.numElements = 3,
.baseOffset = 0,
// Pointer to elements
.arrayPtr[0] = &up_element, // point to up element
.arrayPtr[1] = &down_element, // point to down element
.arrayPtr[2] = &middle_element, // point to middle element
// Timer Information
.measGateSource= GATE_WDT_ACLK, // 0->SMCLK, 1-> ACLK
.accumulationCycles= WDTp_GATE_64 //64 - Default
};
main.c
#include <msp430.h>
#include "CTS_Layer.h"
#include "CTS_HAL.h"
#include "structure.h"
#define DELAY 4000
struct Element * keyPressed;
void GPIO_graceInit(void);
void BCSplus_graceInit(void);
void sleep(unsigned int time);
#pragma vector = TIMER0_A0_VECTOR
__interrupt void ISR_Timer0_A0(void)
{
TA0CTL &= ~MC_1;
TA0CCTL0 &= ~(CCIE);
__bic_SR_register_on_exit(LPM3_bits + GIE);
}
#pragma vector = PORT2_VECTOR, \
PORT1_VECTOR, \
TIMER0_A1_VECTOR, \
USI_VECTOR, \

Table of Contents

Other manuals for Texas Instruments MSP430

Related product manuals