[GitHub] [mynewt-core] apache-mynewt-bot commented on pull request #2348: Add NRF9160 BSP with I2C, SPI, UART and GPIO support

2020-08-10 Thread GitBox


apache-mynewt-bot commented on pull request #2348:
URL: https://github.com/apache/mynewt-core/pull/2348#issuecomment-671541951


   
   
   
   ## Style check summary
   
   ### Our coding style is 
[here!](https://github.com/apache/mynewt-core/blob/master/CODING_STANDARDS.md)
   
   
    hw/bus/drivers/i2c_nrf91_twim/src/i2c_nrf91_twim.c
   
   
   ```diff
   @@ -40,17 +40,17 @@

#if MYNEWT_VAL(I2C_NRF91_TWIM_STAT)
STATS_SECT_START(twim_stats_section)
   -STATS_SECT_ENTRY(sda_lo_err)/* SDA pulled low on r/w */
   -STATS_SECT_ENTRY(sda_lo_err_nrecov) /* SDA pulled low on r/w (not 
recovered)*/
   -STATS_SECT_ENTRY(scl_hi_err)/* SCL unresponsive */
   -STATS_SECT_ENTRY(scl_hi_err_nrecov) /* SCL unresponsive (not 
recovered)*/
   +STATS_SECT_ENTRY(sda_lo_err)/* SDA pulled low on r/w */
   +STATS_SECT_ENTRY(sda_lo_err_nrecov) /* SDA pulled low on r/w (not 
recovered)*/
   +STATS_SECT_ENTRY(scl_hi_err)/* SCL unresponsive */
   +STATS_SECT_ENTRY(scl_hi_err_nrecov) /* SCL unresponsive (not 
recovered)*/
STATS_SECT_END

STATS_NAME_START(twim_stats_section)
   -STATS_NAME(twim_stats_section, sda_lo_err)
   -STATS_NAME(twim_stats_section, sda_lo_err_nrecov)
   -STATS_NAME(twim_stats_section, scl_hi_err)
   -STATS_NAME(twim_stats_section, scl_hi_err_nrecov)
   +STATS_NAME(twim_stats_section, sda_lo_err)
   +STATS_NAME(twim_stats_section, sda_lo_err_nrecov)
   +STATS_NAME(twim_stats_section, scl_hi_err)
   +STATS_NAME(twim_stats_section, scl_hi_err_nrecov)
STATS_NAME_END(twim_stats_section)
#endif

   @@ -352,7 +352,8 @@
nrf_twim->TASKS_STOP = 1;
nrf_twim->ENABLE = TWIM_ENABLE_ENABLE_Disabled;
nrf_twim->ENABLE = TWIM_ENABLE_ENABLE_Enabled;
   -};
   +}
   +;

#if MYNEWT_VAL(I2C_NRF91_TWIM_STAT)
STATS_INC(dd->stats, scl_hi_err_nrecov);
   ```
   
   
   
    hw/mcu/nordic/nrf91xx/src/hal_flash.c
   
   
   ```diff
   @@ -25,7 +25,7 @@
#include "nrfx_config_nrf9160.h"
#include "nrf_nvmc.h"

   -#define NRF91K_FLASH_SECTOR_SZ  4096
   +#define NRF91K_FLASH_SECTOR_SZ  4096

static int nrf91k_flash_read(const struct hal_flash *dev, uint32_t address,
 void *dst, uint32_t num_bytes);
   @@ -49,8 +49,8 @@
const struct hal_flash nrf91k_flash_dev = {
.hf_itf = &nrf91k_flash_funcs,
.hf_base_addr = 0x,
   -.hf_size = 1024 * 1024, /* XXX read from factory info? */
   -.hf_sector_cnt = 256,   /* XXX read from factory info? */
   +.hf_size = 1024 * 1024, /* XXX read from factory info? */
   +.hf_sector_cnt = 256,   /* XXX read from factory info? */
.hf_align = 1,
.hf_erased_val = 0xff,
};
   ```
   
   
   
    hw/mcu/nordic/nrf91xx/src/hal_gpio.c
   
   
   ```diff
   @@ -116,7 +116,7 @@
port->OUTCLR = HAL_GPIO_MASK(pin);
}
port->PIN_CNF[pin_index] = GPIO_PIN_CNF_DIR_Output |
   -(GPIO_PIN_CNF_INPUT_Disconnect << GPIO_PIN_CNF_INPUT_Pos);
   +   (GPIO_PIN_CNF_INPUT_Disconnect << 
GPIO_PIN_CNF_INPUT_Pos);
port->DIRSET = HAL_GPIO_MASK(pin);

return 0;
   ```
   
   
   
    hw/mcu/nordic/nrf91xx/src/hal_i2c.c
   
   
   ```diff
   @@ -38,18 +38,18 @@

#define NRF91_SCL_PIN_CONF \
((GPIO_PIN_CNF_SENSE_Disabled << GPIO_PIN_CNF_SENSE_Pos) | \
   - (GPIO_PIN_CNF_DRIVE_S0D1<< GPIO_PIN_CNF_DRIVE_Pos) |  \
   - (GPIO_PIN_CNF_PULL_Pullup   << GPIO_PIN_CNF_PULL_Pos) |   \
   + (GPIO_PIN_CNF_DRIVE_S0D1 << GPIO_PIN_CNF_DRIVE_Pos) |  \
   + (GPIO_PIN_CNF_PULL_Pullup << GPIO_PIN_CNF_PULL_Pos) |   \
 (GPIO_PIN_CNF_INPUT_Connect << GPIO_PIN_CNF_INPUT_Pos) |  \
   - (GPIO_PIN_CNF_DIR_Input << GPIO_PIN_CNF_DIR_Pos))
   + (GPIO_PIN_CNF_DIR_Input << GPIO_PIN_CNF_DIR_Pos))
#define NRF91_SDA_PIN_CONF NRF91_SCL_PIN_CONF

#define NRF91_SCL_PIN_CONF_CLR  \
   - ((GPIO_PIN_CNF_SENSE_Disabled << GPIO_PIN_CNF_SENSE_Pos) | \
   -  (GPIO_PIN_CNF_DRIVE_S0D1 << GPIO_PIN_CNF_DRIVE_Pos) | \
   -  (GPIO_PIN_CNF_PULL_Pullup<< GPIO_PIN_CNF_PULL_Pos) |  \
   -  (GPIO_PIN_CNF_INPUT_Connect  << GPIO_PIN_CNF_INPUT_Pos) | \
   -  (GPIO_PIN_CNF_DIR_Output << GPIO_PIN_CNF_DIR_Pos))
   +((GPIO_PIN_CNF_SENSE_Disabled << GPIO_PIN_CNF_SENSE_Pos) | \
   + (GPIO_PIN_CNF_DRIVE_S0D1 << GPIO_PIN_CNF_DRIVE_Pos) | \
   + (GPIO_PIN_CNF_PULL_Pullup << GPIO_PIN_CNF_PULL_Pos) |  \
   + (GPIO_PIN_CNF_INPUT_Connect << GPIO_PIN_CNF_INPUT_Pos) | \
   + (GPIO_PIN_CNF_DIR_Output << GPIO_PIN_CNF_DIR_Pos))
#define NRF91_SDA_PIN_CONF_CLRNRF91_SCL_PIN_CONF_CLR

struct nrf91_hal_i2c {
   ```
   
   
   
    hw/mcu/nordic/nrf91xx/src/hal_qspi.c
   
   
   ```diff
   @@ -162,7 +162,7 @@

while

[GitHub] [mynewt-core] apache-mynewt-bot removed a comment on pull request #2348: Add NRF9160 BSP with I2C, SPI, UART and GPIO support

2020-08-10 Thread GitBox


apache-mynewt-bot removed a comment on pull request #2348:
URL: https://github.com/apache/mynewt-core/pull/2348#issuecomment-671533692


   
   
   
   ## Style check summary
   
   ### Our coding style is 
[here!](https://github.com/apache/mynewt-core/blob/master/CODING_STANDARDS.md)
   
   
    hw/bus/drivers/i2c_nrf91_twim/src/i2c_nrf91_twim.c
   
   
   ```diff
   @@ -40,17 +40,17 @@

#if MYNEWT_VAL(I2C_NRF91_TWIM_STAT)
STATS_SECT_START(twim_stats_section)
   -STATS_SECT_ENTRY(sda_lo_err)/* SDA pulled low on r/w */
   -STATS_SECT_ENTRY(sda_lo_err_nrecov) /* SDA pulled low on r/w (not 
recovered)*/
   -STATS_SECT_ENTRY(scl_hi_err)/* SCL unresponsive */
   -STATS_SECT_ENTRY(scl_hi_err_nrecov) /* SCL unresponsive (not 
recovered)*/
   +STATS_SECT_ENTRY(sda_lo_err)/* SDA pulled low on r/w */
   +STATS_SECT_ENTRY(sda_lo_err_nrecov) /* SDA pulled low on r/w (not 
recovered)*/
   +STATS_SECT_ENTRY(scl_hi_err)/* SCL unresponsive */
   +STATS_SECT_ENTRY(scl_hi_err_nrecov) /* SCL unresponsive (not 
recovered)*/
STATS_SECT_END

STATS_NAME_START(twim_stats_section)
   -STATS_NAME(twim_stats_section, sda_lo_err)
   -STATS_NAME(twim_stats_section, sda_lo_err_nrecov)
   -STATS_NAME(twim_stats_section, scl_hi_err)
   -STATS_NAME(twim_stats_section, scl_hi_err_nrecov)
   +STATS_NAME(twim_stats_section, sda_lo_err)
   +STATS_NAME(twim_stats_section, sda_lo_err_nrecov)
   +STATS_NAME(twim_stats_section, scl_hi_err)
   +STATS_NAME(twim_stats_section, scl_hi_err_nrecov)
STATS_NAME_END(twim_stats_section)
#endif

   @@ -352,7 +352,8 @@
nrf_twim->TASKS_STOP = 1;
nrf_twim->ENABLE = TWIM_ENABLE_ENABLE_Disabled;
nrf_twim->ENABLE = TWIM_ENABLE_ENABLE_Enabled;
   -};
   +}
   +;

