⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 sfr_r823.h

📁 针对日本瑞莎单片机r8c/23 开发的LIN网络通讯程序包括主节点和从节点
💻 H
📖 第 1 页 / 共 5 页
字号:
#define		cks2_iccr1	iccr1_addr.bit.b2		/* Transmit clock select bit 3 to 0 */
#define		cks3_iccr1	iccr1_addr.bit.b3		/* Transmit clock select bit 3 to 0 */
#define		trs_iccr1	iccr1_addr.bit.b4		/* Transfer/receive select bit */
#define		mst_iccr1	iccr1_addr.bit.b5		/* Master/slave select bit */
#define		rcvd_iccr1	iccr1_addr.bit.b6		/* Receive disable bit */
#define		ice_iccr1	iccr1_addr.bit.b7		/* IIC bus interface enable bit */

/*------------------------------------------------------
  IIC bus control register 2
------------------------------------------------------*/
union	byte_def	iccr2_addr;
#define		iccr2		iccr2_addr.byte

#define		iicrst_iccr2	iccr2_addr.bit.b1	/* IIC control part reset bit */
#define		sclo_iccr2		iccr2_addr.bit.b3	/* SCL monitor flag */
#define		sdaop_iccr2		iccr2_addr.bit.b4	/* SDAO write protect bit */
#define		sdao_iccr2		iccr2_addr.bit.b5	/* SDA output value control bit */
#define		scp_iccr2		iccr2_addr.bit.b6	/* Start/Stop condition generation disable bit */
#define		bbsy_iccr2		iccr2_addr.bit.b7	/* Bus busy bit */

/*------------------------------------------------------
  IIC bus mode register
------------------------------------------------------*/
union	byte_def	icmr_addr;
#define		icmr		icmr_addr.byte

#define		bc0_icmr	icmr_addr.bit.b0		/* Bit counter 2 to 0 */
#define		bc1_icmr	icmr_addr.bit.b1		/* Bit Counter 2 to 0 */
#define		bc2_icmr	icmr_addr.bit.b2		/* Bit Counter 2 to 0 */
#define		bcwp_icmr	icmr_addr.bit.b3		/* BC write protect bit */
#define		wait_icmr	icmr_addr.bit.b6		/* Wait insertion bit */
#define		mls_icmr	icmr_addr.bit.b7		/* MSB-First/LSB-First select */

/*------------------------------------------------------
  IIC bus interrupt enable register
------------------------------------------------------*/
union	byte_def	icier_addr;
#define		icier		icier_addr.byte

#define		ackbt_icier	icier_addr.bit.b0		/* Transmit acknow ledge select bit */
#define		ackbr_icier	icier_addr.bit.b1		/* Receive acknow ledge bit */
#define		acke_icier	icier_addr.bit.b2		/* Acknowledge bit judgement select bit */
#define		stie_icier	icier_addr.bit.b3		/* Stop condition detection interrupt enable bit */
#define		nakie_icier	icier_addr.bit.b4		/* NACK receive interrupt enable bit */
#define		rie_icier	icier_addr.bit.b5		/* Receive interrupt enable bit */
#define		teie_icier	icier_addr.bit.b6		/* Transmit end interrupt enable bit */
#define		tie_icier	icier_addr.bit.b7		/* Transmit interrupt enable bit */

/*------------------------------------------------------
  IIC bus status register
------------------------------------------------------*/
union	byte_def	icsr_addr;
#define		icsr		icsr_addr.byte

#define		adz_icsr	icsr_addr.bit.b0		/* General call address recognition flag */
#define		aas_icsr	icsr_addr.bit.b1		/* Slave address recognition flag */
#define		al_icsr		icsr_addr.bit.b2		/* Arbitration lost flag / Overrun error flag */
#define		stop_icsr	icsr_addr.bit.b3		/* Stop condition detection flag */
#define		nackf_icsr	icsr_addr.bit.b4		/* No acknow ledge detection flag */
#define		rdrf_icsr	icsr_addr.bit.b5		/* Receive data register full */
#define		tend_icsr	icsr_addr.bit.b6		/* Transmit end */
#define		tdre_icsr	icsr_addr.bit.b7		/* Transmit data empty */

/*------------------------------------------------------
  Slave address register
------------------------------------------------------*/
union	byte_def	sar_addr;
#define		sar			sar_addr.byte

#define		fs_sar		sar_addr.bit.b0			/* Format select bit */
#define		sva0_sar	sar_addr.bit.b1			/* Slave address 6 to 0 */
#define		sva1_sar	sar_addr.bit.b2			/* Slave address 6 to 0 */
#define		sva2_sar	sar_addr.bit.b3			/* Slave address 6 to 0 */
#define		sva3_sar	sar_addr.bit.b4			/* Slave address 6 to 0 */
#define		sva4_sar	sar_addr.bit.b5			/* Slave address 6 to 0 */
#define		sva5_sar	sar_addr.bit.b6			/* Slave address 6 to 0 */
#define		sva6_sar	sar_addr.bit.b7			/* Slave address 6 to 0 */

