diff --git a/right/build/kds/uhk-right release jlink.launch b/right/build/kds/uhk-right release jlink.launch index af1a50a..82c79b5 100644 --- a/right/build/kds/uhk-right release jlink.launch +++ b/right/build/kds/uhk-right release jlink.launch @@ -2,6 +2,7 @@ + @@ -16,7 +17,7 @@ - + @@ -69,7 +70,7 @@ - + diff --git a/right/src/include/board/board.c b/right/src/include/board/board.c deleted file mode 100644 index e69de29..0000000 diff --git a/right/src/include/board/board.h b/right/src/include/board/board.h deleted file mode 100644 index afe4185..0000000 --- a/right/src/include/board/board.h +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright (c) 2015, Freescale Semiconductor, Inc. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * - * o Redistributions of source code must retain the above copyright notice, this list - * of conditions and the following disclaimer. - * - * o Redistributions in binary form must reproduce the above copyright notice, this - * list of conditions and the following disclaimer in the documentation and/or - * other materials provided with the distribution. - * - * o Neither the name of Freescale Semiconductor, Inc. nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef _BOARD_H_ -#define _BOARD_H_ - -#include "fsl_gpio.h" - -#define BOARD_SW2_GPIO GPIOC -#define BOARD_SW2_PORT PORTC -#define BOARD_SW2_GPIO_PIN 1 -#define BOARD_SW2_IRQ PORTC_IRQn -#define BOARD_SW2_IRQ_HANDLER PORTC_IRQHandler - -#endif /* _BOARD_H_ */ diff --git a/right/src/include/board/pin_mux.c b/right/src/include/board/pin_mux.c index 9b5c59a..942b57e 100644 --- a/right/src/include/board/pin_mux.c +++ b/right/src/include/board/pin_mux.c @@ -30,8 +30,8 @@ #include "fsl_common.h" #include "fsl_port.h" -#include "board.h" #include "test_led.h" +#include "reset_button.h" void BOARD_InitPins(void) { @@ -46,13 +46,12 @@ void BOARD_InitPins(void) .pullSelect = kPORT_PullUp, .mux = kPORT_MuxAsGpio, }; - PORT_SetPinConfig(BOARD_SW2_PORT, BOARD_SW2_GPIO_PIN, &switchConfig); + PORT_SetPinConfig(RESET_BUTTON_PORT, RESET_BUTTON_PIN, &switchConfig); // Initialize LEDs. PORT_SetPinMux(TEST_LED_GPIO_PORT, TEST_LED_GPIO_PIN, kPORT_MuxAsGpio); - TEST_LED_INIT(LOGIC_LED_ON); -// GPIO_SetPinsOutput(TEST_LED_GPIO, 1 << TEST_LED_GPIO_PIN); + TEST_LED_INIT(0); // Initialize I2C. diff --git a/right/src/include/board/pin_mux.h b/right/src/include/board/pin_mux.h index e685a6b..955e947 100644 --- a/right/src/include/board/pin_mux.h +++ b/right/src/include/board/pin_mux.h @@ -31,7 +31,6 @@ #ifndef _PIN_MUX_H_ #define _PIN_MUX_H_ -#include "include/board/board.h" #include "fsl_common.h" #if defined(__cplusplus) diff --git a/right/src/main.c b/right/src/main.c index 7c83c1c..7732a7c 100644 --- a/right/src/main.c +++ b/right/src/main.c @@ -1,6 +1,5 @@ #include "fsl_i2c.h" #include "include/board/clock_config.h" -#include "include/board/board.h" #include "include/board/pin_mux.h" #include "usb_composite_device.h" #include "fsl_common.h" diff --git a/right/src/usb_interface_generic_hid.c b/right/src/usb_interface_generic_hid.c index 030408f..e5a80ce 100644 --- a/right/src/usb_interface_generic_hid.c +++ b/right/src/usb_interface_generic_hid.c @@ -1,4 +1,3 @@ -#include "include/board/board.h" #include "usb_composite_device.h" #include "usb_interface_generic_hid.h" diff --git a/right/src/usb_interface_keyboard.c b/right/src/usb_interface_keyboard.c index 28b781a..7bd6af0 100644 --- a/right/src/usb_interface_keyboard.c +++ b/right/src/usb_interface_keyboard.c @@ -1,5 +1,4 @@ #include "fsl_port.h" -#include "include/board/board.h" #include "usb_api.h" #include "usb_composite_device.h" #include "test_led.h" diff --git a/right/src/usb_interface_mouse.c b/right/src/usb_interface_mouse.c index 42586c4..c95aab6 100644 --- a/right/src/usb_interface_mouse.c +++ b/right/src/usb_interface_mouse.c @@ -1,8 +1,8 @@ -#include "include/board/board.h" #include "usb_composite_device.h" #include "usb_interface_mouse.h" #include "fsl_i2c.h" #include "i2c.h" +#include "reset_button.h" static usb_device_endpoint_struct_t UsbMouseEndpoints[USB_MOUSE_ENDPOINT_COUNT] = {{ USB_MOUSE_ENDPOINT_INDEX | (USB_IN << USB_DESCRIPTOR_ENDPOINT_ADDRESS_DIRECTION_SHIFT), @@ -58,7 +58,7 @@ static volatile usb_status_t UsbMouseAction(void) UsbMouseReport.wheelX = 0; UsbMouseReport.wheelY = 0; - if (!GPIO_ReadPinInput(BOARD_SW2_GPIO, BOARD_SW2_GPIO_PIN)) { + if (!GPIO_ReadPinInput(RESET_BUTTON_GPIO, RESET_BUTTON_PIN)) { if (!(scrollCounter % 10)) { UsbMouseReport.wheelX = -1; } diff --git a/shared/i2c_addresses.h b/shared/i2c_addresses.h index 08bfe58..bbe44e4 100644 --- a/shared/i2c_addresses.h +++ b/shared/i2c_addresses.h @@ -1,5 +1,5 @@ -#ifndef __I2C_H__ -#define __I2C_H__ +#ifndef __I2C_ADDRESSES_H__ +#define __I2C_ADDRESSES_H__ // 7-bit I2C addresses