#if MYNEWT_VAL(I2C_NRF91_TWIM_STAT)
STATS_INC(dd->stats, scl_hi_err_nrecov);
   ```
   
   
   
    hw/mcu/nordic/nrf91xx/src/hal_flash.c
   
   
   ```diff
   @@ -25,7 +25,7 @@
#include "nrfx_config_nrf9160.h"
#include "nrf_nvmc.h"

   -#define NRF91K_FLASH_SECTOR_SZ  4096
   +#define NRF91K_FLASH_SECTOR_SZ  4096

static int nrf91k_flash_read(const struct hal_flash *dev, uint32_t address,
 void *dst, uint32_t num_bytes);
   @@ -49,8 +49,8 @@
const struct hal_flash nrf91k_flash_dev = {
.hf_itf = &nrf91k_flash_funcs,
.hf_base_addr = 0x,
   -.hf_size = 1024 * 1024, /* XXX read from factory info? */
   -.hf_sector_cnt = 256,   /* XXX read from factory info? */
   +.hf_size = 1024 * 1024, /* XXX read from factory info? */
   +.hf_sector_cnt = 256,   /* XXX read from factory info? */
.hf_align = 1,
.hf_erased_val = 0xff,
};
   ```
   
   
   
    hw/mcu/nordic/nrf91xx/src/hal_gpio.c
   
   
   ```diff
   @@ -116,7 +116,7 @@
port->OUTCLR = HAL_GPIO_MASK(pin);
}
port->PIN_CNF[pin_index] = GPIO_PIN_CNF_DIR_Output |
   -(GPIO_PIN_CNF_INPUT_Disconnect << GPIO_PIN_CNF_INPUT_Pos);
   +   (GPIO_PIN_CNF_INPUT_Disconnect << 
GPIO_PIN_CNF_INPUT_Pos);
port->DIRSET = HAL_GPIO_MASK(pin);

return 0;
   ```
   
   
   
    hw/mcu/nordic/nrf91xx/src/hal_i2c.c
   
   
   ```diff
   @@ -38,18 +38,18 @@

#define NRF91_SCL_PIN_CONF \
((GPIO_PIN_CNF_SENSE_Disabled << GPIO_PIN_CNF_SENSE_Pos) | \
   - (GPIO_PIN_CNF_DRIVE_S0D1<< GPIO_PIN_CNF_DRIVE_Pos) |  \
   - (GPIO_PIN_CNF_PULL_Pullup   << GPIO_PIN_CNF_PULL_Pos) |   \
   + (GPIO_PIN_CNF_DRIVE_S0D1 << GPIO_PIN_CNF_DRIVE_Pos) |  \
   + (GPIO_PIN_CNF_PULL_Pullup << GPIO_PIN_CNF_PULL_Pos) |   \
 (GPIO_PIN_CNF_INPUT_Connect << GPIO_PIN_CNF_INPUT_Pos) |  \
   - (GPIO_PIN_CNF_DIR_Input << GPIO_PIN_CNF_DIR_Pos))
   + (GPIO_PIN_CNF_DIR_Input << GPIO_PIN_CNF_DIR_Pos))
#define NRF91_SDA_PIN_CONF NRF91_SCL_PIN_CONF

#define NRF91_SCL_PIN_CONF_CLR  \
   - ((GPIO_PIN_CNF_SENSE_Disabled << GPIO_PIN_CNF_SENSE_Pos) | \
   -  (GPIO_PIN_CNF_DRIVE_S0D1 << GPIO_PIN_CNF_DRIVE_Pos) | \
   -  (GPIO_PIN_CNF_PULL_Pullup<< GPIO_PIN_CNF_PULL_Pos) |  \
   -  (GPIO_PIN_CNF_INPUT_Connect  << GPIO_PIN_CNF_INPUT_Pos) | \
   -  (GPIO_PIN_CNF_DIR_Output << GPIO_PIN_CNF_DIR_Pos))
   +((GPIO_PIN_CNF_SENSE_Disabled << GPIO_PIN_CNF_SENSE_Pos) | \
   + (GPIO_PIN_CNF_DRIVE_S0D1 << GPIO_PIN_CNF_DRIVE_Pos) | \
   + (GPIO_PIN_CNF_PULL_Pullup << GPIO_PIN_CNF_PULL_Pos) |  \
   + (GPIO_PIN_CNF_INPUT_Connect << GPIO_PIN_CNF_INPUT_Pos) | \
   + (GPIO_PIN_CNF_DIR_Output << GPIO_PIN_CNF_DIR_Pos))
#define NRF91_SDA_PIN_CONF_CLRNRF91_SCL_PIN_CONF_CLR

struct nrf91_hal_i2c {
   ```
   
   
   
    hw/mcu/nordic/nrf91xx/src/hal_qspi.c
   
   
   ```diff
   @@ -162,7 +162,7 @@

 

[GitHub] [mynewt-core] apache-mynewt-bot commented on pull request #2348: Add NRF9160 BSP with I2C, SPI, UART and GPIO support

2020-08-10 Thread GitBox


apache-mynewt-bot commented on pull request #2348:
URL: https://github.com/apache/mynewt-core/pull/2348#issuecomment-671533692


   
   
   
   ## Style check summary
   
   ### Our coding style is 
[here!](https://github.com/apache/mynewt-core/blob/master/CODING_STANDARDS.md)
   
   
    hw/bus/drivers/i2c_nrf91_twim/src/i2c_nrf91_twim.c
   
   
   ```diff
   @@ -40,17 +40,17 @@

#if MYNEWT_VAL(I2C_NRF91_TWIM_STAT)
STATS_SECT_START(twim_stats_section)
   -STATS_SECT_ENTRY(sda_lo_err)/* SDA pulled low on r/w */
   -STATS_SECT_ENTRY(sda_lo_err_nrecov) /* SDA pulled low on r/w (not 
recovered)*/
   -STATS_SECT_ENTRY(scl_hi_err)/* SCL unresponsive */
   -STATS_SECT_ENTRY(scl_hi_err_nrecov) /* SCL unresponsive (not 
recovered)*/
   +STATS_SECT_ENTRY(sda_lo_err)/* SDA pulled low on r/w */
   +STATS_SECT_ENTRY(sda_lo_err_nrecov) /* SDA pulled low on r/w (not 
recovered)*/
   +STATS_SECT_ENTRY(scl_hi_err)/* SCL unresponsive */
   +STATS_SECT_ENTRY(scl_hi_err_nrecov) /* SCL unresponsive (not 
recovered)*/
STATS_SECT_END

STATS_NAME_START(twim_stats_section)
   -STATS_NAME(twim_stats_section, sda_lo_err)
   -STATS_NAME(twim_stats_section, sda_lo_err_nrecov)
   -STATS_NAME(twim_stats_section, scl_hi_err)
   -STATS_NAME(twim_stats_section, scl_hi_err_nrecov)
   +STATS_NAME(twim_stats_section, sda_lo_err)
   +STATS_NAME(twim_stats_section, sda_lo_err_nrecov)
   +STATS_NAME(twim_stats_section, scl_hi_err)
   +STATS_NAME(twim_stats_section, scl_hi_err_nrecov)
STATS_NAME_END(twim_stats_section)
#endif

   @@ -352,7 +352,8 @@
nrf_twim->TASKS_STOP = 1;
nrf_twim->ENABLE = TWIM_ENABLE_ENABLE_Disabled;
nrf_twim->ENABLE = TWIM_ENABLE_ENABLE_Enabled;
   -};
   +}
   +;

#if MYNEWT_VAL(I2C_NRF91_TWIM_STAT)
STATS_INC(dd->stats, scl_hi_err_nrecov);
   ```
   
   
   
    hw/mcu/nordic/nrf91xx/src/hal_flash.c
   
   
   ```diff
   @@ -25,7 +25,7 @@
#include "nrfx_config_nrf9160.h"
#include "nrf_nvmc.h"

   -#define NRF91K_FLASH_SECTOR_SZ  4096
   +#define NRF91K_FLASH_SECTOR_SZ  4096

static int nrf91k_flash_read(const struct hal_flash *dev, uint32_t address,
 void *dst, uint32_t num_bytes);
   @@ -49,8 +49,8 @@
const struct hal_flash nrf91k_flash_dev = {
.hf_itf = &nrf91k_flash_funcs,
.hf_base_addr = 0x,
   -.hf_size = 1024 * 1024, /* XXX read from factory info? */
   -.hf_sector_cnt = 256,   /* XXX read from factory info? */
   +.hf_size = 1024 * 1024, /* XXX read from factory info? */
   +.hf_sector_cnt = 256,   /* XXX read from factory info? */
.hf_align = 1,
.hf_erased_val = 0xff,
};
   ```
   
   
   
    hw/mcu/nordic/nrf91xx/src/hal_gpio.c
   
   
   ```diff
   @@ -116,7 +116,7 @@
port->OUTCLR = HAL_GPIO_MASK(pin);
}
port->PIN_CNF[pin_index] = GPIO_PIN_CNF_DIR_Output |
   -(GPIO_PIN_CNF_INPUT_Disconnect << GPIO_PIN_CNF_INPUT_Pos);
   +   (GPIO_PIN_CNF_INPUT_Disconnect << 
GPIO_PIN_CNF_INPUT_Pos);
port->DIRSET = HAL_GPIO_MASK(pin);

return 0;
   ```
   
   
   
    hw/mcu/nordic/nrf91xx/src/hal_i2c.c
   
   
   ```diff
   @@ -38,18 +38,18 @@

#define NRF91_SCL_PIN_CONF \
((GPIO_PIN_CNF_SENSE_Disabled << GPIO_PIN_CNF_SENSE_Pos) | \
   - (GPIO_PIN_CNF_DRIVE_S0D1<< GPIO_PIN_CNF_DRIVE_Pos) |  \
   - (GPIO_PIN_CNF_PULL_Pullup   << GPIO_PIN_CNF_PULL_Pos) |   \
   + (GPIO_PIN_CNF_DRIVE_S0D1 << GPIO_PIN_CNF_DRIVE_Pos) |  \
   + (GPIO_PIN_CNF_PULL_Pullup << GPIO_PIN_CNF_PULL_Pos) |   \
 (GPIO_PIN_CNF_INPUT_Connect << GPIO_PIN_CNF_INPUT_Pos) |  \
   - (GPIO_PIN_CNF_DIR_Input << GPIO_PIN_CNF_DIR_Pos))
   + (GPIO_PIN_CNF_DIR_Input << GPIO_PIN_CNF_DIR_Pos))
#define NRF91_SDA_PIN_CONF NRF91_SCL_PIN_CONF

#define NRF91_SCL_PIN_CONF_CLR  \
   - ((GPIO_PIN_CNF_SENSE_Disabled << GPIO_PIN_CNF_SENSE_Pos) | \
   -  (GPIO_PIN_CNF_DRIVE_S0D1 << GPIO_PIN_CNF_DRIVE_Pos) | \
   -  (GPIO_PIN_CNF_PULL_Pullup<< GPIO_PIN_CNF_PULL_Pos) |  \
   -  (GPIO_PIN_CNF_INPUT_Connect  << GPIO_PIN_CNF_INPUT_Pos) | \
   -  (GPIO_PIN_CNF_DIR_Output << GPIO_PIN_CNF_DIR_Pos))
   +((GPIO_PIN_CNF_SENSE_Disabled << GPIO_PIN_CNF_SENSE_Pos) | \
   + (GPIO_PIN_CNF_DRIVE_S0D1 << GPIO_PIN_CNF_DRIVE_Pos) | \
   + (GPIO_PIN_CNF_PULL_Pullup << GPIO_PIN_CNF_PULL_Pos) |  \
   + (GPIO_PIN_CNF_INPUT_Connect << GPIO_PIN_CNF_INPUT_Pos) | \
   + (GPIO_PIN_CNF_DIR_Output << GPIO_PIN_CNF_DIR_Pos))
#define NRF91_SDA_PIN_CONF_CLRNRF91_SCL_PIN_CONF_CLR

struct nrf91_hal_i2c {
   ```
   
   
   
    hw/mcu/nordic/nrf91xx/src/hal_qspi.c
   
   
   ```diff
   @@ -162,7 +162,7 @@

while

[GitHub] [mynewt-core] apache-mynewt-bot removed a comment on pull request #2348: Add NRF9160 BSP with I2C, SPI, UART and GPIO support

2020-08-10 Thread GitBox


apache-mynewt-bot removed a comment on pull request #2348:
URL: https://github.com/apache/mynewt-core/pull/2348#issuecomment-671528563


   
   
   
   ## Style check summary
   
   ### Our coding style is 
[here!](https://github.com/apache/mynewt-core/blob/master/CODING_STANDARDS.md)
   
   
    hw/bus/drivers/i2c_nrf91_twim/src/i2c_nrf91_twim.c
   
   
   ```diff
   @@ -40,17 +40,17 @@

#if MYNEWT_VAL(I2C_NRF91_TWIM_STAT)
STATS_SECT_START(twim_stats_section)
   -STATS_SECT_ENTRY(sda_lo_err)/* SDA pulled low on r/w */
   -STATS_SECT_ENTRY(sda_lo_err_nrecov) /* SDA pulled low on r/w (not 
recovered)*/
   -STATS_SECT_ENTRY(scl_hi_err)/* SCL unresponsive */
   -STATS_SECT_ENTRY(scl_hi_err_nrecov) /* SCL unresponsive (not 
recovered)*/
   +STATS_SECT_ENTRY(sda_lo_err)/* SDA pulled low on r/w */
   +STATS_SECT_ENTRY(sda_lo_err_nrecov) /* SDA pulled low on r/w (not 
recovered)*/
   +STATS_SECT_ENTRY(scl_hi_err)/* SCL unresponsive */
   +STATS_SECT_ENTRY(scl_hi_err_nrecov) /* SCL unresponsive (not 
recovered)*/
STATS_SECT_END

STATS_NAME_START(twim_stats_section)
   -STATS_NAME(twim_stats_section, sda_lo_err)
   -STATS_NAME(twim_stats_section, sda_lo_err_nrecov)
   -STATS_NAME(twim_stats_section, scl_hi_err)
   -STATS_NAME(twim_stats_section, scl_hi_err_nrecov)
   +STATS_NAME(twim_stats_section, sda_lo_err)
   +STATS_NAME(twim_stats_section, sda_lo_err_nrecov)
   +STATS_NAME(twim_stats_section, scl_hi_err)
   +STATS_NAME(twim_stats_section, scl_hi_err_nrecov)
STATS_NAME_END(twim_stats_section)
#endif

   @@ -352,7 +352,8 @@
nrf_twim->TASKS_STOP = 1;
nrf_twim->ENABLE = TWIM_ENABLE_ENABLE_Disabled;
nrf_twim->ENABLE = TWIM_ENABLE_ENABLE_Enabled;
   -};
   +}
   +;