/*------------------------------------------------------
  IIC bus transmit data register
------------------------------------------------------*/
union	byte_def	icdrt_addr;
#define		icdrt		icdrt_addr.byte

/*------------------------------------------------------
  IIC bus receive data register
------------------------------------------------------*/
union	byte_def	icdrr_addr;
#define		icdrr		icdrr_addr.byte

/*------------------------------------------------------
  A-D control register2
------------------------------------------------------*/
union	byte_def	adcon2_addr;
#define		adcon2		adcon2_addr.byte

#define		smp			adcon2_addr.bit.b0		/* A-D conversion method select bit */

/*------------------------------------------------------
  A-D control register0
------------------------------------------------------*/
union	byte_def	adcon0_addr;
#define		adcon0		adcon0_addr.byte

#define		ch0			adcon0_addr.bit.b0		/* Analog input pin select bit */
#define		ch1			adcon0_addr.bit.b1		/* Analog input pin select bit */
#define		ch2			adcon0_addr.bit.b2		/* Analog input pin select bit */
#define		md			adcon0_addr.bit.b3		/* A-D operation mode select bit */
#define		adgsel0		adcon0_addr.bit.b4		/* A-D input group select bit */
#define		adcap		adcon0_addr.bit.b5		/* A-D conversion automatic start bit */
#define		adst		adcon0_addr.bit.b6		/* A-D conversion start flag */
#define		cks0		adcon0_addr.bit.b7		/* Frequency select bit0 */
#define		cks0_adcon0	cks0 

/*------------------------------------------------------
  A-D control register1
------------------------------------------------------*/
union	byte_def	adcon1_addr;
#define		adcon1		adcon1_addr.byte

#define		bits		adcon1_addr.bit.b3		/* 8/10-bit mode select bit */
#define		cks1		adcon1_addr.bit.b4		/* Frequency select bit1 */
#define		cks1_adcon1	cks1
#define		vcut		adcon1_addr.bit.b5		/* Vref connect bit */

/*------------------------------------------------------
  Port P0 register
------------------------------------------------------*/
union	byte_def	p0_addr;
#define		p0			p0_addr.byte

#define		p0_0		p0_addr.bit.b0			/* Port P00 bit */
#define		p0_1		p0_addr.bit.b1			/* Port P01 bit */
#define		p0_2		p0_addr.bit.b2			/* Port P02 bit */
#define		p0_3		p0_addr.bit.b3			/* Port P03 bit */
#define		p0_4		p0_addr.bit.b4			/* Port P04 bit */
#define		p0_5		p0_addr.bit.b5			/* Port P05 bit */
#define		p0_6		p0_addr.bit.b6			/* Port P06 bit */
#define		p0_7		p0_addr.bit.b7			/* Port P07 bit */

/*------------------------------------------------------
  Port P0 direction register
------------------------------------------------------*/
union	byte_def	pd0_addr;
#define		pd0			pd0_addr.byte

#define		pd0_0		pd0_addr.bit.b0			/* Port P00 direction bit */
#define		pd0_1		pd0_addr.bit.b1			/* Port P01 direction bit */
#define		pd0_2		pd0_addr.bit.b2			/* Port P02 direction bit */
#define		pd0_3		pd0_addr.bit.b3			/* Port P03 direction bit */
#define		pd0_4		pd0_addr.bit.b4			/* Port P04 direction bit */
#define		pd0_5		pd0_addr.bit.b5			/* Port P05 direction bit */
#define		pd0_6		pd0_addr.bit.b6			/* Port P06 direction bit */
#define		pd0_7		pd0_addr.bit.b7			/* Port P07 direction bit */

/*------------------------------------------------------
  Port P1 register
------------------------------------------------------*/
union	byte_def	p1_addr;
#define		p1			p1_addr.byte

#define		p1_0		p1_addr.bit.b0			/* Port P10 bit */
#define		p1_1		p1_addr.bit.b1			/* Port P11 bit */
#define		p1_2		p1_addr.bit.b2			/* Port P12 bit */
#define		p1_3		p1_addr.bit.b3			/* Port P13 bit */
#define		p1_4		p1_addr.bit.b4			/* Port P14 bit */
#define		p1_5		p1_addr.bit.b5			/* Port P15 bit */
#define		p1_6		p1_addr.bit.b6			/* Port P16 bit */
#define		p1_7		p1_addr.bit.b7			/* Port P17 bit */

/*------------------------------------------------------
  Port P1 direction register
------------------------------------------------------*/
union	byte_def	pd1_addr;
#define		pd1			pd1_addr.byte

