Merge branch 'develop' into contrib/cc26xx/bootloader-config

This commit is contained in:
George Oikonomou 2018-09-17 13:26:01 +01:00 committed by GitHub
commit 9a2a3d50aa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 39 additions and 64 deletions

View File

@ -52,10 +52,10 @@ gpio_interrupt_isr(void)
/* Read interrupt flags */ /* Read interrupt flags */
pin_mask = (HWREG(GPIO_BASE + GPIO_O_EVFLAGS31_0) & GPIO_DIO_ALL_MASK); pin_mask = (HWREG(GPIO_BASE + GPIO_O_EVFLAGS31_0) & GPIO_DIO_ALL_MASK);
gpio_hal_event_handler(pin_mask);
/* Clear the interrupt flags */ /* Clear the interrupt flags */
HWREG(GPIO_BASE + GPIO_O_EVFLAGS31_0) = pin_mask; HWREG(GPIO_BASE + GPIO_O_EVFLAGS31_0) = pin_mask;
gpio_hal_event_handler(pin_mask);
} }
/*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/
/** @} */ /** @} */

View File

@ -111,15 +111,10 @@
*/ */
#define EXT_FLASH_SPI_CONTROLLER SPI_CONTROLLER_SPI0 #define EXT_FLASH_SPI_CONTROLLER SPI_CONTROLLER_SPI0
#define BOARD_IOID_FLASH_SCK IOID_10 #define EXT_FLASH_SPI_PIN_SCK IOID_10
#define BOARD_IOID_FLASH_MOSI IOID_9 #define EXT_FLASH_SPI_PIN_MOSI IOID_9
#define BOARD_IOID_FLASH_MISO IOID_8 #define EXT_FLASH_SPI_PIN_MISO IOID_8
#define BOARD_IOID_FLASH_CS IOID_20 #define EXT_FLASH_SPI_PIN_CS IOID_20
#define EXT_FLASH_SPI_PIN_SCK 10
#define EXT_FLASH_SPI_PIN_MOSI 9
#define EXT_FLASH_SPI_PIN_MISO 8
#define EXT_FLASH_SPI_PIN_CS 20
#define EXT_FLASH_DEVICE_ID 0x14 #define EXT_FLASH_DEVICE_ID 0x14
#define EXT_FLASH_MID 0xC2 #define EXT_FLASH_MID 0xC2

View File

@ -111,15 +111,10 @@
*/ */
#define EXT_FLASH_SPI_CONTROLLER SPI_CONTROLLER_SPI0 #define EXT_FLASH_SPI_CONTROLLER SPI_CONTROLLER_SPI0
#define BOARD_IOID_FLASH_SCK IOID_10 #define EXT_FLASH_SPI_PIN_SCK IOID_10
#define BOARD_IOID_FLASH_MOSI IOID_9 #define EXT_FLASH_SPI_PIN_MOSI IOID_9
#define BOARD_IOID_FLASH_MISO IOID_8 #define EXT_FLASH_SPI_PIN_MISO IOID_8
#define BOARD_IOID_FLASH_CS IOID_20 #define EXT_FLASH_SPI_PIN_CS IOID_20
#define EXT_FLASH_SPI_PIN_SCK 10
#define EXT_FLASH_SPI_PIN_MOSI 9
#define EXT_FLASH_SPI_PIN_MISO 8
#define EXT_FLASH_SPI_PIN_CS 20
#define EXT_FLASH_DEVICE_ID 0x14 #define EXT_FLASH_DEVICE_ID 0x14
#define EXT_FLASH_MID 0xC2 #define EXT_FLASH_MID 0xC2

View File