#if MYNEWT_VAL(I2C_NRF91_TWIM_STAT)
STATS_INC(dd->stats, scl_hi_err_nrecov);
   ```
   
   
   
    hw/mcu/nordic/nrf91xx/src/hal_flash.c
   
   
   ```diff
   @@ -25,7 +25,7 @@
#include "nrfx_config_nrf9160.h"
#include "nrf_nvmc.h"

   -#define NRF91K_FLASH_SECTOR_SZ  4096
   +#define NRF91K_FLASH_SECTOR_SZ  4096

static int nrf91k_flash_read(const struct hal_flash *dev, uint32_t address,
 void *dst, uint32_t num_bytes);
   @@ -49,8 +49,8 @@
const struct hal_flash nrf91k_flash_dev = {
.hf_itf = &nrf91k_flash_funcs,
.hf_base_addr = 0x,
   -.hf_size = 1024 * 1024, /* XXX read from factory info? */
   -.hf_sector_cnt = 256,   /* XXX read from factory info? */
   +.hf_size = 1024 * 1024, /* XXX read from factory info? */
   +.hf_sector_cnt = 256,   /* XXX read from factory info? */
.hf_align = 1,
.hf_erased_val = 0xff,
};
   ```
   
   
   
    hw/mcu/nordic/nrf91xx/src/hal_gpio.c
   
   
   ```diff
   @@ -116,7 +116,7 @@
port->OUTCLR = HAL_GPIO_MASK(pin);
}
port->PIN_CNF[pin_index] = GPIO_PIN_CNF_DIR_Output |
   -(GPIO_PIN_CNF_INPUT_Disconnect << GPIO_PIN_CNF_INPUT_Pos);
   +   (GPIO_PIN_CNF_INPUT_Disconnect << 
GPIO_PIN_CNF_INPUT_Pos);
port->DIRSET = HAL_GPIO_MASK(pin);

return 0;
   ```
   
   
   
    hw/mcu/nordic/nrf91xx/src/hal_i2c.c
   
   
   ```diff
   @@ -38,18 +38,18 @@

#define NRF91_SCL_PIN_CONF \
((GPIO_PIN_CNF_SENSE_Disabled << GPIO_PIN_CNF_SENSE_Pos) | \
   - (GPIO_PIN_CNF_DRIVE_S0D1<< GPIO_PIN_CNF_DRIVE_Pos) |  \
   - (GPIO_PIN_CNF_PULL_Pullup   << GPIO_PIN_CNF_PULL_Pos) |   \
   + (GPIO_PIN_CNF_DRIVE_S0D1 << GPIO_PIN_CNF_DRIVE_Pos) |  \
   + (GPIO_PIN_CNF_PULL_Pullup << GPIO_PIN_CNF_PULL_Pos) |   \
 (GPIO_PIN_CNF_INPUT_Connect << GPIO_PIN_CNF_INPUT_Pos) |  \
   - (GPIO_PIN_CNF_DIR_Input << GPIO_PIN_CNF_DIR_Pos))
   + (GPIO_PIN_CNF_DIR_Input << GPIO_PIN_CNF_DIR_Pos))
#define NRF91_SDA_PIN_CONF NRF91_SCL_PIN_CONF

#define NRF91_SCL_PIN_CONF_CLR  \
   - ((GPIO_PIN_CNF_SENSE_Disabled << GPIO_PIN_CNF_SENSE_Pos) | \
   -  (GPIO_PIN_CNF_DRIVE_S0D1 << GPIO_PIN_CNF_DRIVE_Pos) | \
   -  (GPIO_PIN_CNF_PULL_Pullup<< GPIO_PIN_CNF_PULL_Pos) |  \
   -  (GPIO_PIN_CNF_INPUT_Connect  << GPIO_PIN_CNF_INPUT_Pos) | \
   -  (GPIO_PIN_CNF_DIR_Output << GPIO_PIN_CNF_DIR_Pos))
   +((GPIO_PIN_CNF_SENSE_Disabled << GPIO_PIN_CNF_SENSE_Pos) | \
   + (GPIO_PIN_CNF_DRIVE_S0D1 << GPIO_PIN_CNF_DRIVE_Pos) | \
   + (GPIO_PIN_CNF_PULL_Pullup << GPIO_PIN_CNF_PULL_Pos) |  \
   + (GPIO_PIN_CNF_INPUT_Connect << GPIO_PIN_CNF_INPUT_Pos) | \
   + (GPIO_PIN_CNF_DIR_Output << GPIO_PIN_CNF_DIR_Pos))
#define NRF91_SDA_PIN_CONF_CLRNRF91_SCL_PIN_CONF_CLR

struct nrf91_hal_i2c {
   ```
   
   
   
    hw/mcu/nordic/nrf91xx/src/hal_qspi.c
   
   
   ```diff
   @@ -162,7 +162,7 @@

 

[GitHub] [mynewt-core] apache-mynewt-bot removed a comment on pull request #2348: Add NRF9160 BSP with I2C, SPI, UART and GPIO support

2020-08-10 Thread GitBox


apache-mynewt-bot removed a comment on pull request #2348:
URL: https://github.com/apache/mynewt-core/pull/2348#issuecomment-670794368


   
   
   
   ## RAT Report (2020-08-08 00:24:24)
   
   ## New files with unknown licenses
   
   * https://github.com/apache/mynewt-core/blob/dc40231c4894a0ccf639ed8be09a86c91c41421f/hw/bsp/nordic_pca10090/approtect_detect";>hw/bsp/nordic_pca10090/approtect_detect
   * https://github.com/apache/mynewt-core/blob/dc40231c4894a0ccf639ed8be09a86c91c41421f/hw/bsp/nordic_pca10090/boot-nrf91xxaa.ld";>hw/bsp/nordic_pca10090/boot-nrf91xxaa.ld
   * https://github.com/apache/mynewt-core/blob/dc40231c4894a0ccf639ed8be09a86c91c41421f/hw/bsp/nordic_pca10090/nordic_pca10090_no_boot.ld";>hw/bsp/nordic_pca10090/nordic_pca10090_no_boot.ld
   * https://github.com/apache/mynewt-core/blob/dc40231c4894a0ccf639ed8be09a86c91c41421f/hw/bsp/nordic_pca10090/nrf91xxaa.ld";>hw/bsp/nordic_pca10090/nrf91xxaa.ld
   * https://github.com/apache/mynewt-core/blob/dc40231c4894a0ccf639ed8be09a86c91c41421f/hw/bsp/nordic_pca10090/split-nordic_pca10090.ld";>hw/bsp/nordic_pca10090/split-nordic_pca10090.ld
   * https://github.com/apache/mynewt-core/blob/dc40231c4894a0ccf639ed8be09a86c91c41421f/hw/bsp/nordic_pca10090/targetpoweron";>hw/bsp/nordic_pca10090/targetpoweron
   * https://github.com/apache/mynewt-core/blob/dc40231c4894a0ccf639ed8be09a86c91c41421f/hw/bsp/nordic_pca10090/src/arch/cortex_m33/gcc_startup_nrf9160.s";>hw/bsp/nordic_pca10090/src/arch/cortex_m33/gcc_startup_nrf9160.s
   * https://github.com/apache/mynewt-core/blob/dc40231c4894a0ccf639ed8be09a86c91c41421f/hw/bsp/nordic_pca10090/src/arch/cortex_m33/gcc_startup_nrf9160_split.s";>hw/bsp/nordic_pca10090/src/arch/cortex_m33/gcc_startup_nrf9160_split.s
   * https://github.com/apache/mynewt-core/blob/dc40231c4894a0ccf639ed8be09a86c91c41421f/hw/mcu/nordic/nrf91xxx/nrf91.ld";>hw/mcu/nordic/nrf91xxx/nrf91.ld
   * https://github.com/apache/mynewt-core/blob/dc40231c4894a0ccf639ed8be09a86c91c41421f/hw/mcu/nordic/nrf91xxx/nrf91_ram_resident.ld";>hw/mcu/nordic/nrf91xxx/nrf91_ram_resident.ld
   * https://github.com/apache/mynewt-core/blob/dc40231c4894a0ccf639ed8be09a86c91c41421f/hw/mcu/nordic/nrf91xxx/src/system_nrf9160.c";>hw/mcu/nordic/nrf91xxx/src/system_nrf9160.c
   