#define		pd1_0		pd1_addr.bit.b0			/* Port P10 direction bit */
#define		pd1_1		pd1_addr.bit.b1			/* Port P11 direction bit */
#define		pd1_2		pd1_addr.bit.b2			/* Port P12 direction bit */
#define		pd1_3		pd1_addr.bit.b3			/* Port P13 direction bit */
#define		pd1_4		pd1_addr.bit.b4			/* Port P14 direction bit */
#define		pd1_5		pd1_addr.bit.b5			/* Port P15 direction bit */
#define		pd1_6		pd1_addr.bit.b6			/* Port P16 direction bit */
#define		pd1_7		pd1_addr.bit.b7			/* Port P17 direction bit */

/*------------------------------------------------------
  Port P2 register
------------------------------------------------------*/
union	byte_def	p2_addr;
#define		p2			p2_addr.byte

#define		p2_0		p2_addr.bit.b0			/* Port P20 bit */
#define		p2_1		p2_addr.bit.b1			/* Port P21 bit */
#define		p2_2		p2_addr.bit.b2			/* Port P22 bit */
#define		p2_3		p2_addr.bit.b3			/* Port P23 bit */
#define		p2_4		p2_addr.bit.b4			/* Port P24 bit */
#define		p2_5		p2_addr.bit.b5			/* Port P25 bit */
#define		p2_6		p2_addr.bit.b6			/* Port P26 bit */
#define		p2_7		p2_addr.bit.b7			/* Port P27 bit */

/*------------------------------------------------------
  Port P2 direction register
------------------------------------------------------*/
union	byte_def	pd2_addr;
#define		pd2			pd2_addr.byte

#define		pd2_0		pd2_addr.bit.b0			/* Port P20 direction bit */
#define		pd2_1		pd2_addr.bit.b1			/* Port P21 direction bit */
#define		pd2_2		pd2_addr.bit.b2			/* Port P22 direction bit */
#define		pd2_3		pd2_addr.bit.b3			/* Port P23 direction bit */
#define		pd2_4		pd2_addr.bit.b4			/* Port P24 direction bit */
#define		pd2_5		pd2_addr.bit.b5			/* Port P25 direction bit */
#define		pd2_6		pd2_addr.bit.b6			/* Port P26 direction bit */
#define		pd2_7		pd2_addr.bit.b7			/* Port P27 direction bit */

/*------------------------------------------------------
  Port P3 register
------------------------------------------------------*/
union	byte_def	p3_addr;
#define		p3			p3_addr.byte

#define		p3_0		p3_addr.bit.b0			/* Port P30 bit */
#define		p3_1		p3_addr.bit.b1			/* Port P31 bit */
#define		p3_3		p3_addr.bit.b3			/* Port P33 bit */
#define		p3_4		p3_addr.bit.b4			/* Port P34 bit */
#define		p3_5		p3_addr.bit.b5			/* Port P35 bit */
#define		p3_7		p3_addr.bit.b7			/* Port P37 bit */

/*------------------------------------------------------
  Port P3 direction register
------------------------------------------------------*/
union	byte_def	pd3_addr;
#define		pd3			pd3_addr.byte

#define		pd3_0		pd3_addr.bit.b0			/* Port P30 direction bit */
#define		pd3_1		pd3_addr.bit.b1			/* Port P31 direction bit */
#define		pd3_3		pd3_addr.bit.b3			/* Port P33 direction bit */
#define		pd3_4		pd3_addr.bit.b4			/* Port P34 direction bit */
#define		pd3_5		pd3_addr.bit.b5			/* Port P35 direction bit */
#define		pd3_7		pd3_addr.bit.b7			/* Port P37 direction bit */

/*------------------------------------------------------
  Port P4 register
------------------------------------------------------*/
union	byte_def	p4_addr;
#define		p4			p4_addr.byte

#define		p4_2		p4_addr.bit.b2			/* Port P42 bit */
#define		p4_3		p4_addr.bit.b3			/* Port P43 bit */
#define		p4_4		p4_addr.bit.b4			/* Port P44 bit */
#define		p4_5		p4_addr.bit.b5			/* Port P45 bit */
#define		p4_6		p4_addr.bit.b6			/* Port P46 bit */
#define		p4_7		p4_addr.bit.b7			/* Port P47 bit */

/*------------------------------------------------------
  Port P4 direction register
------------------------------------------------------*/
union	byte_def	pd4_addr;
#define		pd4			pd4_addr.byte

#define		pd4_3		pd4_addr.bit.b3			/* Port P43 direction bit */
#define		pd4_4		pd4_addr.bit.b4			/* Port P44 direction bit */
#define		pd4_5		pd4_addr.bit.b5			/* Port P45 direction bit */

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -