change at86rf to 1ghznode
rom device runs ok with lpc11uxx
This commit is contained in:
@@ -62,7 +62,7 @@
|
||||
//--------------------------------------------------------------------+
|
||||
// BOARD DEFINE
|
||||
//--------------------------------------------------------------------+
|
||||
#define BOARD_AT86RF2XX 1
|
||||
#define BOARD_RF1GHZNODE 1
|
||||
#define BOARD_LPCXPRESSO1347 2
|
||||
|
||||
#define BOARD_NGX4330 3
|
||||
@@ -86,8 +86,8 @@
|
||||
#include "ngx/board_ngx4330.h"
|
||||
#elif BOARD == BOARD_LPCXPRESSO1347
|
||||
#include "lpcxpresso/board_lpcxpresso1347.h"
|
||||
#elif BOARD == BOARD_AT86RF2XX
|
||||
#include "board_at86rf2xx.h"
|
||||
#elif BOARD == BOARD_RF1GHZNODE
|
||||
#include "microbuilder/board_rf1ghznode.h"
|
||||
#elif BOARD == BOARD_EA4357
|
||||
#include "embedded_artists/board_ea4357.h"
|
||||
#elif BOARD == BOARD_MCB4300
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/**************************************************************************/
|
||||
/*!
|
||||
@file board_at86rf2xx.c
|
||||
@file board_rf1ghznode.c
|
||||
@author hathach (tinyusb.org)
|
||||
|
||||
@section LICENSE
|
||||
@@ -38,7 +38,7 @@
|
||||
|
||||
#include "../board.h"
|
||||
|
||||
#if BOARD == BOARD_AT86RF2XX
|
||||
#if BOARD == BOARD_RF1GHZNODE
|
||||
|
||||
void board_init(void)
|
||||
{
|
||||
@@ -57,10 +57,15 @@ void board_init(void)
|
||||
//--------------------------------------------------------------------+
|
||||
// LEDS
|
||||
//--------------------------------------------------------------------+
|
||||
void board_leds(uint32_t mask, uint32_t state)
|
||||
void board_leds(uint32_t on_mask, uint32_t off_mask)
|
||||
{
|
||||
if (mask)
|
||||
GPIOSetBitValue(CFG_LED_PORT, CFG_LED_PIN, mask & state ? CFG_LED_ON : CFG_LED_OFF);
|
||||
if (on_mask & BIT_(0))
|
||||
{
|
||||
GPIOSetBitValue(CFG_LED_PORT, CFG_LED_PIN, CFG_LED_ON);
|
||||
}else if (off_mask & BIT_(0))
|
||||
{
|
||||
GPIOSetBitValue(CFG_LED_PORT, CFG_LED_PIN, CFG_LED_OFF);
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------+
|
||||
@@ -1,6 +1,6 @@
|
||||
/**************************************************************************/
|
||||
/*!
|
||||
@file board_at86rf2xx.h
|
||||
@file board_rf1ghznode.h
|
||||
@author hathach (tinyusb.org)
|
||||
|
||||
@section LICENSE
|
||||
@@ -49,8 +49,8 @@
|
||||
* @{
|
||||
*/
|
||||
|
||||
#ifndef _TUSB_BOARD_AT86RF2XX_H_
|
||||
#define _TUSB_BOARD_AT86RF2XX_H_
|
||||
#ifndef _TUSB_BOARD_RF1GHZNODE_H_
|
||||
#define _TUSB_BOARD_RF1GHZNODE_H_
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
@@ -60,19 +60,17 @@
|
||||
#include "lpc11uxx/gpio.h"
|
||||
#include "lpc11uxx/uart.h"
|
||||
|
||||
#define CFG_PRINTF_TARGET PRINTF_TARGET_UART
|
||||
#define CFG_PRINTF_TARGET PRINTF_TARGET_DEBUG_CONSOLE
|
||||
|
||||
#define CFG_LED_PORT (1)
|
||||
#define CFG_LED_PIN (31)
|
||||
#define CFG_LED_ON (0)
|
||||
#define CFG_LED_OFF (1)
|
||||
|
||||
#define CFG_PRINTF_TARGET PRINTF_TARGET_UART
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _TUSB_BOARD_AT86RF2XX_H_ */
|
||||
#endif /* _TUSB_BOARD_RF1GHZNODE_H_ */
|
||||
|
||||
/** @} */
|
||||
File diff suppressed because it is too large
Load Diff
@@ -23,7 +23,7 @@ int main(void)
|
||||
board_init();
|
||||
tusb_init();
|
||||
|
||||
print_greeting();
|
||||
//print_greeting();
|
||||
while (1)
|
||||
{
|
||||
if (current_tick + 1000 < system_ticks)
|
||||
@@ -38,8 +38,13 @@ int main(void)
|
||||
if (usb_isConfigured())
|
||||
{
|
||||
#if TUSB_CFG_DEVICE_HID_KEYBOARD
|
||||
static uint32_t count =0;
|
||||
if (count < 4)
|
||||
{
|
||||
uint8_t keys[6] = {0x04}; // A character
|
||||
tusbd_hid_keyboard_send_report(0x00, keys, 1);
|
||||
count++;
|
||||
}
|
||||
#endif
|
||||
|
||||
#if TUSB_CFG_DEVICE_HID_MOUSE
|
||||
|
||||
@@ -102,7 +102,7 @@
|
||||
|
||||
#ifdef __CODE_RED // make use of code red's support for ram region macros
|
||||
#if (MCU == MCU_LPC11UXX) || (MCU == MCU_LPC13UXX)
|
||||
#define TUSB_RAM_SECTION ".data.$RAM1"
|
||||
#define TUSB_RAM_SECTION ".data.$RAM1" // TODO overflow usb ram
|
||||
#elif (MCU == MCU_LPC43XX)
|
||||
#define TUSB_RAM_SECTION ".data.$RAM3"
|
||||
#endif
|
||||
|
||||
@@ -297,7 +297,7 @@ const app_descriptor_configuration_t app_desc_configuration =
|
||||
{
|
||||
.bLength = sizeof(tusb_descriptor_endpoint_t),
|
||||
.bDescriptorType = TUSB_DESC_TYPE_ENDPOINT,
|
||||
.bEndpointAddress = 0x81,
|
||||
.bEndpointAddress = 0x81, //HID_KEYBOARD_EP_IN,
|
||||
.bmAttributes = { .xfer = TUSB_XFER_INTERRUPT },
|
||||
.wMaxPacketSize = { .size = 0x08 },
|
||||
.bInterval = 0x0A
|
||||
@@ -376,8 +376,6 @@ const app_descriptor_configuration_t app_desc_configuration =
|
||||
.bInterval = 1
|
||||
},
|
||||
#endif
|
||||
|
||||
.null_termination = 0,
|
||||
};
|
||||
|
||||
TUSB_CFG_ATTR_USBRAM ATTR_ALIGNED(4)
|
||||
|
||||
Reference in New Issue
Block a user