   ## 53 new files were excluded from check (.rat-excludes)
   
   
 Detailed analysis
   
   ## New files in this PR
   
   | License | File |
   |-|--|
   | ?  | https://github.com/apache/mynewt-core/blob/dc40231c4894a0ccf639ed8be09a86c91c41421f/hw/bsp/nordic_pca10090/approtect_detect";>hw/bsp/nordic_pca10090/approtect_detect
 |
   | ?  | https://github.com/apache/mynewt-core/blob/dc40231c4894a0ccf639ed8be09a86c91c41421f/hw/bsp/nordic_pca10090/boot-nrf91xxaa.ld";>hw/bsp/nordic_pca10090/boot-nrf91xxaa.ld
 |
   | AL | https://github.com/apache/mynewt-core/blob/dc40231c4894a0ccf639ed8be09a86c91c41421f/hw/bsp/nordic_pca10090/bsp.yml";>hw/bsp/nordic_pca10090/bsp.yml
 |
   | AL | https://github.com/apache/mynewt-core/blob/dc40231c4894a0ccf639ed8be09a86c91c41421f/hw/bsp/nordic_pca10090/nordic_pca10090_debug.cmd";>hw/bsp/nordic_pca10090/nordic_pca10090_debug.cmd
 |
   | AL | https://github.com/apache/mynewt-core/blob/dc40231c4894a0ccf639ed8be09a86c91c41421f/hw/bsp/nordic_pca10090/nordic_pca10090_debug.sh";>hw/bsp/nordic_pca10090/nordic_pca10090_debug.sh
 |
   | AL | https://github.com/apache/mynewt-core/blob/dc40231c4894a0ccf639ed8be09a86c91c41421f/hw/bsp/nordic_pca10090/nordic_pca10090_download.cmd";>hw/bsp/nordic_pca10090/nordic_pca10090_download.cmd
 |
   | AL | https://github.com/apache/mynewt-core/blob/dc40231c4894a0ccf639ed8be09a86c91c41421f/hw/bsp/nordic_pca10090/nordic_pca10090_download.sh";>hw/bsp/nordic_pca10090/nordic_pca10090_download.sh
 |
   | ?  | https://github.com/apache/mynewt-core/blob/dc40231c4894a0ccf639ed8be09a86c91c41421f/hw/bsp/nordic_pca10090/nordic_pca10090_no_boot.ld";>hw/bsp/nordic_pca10090/nordic_pca10090_no_boot.ld
 |
   | AL | https://github.com/apache/mynewt-core/blob/dc40231c4894a0ccf639ed8be09a86c91c41421f/hw/bsp/nordic_pca10090/nrf9160dk_common.sh";>hw/bsp/nordic_pca10090/nrf9160dk_common.sh
 |
   | ?  | https://github.com/apache/mynewt-core/blob/dc40231c4894a0ccf639ed8be09a86c91c41421f/hw/bsp/nordic_pca10090/nrf91xxaa.ld";>hw/bsp/nordic_pca10090/nrf91xxaa.ld
 |
   | AL | https://github.com/apache/mynewt-core/blob/dc40231c4894a0ccf639ed8be09a86c91c41421f/hw/bsp/nordic_pca10090/pkg.yml";>hw/bsp/nordic_pca10090/pkg.yml
 |
   | ?  | https://github.com/apache/mynewt-core/blob/dc40231c4894a0ccf639ed8be09a86c91c41421f/hw/bsp/nordic_pca10090/split-nordic_pca10090.ld";>hw/bsp/nordic_pca10090/split-nordic_pca10090.ld
 |
   | AL | https://github.com/apache/mynewt-core/blob/dc40231c4894a0ccf639ed8be09a86c91c41421f/hw/bsp/nordic_pca10090/syscfg.yml";>hw/bsp/nordic_pca10090/syscfg.yml
 |
   | ?  | https://github.com/apache/mynewt-core/blob/dc40231c4894a0ccf639ed8be09a86c91c41421f/hw/bsp/nordic_pca10090/ta

[GitHub] [mynewt-core] apache-mynewt-bot commented on pull request #2348: Add NRF9160 BSP with I2C, SPI, UART and GPIO support

2020-08-10 Thread GitBox


apache-mynewt-bot commented on pull request #2348:
URL: https://github.com/apache/mynewt-core/pull/2348#issuecomment-671533318


   
   
   
   ## RAT Report (2020-08-10 19:04:49)
   
   ## New files with unknown licenses
   
   * https://github.com/apache/mynewt-core/blob/dc40231c4894a0ccf639ed8be09a86c91c41421f/hw/bsp/nordic_pca10090/src/arch/cortex_m33/gcc_startup_nrf9160_split.s";>hw/bsp/nordic_pca10090/src/arch/cortex_m33/gcc_startup_nrf9160_split.s
   
   ## 53 new files were excluded from check (.rat-excludes)
   
   
 Detailed analysis
   
   ## New files in this PR
   
   | License | File |
   |-|--|
   | AL | https://github.com/apache/mynewt-core/blob/dc40231c4894a0ccf639ed8be09a86c91c41421f/hw/bsp/nordic_pca10090/approtect_detect";>hw/bsp/nordic_pca10090/approtect_detect
 |
   | AL | https://github.com/apache/mynewt-core/blob/dc40231c4894a0ccf639ed8be09a86c91c41421f/hw/bsp/nordic_pca10090/bsp.yml";>hw/bsp/nordic_pca10090/bsp.yml
 |
   | AL | https://github.com/apache/mynewt-core/blob/dc40231c4894a0ccf639ed8be09a86c91c41421f/hw/bsp/nordic_pca10090/nordic_pca10090_debug.cmd";>hw/bsp/nordic_pca10090/nordic_pca10090_debug.cmd
 |
   | AL | https://github.com/apache/mynewt-core/blob/dc40231c4894a0ccf639ed8be09a86c91c41421f/hw/bsp/nordic_pca10090/nordic_pca10090_debug.sh";>hw/bsp/nordic_pca10090/nordic_pca10090_debug.sh
 |
   | AL | https://github.com/apache/mynewt-core/blob/dc40231c4894a0ccf639ed8be09a86c91c41421f/hw/bsp/nordic_pca10090/nordic_pca10090_download.cmd";>hw/bsp/nordic_pca10090/nordic_pca10090_download.cmd
 |
   | AL | https://github.com/apache/mynewt-core/blob/dc40231c4894a0ccf639ed8be09a86c91c41421f/hw/bsp/nordic_pca10090/nordic_pca10090_download.sh";>hw/bsp/nordic_pca10090/nordic_pca10090_download.sh
 |
   | AL | https://github.com/apache/mynewt-core/blob/dc40231c4894a0ccf639ed8be09a86c91c41421f/hw/bsp/nordic_pca10090/nrf9160dk_common.sh";>hw/bsp/nordic_pca10090/nrf9160dk_common.sh
 |
   | AL | https://github.com/apache/mynewt-core/blob/dc40231c4894a0ccf639ed8be09a86c91c41421f/hw/bsp/nordic_pca10090/pkg.yml";>hw/bsp/nordic_pca10090/pkg.yml
 |
   | AL | https://github.com/apache/mynewt-core/blob/dc40231c4894a0ccf639ed8be09a86c91c41421f/hw/bsp/nordic_pca10090/syscfg.yml";>hw/bsp/nordic_pca10090/syscfg.yml
 |
   | AL | https://github.com/apache/mynewt-core/blob/dc40231c4894a0ccf639ed8be09a86c91c41421f/hw/bsp/nordic_pca10090/targetpoweron";>hw/bsp/nordic_pca10090/targetpoweron
 |
   | AL | https://github.com/apache/mynewt-core/blob/dc40231c4894a0ccf639ed8be09a86c91c41421f/hw/bsp/nordic_pca10090/include/bsp/bsp.h";>hw/bsp/nordic_pca10090/include/bsp/bsp.h
 |
   | AL | https://github.com/apache/mynewt-core/blob/dc40231c4894a0ccf639ed8be09a86c91c41421f/hw/bsp/nordic_pca10090/src/hal_bsp.c";>hw/bsp/nordic_pca10090/src/hal_bsp.c
 |
   | AL | https://github.com/apache/mynewt-core/blob/dc40231c4894a0ccf639ed8be09a86c91c41421f/hw/bsp/nordic_pca10090/src/sbrk.c";>hw/bsp/nordic_pca10090/src/sbrk.c
 |
   | ?  | https://github.com/apache/mynewt-core/blob/dc40231c4894a0ccf639ed8be09a86c91c41421f/hw/bsp/nordic_pca10090/src/arch/cortex_m33/gcc_startup_nrf9160_split.s";>hw/bsp/nordic_pca10090/src/arch/cortex_m33/gcc_startup_nrf9160_split.s
 |
   | AL | https://github.com/apache/mynewt-core/blob/dc40231c4894a0ccf639ed8be09a86c91c41421f/hw/bus/drivers/i2c_nrf91_twim/pkg.yml";>hw/bus/drivers/i2c_nrf91_twim/pkg.yml
 |
   | AL | https://github.com/apache/mynewt-core/blob/dc40231c4894a0ccf639ed8be09a86c91c41421f/hw/bus/drivers/i2c_nrf91_twim/syscfg.yml";>hw/bus/drivers/i2c_nrf91_twim/syscfg.yml
 |
   | AL | https://github.com/apache/mynewt-core/blob/dc40231c4894a0ccf639ed8be09a86c91c41421f/hw/bus/drivers/i2c_nrf91_twim/include/bus/drivers/i2c_nrf91_twim.h";>hw/bus/drivers/i2c_nrf91_twim/include/bus/drivers/i2c_nrf91_twim.h
 |
   | AL | https://github.com/apache/mynewt-core/blob/dc40231c4894a0ccf639ed8be09a86c91c41421f/hw/bus/drivers/i2c_nrf91_twim/src/i2c_nrf91_twim.c";>hw/bus/drivers/i2c_nrf91_twim/src/i2c_nrf91_twim.c
 |
   
   
   



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [mynewt-core] apache-mynewt-bot removed a comment on pull request #2348: Add NRF9160 BSP with I2C, SPI, UART and GPIO support

2020-08-10 Thread GitBox


apache-mynewt-bot removed a comment on pull request #2348:
URL: https://github.com/apache/mynewt-core/pull/2348#issuecomment-670961274


   
   
   
   ## Style check summary
   
