库配置文件中的Erorr

时间:2017-09-01 22:31:18

标签: embedded avr uart electronics atmelstudio

//
// Created by lenovo on 8/27/2017.
//

#ifndef UART_UART_PRIV_H
#define UART_UART_PRIV_H

/* Main PINS */
#define UCSRA *((volatile u8 *)0x2B)
#define UCSRB *((volatile u8 *)0x2A)
#define UCSRC *((volatile u8 *)0x40)
#define UBRRL *((volatile u8 *)0x29)
#define UBRRH *((volatile u8 *)0x40)
#define UDR   *((volatile u8 *)0x2C)
/* END Main PINS */
#define NONE        0x00
#define twoBit      0x08
#define oneBit      0x00
/* Bits */
#define fiveBits    0x00
#define SixBits     0x02
#define SevenBits   0x04
#define EightBits   0x06
/* End Bits */
#define DIS         0  // Disable
#define EN          1  // Enable

#define UART_9600   9600UL
#endif //UART_UART_PRIV_H

NumberType 这个错误被调用的对象不是函数或指针 这是我的私人文件,其中包含配置文件中的所有单词地址,即第一个文件

else{         // if $fp does exist
  stream_context_set_option($fp, 'ssl', 'verify_peer', false);
  stream_context_set_option($fp, 'ssl', 'allow_self_signed', true);
  stream_context_set_option($fp, 'ssl', 'verify_peer_name', false);
    }

私有文件,包含我的微控制器ATmega16的一些地址。而且,我的Config文件是对私有文件的引用;其中有私钥定义的密钥,例如,在UART_Partit中,我写了NONE和NONE地址私下定义,但它显示错误

1 个答案:

答案 0 :(得分:0)

您需要在声明文件中包含您的文件。

#ifndef UART_UART_CFG_H
#define UART_UART_CFG_H

#include "uart_priv.h"

#define UART_BaudRate     1200   //9600UL
#define CLK               16
#define UART_Parity       NONE
#define UART_TX           EN_TX
#define UART_RX           EN_RX
#define UART_STARTBITS      1
#define UART_STOPBITS       1
#define UART_DATABITS   EightBits

#endif //UART_UART_CFG_H

并且在第二个文件中没有针对这些常量的EN_TX或EN_RX定义。