@ -111,15 +111,10 @@
*/ */
#define EXT_FLASH_SPI_CONTROLLER SPI_CONTROLLER_SPI0 #define EXT_FLASH_SPI_CONTROLLER SPI_CONTROLLER_SPI0
#define BOARD_IOID_FLASH_SCK IOID_10 #define EXT_FLASH_SPI_PIN_SCK IOID_10
#define BOARD_IOID_FLASH_MOSI IOID_9 #define EXT_FLASH_SPI_PIN_MOSI IOID_9
#define BOARD_IOID_FLASH_MISO IOID_8 #define EXT_FLASH_SPI_PIN_MISO IOID_8
#define BOARD_IOID_FLASH_CS IOID_20 #define EXT_FLASH_SPI_PIN_CS IOID_20
#define EXT_FLASH_SPI_PIN_SCK 10
#define EXT_FLASH_SPI_PIN_MOSI 9
#define EXT_FLASH_SPI_PIN_MISO 8
#define EXT_FLASH_SPI_PIN_CS 20
#define EXT_FLASH_DEVICE_ID 0x14 #define EXT_FLASH_DEVICE_ID 0x14
#define EXT_FLASH_MID 0xC2 #define EXT_FLASH_MID 0xC2

View File

@ -111,15 +111,10 @@
*/ */
#define EXT_FLASH_SPI_CONTROLLER SPI_CONTROLLER_SPI0 #define EXT_FLASH_SPI_CONTROLLER SPI_CONTROLLER_SPI0
#define BOARD_IOID_FLASH_SCK IOID_10 #define EXT_FLASH_SPI_PIN_SCK IOID_10
#define BOARD_IOID_FLASH_MOSI IOID_9 #define EXT_FLASH_SPI_PIN_MOSI IOID_9
#define BOARD_IOID_FLASH_MISO IOID_8 #define EXT_FLASH_SPI_PIN_MISO IOID_8
#define BOARD_IOID_FLASH_CS IOID_20 #define EXT_FLASH_SPI_PIN_CS IOID_20
#define EXT_FLASH_SPI_PIN_SCK 10
#define EXT_FLASH_SPI_PIN_MOSI 9
#define EXT_FLASH_SPI_PIN_MISO 8
#define EXT_FLASH_SPI_PIN_CS 20
#define EXT_FLASH_DEVICE_ID 0x14 #define EXT_FLASH_DEVICE_ID 0x14
#define EXT_FLASH_MID 0xC2 #define EXT_FLASH_MID 0xC2

View File

@ -137,15 +137,10 @@
*/ */
#define EXT_FLASH_SPI_CONTROLLER SPI_CONTROLLER_SPI0 #define EXT_FLASH_SPI_CONTROLLER SPI_CONTROLLER_SPI0
#define BOARD_IOID_FLASH_SCK IOID_17 #define EXT_FLASH_SPI_PIN_SCK IOID_17
#define BOARD_IOID_FLASH_MOSI IOID_19 #define EXT_FLASH_SPI_PIN_MOSI IOID_19
#define BOARD_IOID_FLASH_MISO IOID_18 #define EXT_FLASH_SPI_PIN_MISO IOID_18
#define BOARD_IOID_FLASH_CS IOID_14 #define EXT_FLASH_SPI_PIN_CS IOID_14
#define EXT_FLASH_SPI_PIN_SCK 17
#define EXT_FLASH_SPI_PIN_MOSI 19
#define EXT_FLASH_SPI_PIN_MISO 18
#define EXT_FLASH_SPI_PIN_CS 14
#define EXT_FLASH_DEVICE_ID 0x14 #define EXT_FLASH_DEVICE_ID 0x14
#define EXT_FLASH_MID 0xC2 #define EXT_FLASH_MID 0xC2

View File

@ -139,15 +139,10 @@
*/ */
#define EXT_FLASH_SPI_CONTROLLER SPI_CONTROLLER_SPI0 #define EXT_FLASH_SPI_CONTROLLER SPI_CONTROLLER_SPI0
#define BOARD_IOID_FLASH_SCK IOID_17 #define EXT_FLASH_SPI_PIN_SCK IOID_17
#define BOARD_IOID_FLASH_MOSI IOID_19 #define EXT_FLASH_SPI_PIN_MOSI IOID_19
#define BOARD_IOID_FLASH_MISO IOID_18 #define EXT_FLASH_SPI_PIN_MISO IOID_18
#define BOARD_IOID_FLASH_CS IOID_14 #define EXT_FLASH_SPI_PIN_CS IOID_14
#define EXT_FLASH_SPI_PIN_SCK 17
#define EXT_FLASH_SPI_PIN_MOSI 19
#define EXT_FLASH_SPI_PIN_MISO 18
#define EXT_FLASH_SPI_PIN_CS 14
#if SENSORTAG_CC2650_REV_1_2_0 #if SENSORTAG_CC2650_REV_1_2_0
#define EXT_FLASH_DEVICE_ID 0x12 #define EXT_FLASH_DEVICE_ID 0x12