   ### Our coding style is 
[here!](https://github.com/apache/mynewt-core/blob/master/CODING_STANDARDS.md)
   
   
    hw/bus/drivers/i2c_nrf91_twim/src/i2c_nrf91_twim.c
   
   
   ```diff
   @@ -40,17 +40,17 @@

#if MYNEWT_VAL(I2C_NRF91_TWIM_STAT)
STATS_SECT_START(twim_stats_section)
   -STATS_SECT_ENTRY(sda_lo_err)/* SDA pulled low on r/w */
   -STATS_SECT_ENTRY(sda_lo_err_nrecov) /* SDA pulled low on r/w (not 
recovered)*/
   -STATS_SECT_ENTRY(scl_hi_err)/* SCL unresponsive */
   -STATS_SECT_ENTRY(scl_hi_err_nrecov) /* SCL unresponsive (not 
recovered)*/
   +STATS_SECT_ENTRY(sda_lo_err)/* SDA pulled low on r/w */
   +STATS_SECT_ENTRY(sda_lo_err_nrecov) /* SDA pulled low on r/w (not 
recovered)*/
   +STATS_SECT_ENTRY(scl_hi_err)/* SCL unresponsive */
   +STATS_SECT_ENTRY(scl_hi_err_nrecov) /* SCL unresponsive (not 
recovered)*/
STATS_SECT_END

STATS_NAME_START(twim_stats_section)
   -STATS_NAME(twim_stats_section, sda_lo_err)
   -STATS_NAME(twim_stats_section, sda_lo_err_nrecov)
   -STATS_NAME(twim_stats_section, scl_hi_err)
   -STATS_NAME(twim_stats_section, scl_hi_err_nrecov)
   +STATS_NAME(twim_stats_section, sda_lo_err)
   +STATS_NAME(twim_stats_section, sda_lo_err_nrecov)
   +STATS_NAME(twim_stats_section, scl_hi_err)
   +STATS_NAME(twim_stats_section, scl_hi_err_nrecov)
STATS_NAME_END(twim_stats_section)
#endif

   @@ -352,7 +352,8 @@
nrf_twim->TASKS_STOP = 1;
nrf_twim->ENABLE = TWIM_ENABLE_ENABLE_Disabled;
nrf_twim->ENABLE = TWIM_ENABLE_ENABLE_Enabled;
   -};
   +}
   +;

#if MYNEWT_VAL(I2C_NRF91_TWIM_STAT)
STATS_INC(dd->stats, scl_hi_err_nrecov);
   ```
   
   
   
    hw/mcu/nordic/nrf91xx/src/hal_flash.c
   
   
   ```diff
   @@ -25,7 +25,7 @@
#include "nrfx_config_nrf9160.h"
#include "nrf_nvmc.h"

   -#define NRF91K_FLASH_SECTOR_SZ  4096
   +#define NRF91K_FLASH_SECTOR_SZ  4096

static int nrf91k_flash_read(const struct hal_flash *dev, uint32_t address,
 void *dst, uint32_t num_bytes);
   @@ -49,8 +49,8 @@
const struct hal_flash nrf91k_flash_dev = {
.hf_itf = &nrf91k_flash_funcs,
.hf_base_addr = 0x,
   -.hf_size = 1024 * 1024, /* XXX read from factory info? */
   -.hf_sector_cnt = 256,   /* XXX read from factory info? */
   +.hf_size = 1024 * 1024, /* XXX read from factory info? */
   +.hf_sector_cnt = 256,   /* XXX read from factory info? */
.hf_align = 1,
.hf_erased_val = 0xff,
};
   ```
   
   
   
    hw/mcu/nordic/nrf91xx/src/hal_gpio.c
   
   
   ```diff
   @@ -116,7 +116,7 @@
port->OUTCLR = HAL_GPIO_MASK(pin);
}
port->PIN_CNF[pin_index] = GPIO_PIN_CNF_DIR_Output |
   -(GPIO_PIN_CNF_INPUT_Disconnect << GPIO_PIN_CNF_INPUT_Pos);
   +   (GPIO_PIN_CNF_INPUT_Disconnect << 
GPIO_PIN_CNF_INPUT_Pos);
port->DIRSET = HAL_GPIO_MASK(pin);

return 0;
   ```
   
   
   
    hw/mcu/nordic/nrf91xx/src/hal_i2c.c
   
   
   ```diff
   @@ -38,18 +38,18 @@

#define NRF91_SCL_PIN_CONF \
((GPIO_PIN_CNF_SENSE_Disabled << GPIO_PIN_CNF_SENSE_Pos) | \
   - (GPIO_PIN_CNF_DRIVE_S0D1<< GPIO_PIN_CNF_DRIVE_Pos) |  \
   - (GPIO_PIN_CNF_PULL_Pullup   << GPIO_PIN_CNF_PULL_Pos) |   \
   + (GPIO_PIN_CNF_DRIVE_S0D1 << GPIO_PIN_CNF_DRIVE_Pos) |  \
   + (GPIO_PIN_CNF_PULL_Pullup << GPIO_PIN_CNF_PULL_Pos) |   \
 (GPIO_PIN_CNF_INPUT_Connect << GPIO_PIN_CNF_INPUT_Pos) |  \
   - (GPIO_PIN_CNF_DIR_Input << GPIO_PIN_CNF_DIR_Pos))
   + (GPIO_PIN_CNF_DIR_Input << GPIO_PIN_CNF_DIR_Pos))
#define NRF91_SDA_PIN_CONF NRF91_SCL_PIN_CONF

#define NRF91_SCL_PIN_CONF_CLR  \
   - ((GPIO_PIN_CNF_SENSE_Disabled << GPIO_PIN_CNF_SENSE_Pos) | \
   -  (GPIO_PIN_CNF_DRIVE_S0D1 << GPIO_PIN_CNF_DRIVE_Pos) | \
   -  (GPIO_PIN_CNF_PULL_Pullup<< GPIO_PIN_CNF_PULL_Pos) |  \
   -  (GPIO_PIN_CNF_INPUT_Connect  << GPIO_PIN_CNF_INPUT_Pos) | \
   -  (GPIO_PIN_CNF_DIR_Output << GPIO_PIN_CNF_DIR_Pos))
   +((GPIO_PIN_CNF_SENSE_Disabled << GPIO_PIN_CNF_SENSE_Pos) | \
   + (GPIO_PIN_CNF_DRIVE_S0D1 << GPIO_PIN_CNF_DRIVE_Pos) | \
   + (GPIO_PIN_CNF_PULL_Pullup << GPIO_PIN_CNF_PULL_Pos) |  \
   + (GPIO_PIN_CNF_INPUT_Connect << GPIO_PIN_CNF_INPUT_Pos) | \
   + (GPIO_PIN_CNF_DIR_Output << GPIO_PIN_CNF_DIR_Pos))
#define NRF91_SDA_PIN_CONF_CLRNRF91_SCL_PIN_CONF_CLR

struct nrf91_hal_i2c {
   ```
   
   
   
    hw/mcu/nordic/nrf91xx/src/hal_qspi.c
   
   
   ```diff
   @@ -162,7 +162,7 @@

 

[GitHub] [mynewt-core] apache-mynewt-bot commented on pull request #2348: Add NRF9160 BSP with I2C, SPI, UART and GPIO support

2020-08-10 Thread GitBox


apache-mynewt-bot commented on pull request #2348:
URL: https://github.com/apache/mynewt-core/pull/2348#issuecomment-671528563


   
   
   
   ## Style check summary
   
   ### Our coding style is 
[here!](https://github.com/apache/mynewt-core/blob/master/CODING_STANDARDS.md)
   
   
    hw/bus/drivers/i2c_nrf91_twim/src/i2c_nrf91_twim.c
   
   
   ```diff
   @@ -40,17 +40,17 @@

#if MYNEWT_VAL(I2C_NRF91_TWIM_STAT)
STATS_SECT_START(twim_stats_section)
   -STATS_SECT_ENTRY(sda_lo_err)/* SDA pulled low on r/w */
   -STATS_SECT_ENTRY(sda_lo_err_nrecov) /* SDA pulled low on r/w (not 
recovered)*/
   -STATS_SECT_ENTRY(scl_hi_err)/* SCL unresponsive */
   -STATS_SECT_ENTRY(scl_hi_err_nrecov) /* SCL unresponsive (not 
recovered)*/
   +STATS_SECT_ENTRY(sda_lo_err)/* SDA pulled low on r/w */
   +STATS_SECT_ENTRY(sda_lo_err_nrecov) /* SDA pulled low on r/w (not 
recovered)*/
   +STATS_SECT_ENTRY(scl_hi_err)/* SCL unresponsive */
   +STATS_SECT_ENTRY(scl_hi_err_nrecov) /* SCL unresponsive (not 
recovered)*/
STATS_SECT_END

STATS_NAME_START(twim_stats_section)
   -STATS_NAME(twim_stats_section, sda_lo_err)
   -STATS_NAME(twim_stats_section, sda_lo_err_nrecov)
   -STATS_NAME(twim_stats_section, scl_hi_err)
   -STATS_NAME(twim_stats_section, scl_hi_err_nrecov)
   +STATS_NAME(twim_stats_section, sda_lo_err)
   +STATS_NAME(twim_stats_section, sda_lo_err_nrecov)
   +STATS_NAME(twim_stats_section, scl_hi_err)
   +STATS_NAME(twim_stats_section, scl_hi_err_nrecov)
STATS_NAME_END(twim_stats_section)
#endif

   @@ -352,7 +352,8 @@
nrf_twim->TASKS_STOP = 1;
nrf_twim->ENABLE = TWIM_ENABLE_ENABLE_Disabled;
nrf_twim->ENABLE = TWIM_ENABLE_ENABLE_Enabled;
   -};
   +}
   +;

#if MYNEWT_VAL(I2C_NRF91_TWIM_STAT)
STATS_INC(dd->stats, scl_hi_err_nrecov);
   ```
   
   
   
    hw/mcu/nordic/nrf91xx/src/hal_flash.c
   
   
   ```diff
   @@ -25,7 +25,7 @@
#include "nrfx_config_nrf9160.h"
#include "nrf_nvmc.h"

   -#define NRF91K_FLASH_SECTOR_SZ  4096
   +#define NRF91K_FLASH_SECTOR_SZ  4096

static int nrf91k_flash_read(const struct hal_flash *dev, uint32_t address,
 void *dst, uint32_t num_bytes);
   @@ -49,8 +49,8 @@
const struct hal_flash nrf91k_flash_dev = {
.hf_itf = &nrf91k_flash_funcs,
.hf_base_addr = 0x,
   -.hf_size = 1024 * 1024, /* XXX read from factory info? */
   -.hf_sector_cnt = 256,   /* XXX read from factory info? */
   +.hf_size = 1024 * 1024, /* XXX read from factory info? */
   +.hf_sector_cnt = 256,   /* XXX read from factory info? */
.hf_align = 1,
.hf_erased_val = 0xff,
};
   ```
   
   
   
    hw/mcu/nordic/nrf91xx/src/hal_gpio.c
   
   
   ```diff
   @@ -116,7 +116,7 @@
port->OUTCLR = HAL_GPIO_MASK(pin);
}
port->PIN_CNF[pin_index] = GPIO_PIN_CNF_DIR_Output |
   -(GPIO_PIN_CNF_INPUT_Disconnect << GPIO_PIN_CNF_INPUT_Pos);
   +   (GPIO_PIN_CNF_INPUT_Disconnect << 
GPIO_PIN_CNF_INPUT_Pos);
port->DIRSET = HAL_GPIO_MASK(pin);

return 0;
   ```
   
   
   
    hw/mcu/nordic/nrf91xx/src/hal_i2c.c
   
   
   ```diff
   @@ -38,18 +38,18 @@

#define NRF91_SCL_PIN_CONF \
((GPIO_PIN_CNF_SENSE_Disabled << GPIO_PIN_CNF_SENSE_Pos) | \
   - (GPIO_PIN_CNF_DRIVE_S0D1<< GPIO_PIN_CNF_DRIVE_Pos) |  \
   - (GPIO_PIN_CNF_PULL_Pullup   << GPIO_PIN_CNF_PULL_Pos) |   \
   + (GPIO_PIN_CNF_DRIVE_S0D1 << GPIO_PIN_CNF_DRIVE_Pos) |  \
   + (GPIO_PIN_CNF_PULL_Pullup << GPIO_PIN_CNF_PULL_Pos) |   \
 (GPIO_PIN_CNF_INPUT_Connect << GPIO_PIN_CNF_INPUT_Pos) |  \
   - (GPIO_PIN_CNF_DIR_Input << GPIO_PIN_CNF_DIR_Pos))
   + (GPIO_PIN_CNF_DIR_Input << GPIO_PIN_CNF_DIR_Pos))
