ATmega16L 的中断源及在GCC中的中断名

 
ATmega16L 的中断源及在GCC中的中断名 
中断源中断定义在GCC中的中断名SIG_NAME
RESET  复位中断 
INT0外部中断请求0SIG_INTERRUPT0
INT1外部中断请求1SIG_INTERRUPT1
TIMER2 COMP定时/计时器 2 比较匹配SIG_OUTPUT_COMPARE2
TIMER2 OVF定时/计时器 2 溢出SIG_OVERFLOW2
TIMER1 COMPA定时/计时器 1 比较匹配 ASIG_OUTPUT_COMPARE1A
TIMER1 COMPB定时/计时器 1 比较匹配 BSIG_OUTPUT_COMPARE1B
TIMER1 OVF定时/计时器 1 溢出SIG_OVERFLOW1
TIMER0 OVF定时/计时器 0 溢出SIG_OVERFLOW0
SPI, STCSPI传输完成SIG_SPI
USART, RXCUSART 接收完一个字节SIG_UART_RECV
USART, UDREUSART 数据寄存器空SIG_UART_DATA
USART, TXCUSART 发送完一个字节SIG_UART_TRANS
ADC内置模数转换器转换完成SIG_ADC
EE_RDYEEPROM 准备好接受读/写SIG_EEPROM_READY
ANA_COMP模拟比较器SIG_COMPARATOR
TWI双线串行总线接口SIG_2WIRE_SERIAL
INT2外部中断请求2 SIG_INTERRUPT2
TIMER0 COMP定时/计时器 0 比较匹配SIG_OUTPUT_COMPARE0
SPM_RDY存储程序空间准备好SIG_SPM_READY
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
C#简单变色龙游戏 /// <summary> /// 创建一副52张的新牌 /// </summary> /// <returns></returns> public static System.Collections.ArrayList Creat() { System.Collections.ArrayList list = new System.Collections.ArrayList(); for (int i = 3; i <= 6; i++) { for (int j = 1; j <= 13; j++) { Poker p = new Poker(); switch (j) { case 1: p = new Poker((PokerStyle)i, "A", j, 11); break; case 2: p = new Poker((PokerStyle)i, j.ToString(), j, 10); break; case 11: p = new Poker((PokerStyle)i, "J", j, 11); break; case 12: p = new Poker((PokerStyle)i, "Q", j, 2); break; case 13: p = new Poker((PokerStyle)i, "K", j, 3); break; default: p = new Poker((PokerStyle)i, j.ToString(), j, j); break; } list.Add(p); } } return list; } /// <summary> /// 洗牌 /// </summary> /// <param name="list"></param> /// <returns></returns> public static System.Collections.ArrayList shuffle(System.Collections.ArrayList list)//洗牌 { System.Random r = new Random(); for (int i = 0; i <= 7; i++) { int rightOrRight = r.Next(1, 3); Poker[] leftPoker = new Poker[list.Count / 2]; Poker[] rightPoker = new Poker[list.Count % 2 == 0 ? list.Count / 2 : list.Count / 2 + 1]; list.CopyTo(0, leftPoker, 0, list.Count / 2); list.CopyTo(list.Count / 2, rightPoker, 0, list.Count % 2 == 0 ? list.Count / 2 : list.Count / 2 + 1); if (rightOrRight == 1)//左边插右边 { list.Clear(); for (int j = 0; j <= leftPoker.Length - 1; j++) { list.Add(rightPoker[j]); list.Add(leftPoker[j]); } if (leftPoker.Length != rightPoker.Length) { list.Add(rightPoker[rightPoker.Length - 1]); } } else { list.Clear(); for (int j = 0; j <= leftPoker.Length - 1; j++) { list.Add(leftPoker[j]); list.Add(rightPoker[j]); } if (leftPoker.Length != rightPoker.Length) { list.Add(rightPoker[rightPoker.Length - 1]); } } } return list; }

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值