浏览代码

WIP tidy up the NRF24L01 code

Bernd Gottschlag 5 年前
父节点
当前提交
33e1d5e700
共有 3 个文件被更改,包括 4 次插入1 次删除
  1. 1
    0
      weather-sensor/firmware/main.c
  2. 1
    1
      weather-sensor/firmware/makefile
  3. 2
    0
      weather-sensor/firmware/nrf24l01.h

+ 1
- 0
weather-sensor/firmware/main.c 查看文件

8
 #include <string.h>
8
 #include <string.h>
9
 
9
 
10
 #include "nrf24l01.h"
10
 #include "nrf24l01.h"
11
+#include "nrf24l01_definitions.h"
11
 #include "uart_debug.h"
12
 #include "uart_debug.h"
12
 
13
 
13
 //#define LED_DDR     DDRB        //DDRA, DDRB...
14
 //#define LED_DDR     DDRB        //DDRA, DDRB...

+ 1
- 1
weather-sensor/firmware/makefile 查看文件

7
 flash: main.hex
7
 flash: main.hex
8
 	sudo avrdude -c avr109 -b 57600 -P /dev/ttyACM0 -p m32u4 -v -U flash:w:main.hex
8
 	sudo avrdude -c avr109 -b 57600 -P /dev/ttyACM0 -p m32u4 -v -U flash:w:main.hex
9
 
9
 
10
-main: main.c nrf24l01.c nrf24l01.h uart_debug.c uart_debug.h
10
+main: main.c nrf24l01.c nrf24l01.h nrf24l01_definitions.h uart_debug.c uart_debug.h
11
 	avr-gcc main.c nrf24l01.c uart_debug.c  -o main -mmcu=atmega32u4 -Os -Wall -Wextra -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -DF_CPU=8000000UL
11
 	avr-gcc main.c nrf24l01.c uart_debug.c  -o main -mmcu=atmega32u4 -Os -Wall -Wextra -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -DF_CPU=8000000UL
12
 
12
 
13
 main.hex: main
13
 main.hex: main

+ 2
- 0
weather-sensor/firmware/nrf24l01.h 查看文件

1
 #ifndef NRF24L01_H
1
 #ifndef NRF24L01_H
2
 #define NRF24L01_H
2
 #define NRF24L01_H
3
 
3
 
4
+
5
+
4
 /* AVR I/O pin definionts */
6
 /* AVR I/O pin definionts */
5
 #define NRF_CE_DDR   DDRB
7
 #define NRF_CE_DDR   DDRB
6
 #define NRF_CE_PORT  PORTB
8
 #define NRF_CE_PORT  PORTB

正在加载...
取消
保存