#define NRF91_SDA_PIN_CONF NRF91_SCL_PIN_CONF

#define NRF91_SCL_PIN_CONF_CLR  \
   - ((GPIO_PIN_CNF_SENSE_Disabled << GPIO_PIN_CNF_SENSE_Pos) | \
   -  (GPIO_PIN_CNF_DRIVE_S0D1 << GPIO_PIN_CNF_DRIVE_Pos) | \
   -  (GPIO_PIN_CNF_PULL_Pullup<< GPIO_PIN_CNF_PULL_Pos) |  \
   -  (GPIO_PIN_CNF_INPUT_Connect  << GPIO_PIN_CNF_INPUT_Pos) | \
   -  (GPIO_PIN_CNF_DIR_Output << GPIO_PIN_CNF_DIR_Pos))
   +((GPIO_PIN_CNF_SENSE_Disabled << GPIO_PIN_CNF_SENSE_Pos) | \
   + (GPIO_PIN_CNF_DRIVE_S0D1 << GPIO_PIN_CNF_DRIVE_Pos) | \
   + (GPIO_PIN_CNF_PULL_Pullup << GPIO_PIN_CNF_PULL_Pos) |  \
   + (GPIO_PIN_CNF_INPUT_Connect << GPIO_PIN_CNF_INPUT_Pos) | \
   + (GPIO_PIN_CNF_DIR_Output << GPIO_PIN_CNF_DIR_Pos))
#define NRF91_SDA_PIN_CONF_CLRNRF91_SCL_PIN_CONF_CLR

struct nrf91_hal_i2c {
   ```
   
   
   
    hw/mcu/nordic/nrf91xx/src/hal_qspi.c
   
   
   ```diff
   @@ -162,7 +162,7 @@

while

[mynewt-core] branch master updated: docs: Add page for build-time hooks

2020-08-10 Thread ccollins
This is an automated email from the ASF dual-hosted git repository.

ccollins pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-core.git


The following commit(s) were added to refs/heads/master by this push:
 new faeadf3  docs: Add page for build-time hooks
faeadf3 is described below

commit faeadf339e04281ec26f72fcb95a9e5fa9c82a11
Author: Christopher Collins 
AuthorDate: Fri Aug 7 12:44:09 2020 -0700

docs: Add page for build-time hooks
---
 docs/os/modules/extcmd/extcmd.rst | 139 ++
 docs/os/os_user_guide.rst |   1 +
 2 files changed, 140 insertions(+)

diff --git a/docs/os/modules/extcmd/extcmd.rst 
b/docs/os/modules/extcmd/extcmd.rst
new file mode 100644
index 000..3ee98bf
--- /dev/null
+++ b/docs/os/modules/extcmd/extcmd.rst
@@ -0,0 +1,139 @@
+Build-Time Hooks
+
+
+A package specifies custom commands in its ``pkg.yml`` file.  There are
+three types of commands:
+
+1. pre_build_cmds (run before the build)
+2. pre_link_cmds (run after compilation, before linking)
+3. post_build_cmds (run after the build)
+
+Example
+~~~
+
+Example (apps/blinky/pkg.yml):
+
+.. code-block:: yaml
+
+pkg.pre_build_cmds:
+scripts/pre_build1.sh: 100
+scripts/pre_build2.sh: 200
+
+pkg.pre_link_cmds:
+scripts/pre_link.sh: 500
+
+pkg.post_build_cmds:
+scripts/post_build.sh: 100
+
+
+For each command, the string on the left specifies the command to run.
+The number on the right indicates the command's relative ordering.  All
+paths are relative to the project root.
+
+When newt builds this example, it performs the following sequence:
+
+- scripts/pre_build1.sh
+- scripts/pre_build2.sh
+- [compile]
+- scripts/pre_link.sh
+- [link]
+- scripts/post_build.sh
+
+If other packages specify custom commands, those commands would also be
+executed during the above sequence.  For example, if another package
+specifies a pre build command with an ordering of 150, that command
+would run immediately after ``pre_build1.sh``.  In the case of a tie,
+the commands are run in lexicographic order (by path).
+
+All commands are run from the project's base directory.  In the above
+example, the ``scripts`` directory is a sibling of ``targets``.
+
+Custom Build Inputs
+~~~
+
+A custom pre-build or pre-link command can produce files that get fed
+into the current build.
+
+*Pre-build* commands can generate any of the following:
+
+1. ``.c`` files for newt to compile.
+2. ``.a`` files for newt to link.
+3. ``.h`` files that any package can include.
+
+*Pre-link* commands can only generate .a files.
+
+``.c`` and ``.a`` files should be written to the
+``$MYNEWT_USER_SRC_DIR`` environment variable (defined by newt), or any
+subdirectory within.
+
+``.h`` files should be written to ``$MYNEWT_USER_INCLUDE_DIR``.  The
+directory structure used here is directly reflected by the includer.
+E.g., if a script writes to ``$MYNEWT_USER_INCLUDE_DIR/foo/bar.h``,
+then a source file can include this header with:
+
+.. code-block:: cpp
+
+#include "foo/bar.h"
+
+Details
+~~~
+
+Environment Variables
+^
+
+In addition to the usual environment variables defined for debug and
+download scripts, newt defines the following env vars for custom
+commands:
+
+== 
=
 ===
+  Environment variable  Description
   Notes
+-- 
-
 ---
+  MYNEWT_APP_BIN_DIRThe directory where the current target's binary 
gets written.
+  MYNEWT_PKG_BIN_ARCHIVEThe path to the current package's ``.a`` file.
+  MYNEWT_PKG_BIN_DIRThe directory where the current package's ``.o`` 
and ``.a`` files get written.
+  MYNEWT_PKG_NAME   The full name of the current package.
+  MYNEWT_USER_INCLUDE_DIR   Path where globally-accessible headers get 
written.   Pre-build only.
+  MYNEWT_USER_SRC_DIR   Path where build inputs get written.   
   Pre-build and pre-link only.
+  MYNEWT_USER_WORK_DIR  Shared temp directory; used for communication 
between commands.
+== 
=
 ===
+
+These environment variables are defined for each process that a custom
+command runs in.  They are *not* defined in the newt process itself.
+So, the following snippet will not produce the expected output:
+
+BAD Example (apps/blinky/pkg.yml):
+
+.. code-block:: yaml
+
+pkg.pre_cmds:
+'echo $MYNEWT_USER_SRC_DIR': 100
+
+You can execute ``sh`` here instead if you need access

[GitHub] [mynewt-core] ccollins476ad merged pull request #2350: docs: Add page for build-time hooks

2020-08-10 Thread GitBox


ccollins476ad merged pull request #2350:
URL: https://github.com/apache/mynewt-core/pull/2350


   



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [mynewt-core] CiochinaVitalie opened a new issue #2352: Problems with gpiote module for nrf52

2020-08-10 Thread GitBox


CiochinaVitalie opened a new issue #2352:
URL: https://github.com/apache/mynewt-core/issues/2352


   
   I tried to enable  the gpiote module in nrfx52_config.h (#define 
NRFX_GPIOTE_ENABLED 1) and  I got an incomprehensible error
   
   Error: In file included from 
repos/apache-mynewt-core/hw/mcu/nordic/src/ext/nrfx/nrfx.h:37,
from 
repos/apache-mynewt-core/hw/mcu/nordic/src/ext/nrfx/drivers/src/nrfx_gpiote.c:31:
   repos/apache-mynewt-core/hw/mcu/nordic/src/ext/nrfx/hal/nrf_gpio.h:46:25: 
error: expected declaration specifiers or '...' before '(' token
  46 | #define NUMBER_OF_PINS  (P0_PIN_NUM)



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org