View File

@ -128,7 +128,8 @@ PT_THREAD(handle_output(struct httpd_state *s))
s->script = NULL; s->script = NULL;
s->script = httpd_simple_get_script(&s->filename[1]); s->script = httpd_simple_get_script(&s->filename[1]);
if(s->script == NULL) { if(s->script == NULL) {
strncpy(s->filename, "/notfound.html", sizeof(s->filename)); strncpy(s->filename, "/notfound.html", sizeof(s->filename) - 1);
s->filename[sizeof(s->filename) - 1] = '\0';
PT_WAIT_THREAD(&s->outputpt, PT_WAIT_THREAD(&s->outputpt,
send_headers(s, http_header_404)); send_headers(s, http_header_404));
PT_WAIT_THREAD(&s->outputpt, PT_WAIT_THREAD(&s->outputpt,
@ -170,7 +171,8 @@ PT_THREAD(handle_input(struct httpd_state *s))
urlconv_tofilename(s->filename, s->inputbuf, sizeof(s->filename)); urlconv_tofilename(s->filename, s->inputbuf, sizeof(s->filename));
#else /* URLCONV */ #else /* URLCONV */
if(s->inputbuf[1] == ISO_space) { if(s->inputbuf[1] == ISO_space) {
strncpy(s->filename, http_index_html, sizeof(s->filename)); strncpy(s->filename, http_index_html, sizeof(s->filename) - 1);
s->filename[sizeof(s->filename) - 1] = '\0';
} else { } else {
s->inputbuf[PSOCK_DATALEN(&s->sin) - 1] = 0; s->inputbuf[PSOCK_DATALEN(&s->sin) - 1] = 0;
strncpy(s->filename, s->inputbuf, sizeof(s->filename)); strncpy(s->filename, s->inputbuf, sizeof(s->filename));

View File

@ -579,8 +579,10 @@ tun_alloc(char *dev, int tap)
* IFF_NO_PI - Do not provide packet information * IFF_NO_PI - Do not provide packet information
*/ */
ifr.ifr_flags = (tap ? IFF_TAP : IFF_TUN) | IFF_NO_PI; ifr.ifr_flags = (tap ? IFF_TAP : IFF_TUN) | IFF_NO_PI;
if(*dev != 0) if(*dev != 0) {
strncpy(ifr.ifr_name, dev, IFNAMSIZ); strncpy(ifr.ifr_name, dev, sizeof(ifr.ifr_name) - 1);
ifr.ifr_name[sizeof(ifr.ifr_name) - 1] = '\0';
}
if((err = ioctl(fd, TUNSETIFF, (void *) &ifr)) < 0 ) { if((err = ioctl(fd, TUNSETIFF, (void *) &ifr)) < 0 ) {
close(fd); close(fd);
@ -793,9 +795,9 @@ main(int argc, char **argv)
case 's': case 's':
if(strncmp("/dev/", optarg, 5) == 0) { if(strncmp("/dev/", optarg, 5) == 0) {
siodev = optarg + 5; siodev = optarg + 5;
} else { } else {
siodev = optarg; siodev = optarg;
} }
break; break;
@ -806,10 +808,11 @@ main(int argc, char **argv)
case 't': case 't':
if(strncmp("/dev/", optarg, 5) == 0) { if(strncmp("/dev/", optarg, 5) == 0) {
strncpy(tundev, optarg + 5, sizeof(tundev)); strncpy(tundev, optarg + 5, sizeof(tundev) - 1);
} else { } else {
strncpy(tundev, optarg, sizeof(tundev)); strncpy(tundev, optarg, sizeof(tundev) - 1);
} }
tundev[sizeof(tundev) - 1] = '\0';
break; break;
case 'a': case 'a':