头文件
#ifndef _HX711_H_
#define _HX711_H_
#include <msp430x14x.h>
#define ADDO_SET P1OUT |= BIT0 //p1.0
#define ADDO_CLR P1OUT &= ~BIT0
#define ADDO_OUT P1DIR |= BIT0
#define ADDO_IN P1DIR &= ~BIT0
#define ADDO_R (P1IN & BIT0)
#define ADSK_SET P1OUT |= BIT1 //P1.1
#define ADSK_CLR P1OUT &= ~BIT1
#define ADSK_OUT P1DIR |= BIT1
extern void DelayNus(unsigned int n);
extern unsigned long int ReadCount(void);
#endif
|