📄 mcu.h
字号:
/*= mcu.h ======================================================================
*
* Copyright (C) 2005 Nordic Semiconductor
*
* This file is distributed in the hope that it will be useful, but WITHOUT
* WARRANTY OF ANY KIND.
*
* Author(s): Borge Strand
*
* Description:
*
* General-purpose MCU file. Any MCU used must support these functions.
*
* Compiler: Tested with WinAVR, avr-gcc (GCC) 3.4.3
*
* Revision: 2.0
*
*==============================================================================
*/
// Only include this file once
#ifndef MCU_H
#define MCU_H
// Local includes
#include "hpref_defines.h"
#include "uartdebug.h"
// General MCU functions
void mcu_init(void);
// Delay functions
void mcu_wait_ms(unsigned int time);
// Random generator
char mcu_randombyte(void);
// 2-wire interface
void mcu_2w_master_init(void);
char mcu_2w_read(char devadr, char adr);
void mcu_2w_write(char devadr, char adr, char data);
// UART interface used by debug
#ifdef DEBUG
void mcu_uart_init(void);
int mcu_putchar(char c);
int mcu_getchar(void);
#endif
// Product user interface on TX = this MCU
char mcu_buttons(void);
// LED on MCU on ATX
#ifdef USELED
void mcu_atxled(char mode);
#endif
// Use interrupts from nRF24Z1 to MCU
#ifdef Z1INTERRUPT
void mcu_z1int_clear(void);
void mcu_z1int_enable(void);
void mcu_z1int_disable(void);
char mcu_z1int_active(void);
#endif // Z1INTERRUPT
// Pins required for power down
void mcu_z1wakeup_pin(void);
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -