{"action":"created","comment":{"url":"https://api.github.com/repos/apache/mynewt-core/pulls/comments/176451534","pull_request_review_id":106155789,"id":176451534,"diff_hunk":"@@ -0,0 +1,4940 @@\n+/*\n+ * Licensed to the Apache Software Foundation (ASF) under one\n+ * or more contributor license agreements.  See the NOTICE file\n+ * distributed with this work for additional information\n+ * resarding copyright ownership.  The ASF licenses this file\n+ * to you under the Apache License, Version 2.0 (the\n+ * \"License\"); you may not use this file except in compliance\n+ * with the License.  You may obtain a copy of the License at\n+ *\n+ *  http://www.apache.org/licenses/LICENSE-2.0\n+ *\n+ * Unless required by applicable law or agreed to in writing,\n+ * software distributed under the License is distributed on an\n+ * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n+ * KIND, either express or implied.  See the License for the\n+ * specific language governing permissions and limitations\n+ * under the License.\n+ */\n+\n+#include <assert.h>\n+#include <math.h>\n+#include <string.h>\n+#include <errno.h>\n+\n+\n+#include \"bma2xx/bma2xx.h\"\n+#include \"bma2xx_priv.h\"\n+#include \"defs/error.h\"\n+#include \"hal/hal_gpio.h\"\n+#include \"hal/hal_i2c.h\"\n+#include \"hal/hal_spi.h\"\n+\n+#if MYNEWT_VAL(BMA2XX_LOG)\n+#include \"log/log.h\"\n+#endif\n+\n+#if MYNEWT_VAL(BMA2XX_LOG)\n+static struct log bma2xx_log;\n+#define LOG_MODULE_BMA2XX (200)\n+#define BMA2XX_ERROR(...) LOG_ERROR(&bma2xx_log, LOG_MODULE_BMA2XX, __VA_ARGS__)\n+#define BMA2XX_INFO(...)  LOG_INFO(&bma2xx_log, LOG_MODULE_BMA2XX, __VA_ARGS__)\n+#else\n+#define BMA2XX_ERROR(...)\n+#define BMA2XX_INFO(...)\n+#endif\n+\n+#define BMA2XX_NOTIFY_MASK  0x01\n+#define BMA2XX_READ_MASK    0x02\n+\n+#if MYNEWT_VAL(SPI_0_MASTER) || MYNEWT_VAL(SPI_1_MASTER)\n+static struct hal_spi_settings spi_bma2xx_settings = {\n+        .data_order = HAL_SPI_MSB_FIRST,\n+        .data_mode  = HAL_SPI_MODE0,\n+        .baudrate   = 4000,\n+        .word_size  = HAL_SPI_WORD_SIZE_8BIT,\n+};\n+#endif\n+\n+static void\n+delay_msec(uint32_t delay)\n+{\n+    delay = (delay * OS_TICKS_PER_SEC) / 1000 + 1;\n+    os_time_delay(delay);\n+}\n+\n+#if MYNEWT_VAL(BMA2XX_INT_ENABLE)\n+static void\n+init_interrupt(struct bma2xx_int * interrupt, struct sensor_int *ints)\n+{\n+    os_error_t error;\n+\n+    error = os_sem_init(&interrupt->wait, 0);\n+    assert(error == OS_OK);\n+\n+    interrupt->active = false;\n+    interrupt->asleep = false;\n+    interrupt->ints = ints;\n+}\n+\n+static void\n+undo_interrupt(struct bma2xx_int * interrupt)\n+{\n+    OS_ENTER_CRITICAL(interrupt->lock);\n+    interrupt->active = false;\n+    interrupt->asleep = false;\n+    OS_EXIT_CRITICAL(interrupt->lock);\n+}\n+\n+static void\n+wait_interrupt(struct bma2xx_int * interrupt, enum bma2xx_int_num int_num)\n+{\n+    bool wait;\n+\n+    OS_ENTER_CRITICAL(interrupt->lock);\n+\n+    /* Check if we did not missed interrupt */\n+    if (hal_gpio_read(interrupt->ints[int_num].host_pin) ==\n+                                            interrupt->ints[int_num].active) {\n+        OS_EXIT_CRITICAL(interrupt->lock);\n+        return;\n+    }\n+\n+    if (interrupt->active) {\n+        interrupt->active = false;\n+        wait = false;\n+    } else {\n+        interrupt->asleep = true;\n+        wait = true;\n+    }\n+    OS_EXIT_CRITICAL(interrupt->lock);\n+\n+    if (wait) {\n+        os_error_t error;\n+\n+        error = os_sem_pend(&interrupt->wait, -1);\n+        assert(error == OS_OK);\n+    }\n+}\n+\n+static void\n+wake_interrupt(struct bma2xx_int * interrupt)\n+{\n+    bool wake;\n+\n+    OS_ENTER_CRITICAL(interrupt->lock);\n+    if (interrupt->asleep) {\n+        interrupt->asleep = false;\n+        wake = true;\n+    } else {\n+        interrupt->active = true;\n+        wake = false;\n+    }\n+    OS_EXIT_CRITICAL(interrupt->lock);\n+\n+    if (wake) {\n+        os_error_t error;\n+\n+        error = os_sem_release(&interrupt->wait);\n+        assert(error == OS_OK);\n+    }\n+}\n+\n+static void\n+interrupt_handler(void * arg)\n+{\n+    struct sensor *sensor = arg;\n+    struct bma2xx *bma2xx;\n+\n+    bma2xx = (struct bma2xx *)SENSOR_GET_DEVICE(sensor);\n+\n+    if (bma2xx->pdd.interrupt) {\n+        wake_interrupt(bma2xx->pdd.interrupt);\n+    }\n+\n+    sensor_mgr_put_interrupt_evt(sensor);\n+}\n+#endif\n+\n+/**\n+ * Read multiple length data over SPI\n+ *\n+ * @param register address\n+ * @param variable length payload\n+ * @param length of the payload to read\n+ *\n+ * @return 0 on success, non-zero on failure\n+ */\n+int\n+spi_readlen(const struct sensor_itf * itf, uint8_t addr, uint8_t *payload,\n+            uint8_t len)\n+{\n+    int i;\n+    uint16_t retval;\n+    int rc;\n+\n+    rc = 0;\n+\n+    /* Select the device */\n+    hal_gpio_write(itf->si_cs_pin, 0);\n+\n+    /* Send the address */\n+    retval = hal_spi_tx_val(itf->si_num, addr | BMA2XX_SPI_READ_CMD_BIT);\n+    if (retval == 0xFFFF) {\n+        rc = SYS_EINVAL;\n+        BMA2XX_ERROR(\"SPI_%u register write failed addr:0x%02X\\n\",\n+                     itf->si_num, addr);\n+        goto err;\n+    }\n+\n+    for (i = 0; i < len; i++) {\n+        /* Read data */\n+        retval = hal_spi_tx_val(itf->si_num, 0);\n+        if (retval == 0xFFFF) {\n+            rc = SYS_EINVAL;\n+            BMA2XX_ERROR(\"SPI_%u read failed addr:0x%02X\\n\",\n+                         itf->si_num, addr);\n+            goto err;\n+        }\n+        payload[i] = retval;\n+    }\n+\n+    rc = 0;\n+\n+    err:\n+    /* De-select the device */\n+    hal_gpio_write(itf->si_cs_pin, 1);\n+\n+    return rc;\n+}\n+\n+/**\n+ * Write multiple length data SPI\n+ *\n+ * @param register address\n+ * @param variable length payload\n+ * @param length of the payload to write\n+ *\n+ * @return 0 on success, non-zero on failure\n+ */\n+int\n+spi_writereg(const struct sensor_itf * itf, uint8_t addr, uint8_t payload,\n+             uint8_t len)\n+{\n+    int i;\n+    int rc;\n+\n+    /* Select the device */\n+    hal_gpio_write(itf->si_cs_pin, 0);\n+\n+    /* Send the address */\n+    rc = hal_spi_tx_val(itf->si_num, addr);\n+    if (rc == 0xFFFF) {\n+        rc = SYS_EINVAL;\n+        BMA2XX_ERROR(\"SPI_%u register write failed addr:0x%02X\\n\",\n+                     itf->si_num, addr);\n+        goto err;\n+    }\n+\n+    for (i = 0; i < len; i++) {\n+        /* Read data */\n+        rc = hal_spi_tx_val(itf->si_num, payload);\n+        if (rc == 0xFFFF) {\n+            rc = SYS_EINVAL;\n+            BMA2XX_ERROR(\"SPI_%u write failed addr:0x%02X:0x%02X\\n\",\n+                         itf->si_num, addr);\n+            goto err;\n+        }\n+    }\n+\n+\n+    rc = 0;\n+\n+    err:\n+    /* De-select the device */\n+    hal_gpio_write(itf->si_cs_pin, 1);\n+\n+    os_time_delay((OS_TICKS_PER_SEC * 30)/1000 + 1);\n+\n+    return rc;\n+}\n+\n+int\n+i2c_readlen(const struct sensor_itf * itf, uint8_t addr, uint8_t *payload,\n+            uint8_t len)\n+{\n+    struct hal_i2c_master_data oper;\n+    int rc;\n+\n+    oper.address = itf->si_addr;\n+    oper.len     = 1;\n+    oper.buffer  = &addr;\n+\n+    rc = hal_i2c_master_write(itf->si_num, &oper,\n+                              OS_TICKS_PER_SEC / 10, 1);\n+    if (rc != 0) {\n+        BMA2XX_ERROR(\"I2C access failed at address 0x%02X\\n\",\n+                     addr);\n+        return rc;\n+    }\n+\n+    oper.address = itf->si_addr;\n+    oper.len     = len;\n+    oper.buffer  = payload;\n+\n+    rc = hal_i2c_master_read(itf->si_num, &oper,\n+                             OS_TICKS_PER_SEC / 10, 1);\n+    if (rc != 0) {\n+        BMA2XX_ERROR(\"I2C read failed at address 0x%02X length %u\\n\",\n+                     addr, len);\n+        return rc;\n+    }\n+\n+    return 0;\n+}\n+\n+int\n+i2c_writereg(const struct sensor_itf * itf, uint8_t addr, uint8_t data)\n+{\n+    uint8_t tuple[2];\n+    struct hal_i2c_master_data oper;\n+    int rc;\n+\n+    tuple[0] = addr;\n+    tuple[1] = data;\n+\n+    oper.address = itf->si_addr;\n+    oper.len     = 2;\n+    oper.buffer  = tuple;\n+\n+    rc = hal_i2c_master_write(itf->si_num, &oper,\n+                              OS_TICKS_PER_SEC / 10, 1);\n+    if (rc != 0) {\n+        BMA2XX_ERROR(\"I2C write failed at address 0x%02X single byte\\n\",\n+                     addr);\n+        return rc;\n+    }\n+\n+    return 0;\n+}\n+\n+static int\n+get_register(const struct bma2xx * bma2xx,\n+             uint8_t addr,\n+             uint8_t * data)\n+{\n+    int rc;\n+    const struct sensor_itf * itf;\n+    itf = SENSOR_GET_ITF(&bma2xx->sensor);\n+\n+    if (itf->si_type == SENSOR_ITF_SPI) {\n+        rc = spi_readlen(itf, addr, data, 1);\n+    } else if (itf->si_type == SENSOR_ITF_I2C){\n+        rc = i2c_readlen(itf, addr, data, 1);\n+    } else {\n+        rc = SYS_EINVAL;\n+    }\n+\n+    return rc;\n+}\n+\n+static int\n+get_registers(const struct bma2xx * bma2xx,\n+              uint8_t addr,\n+              uint8_t * data,\n+              uint8_t size)\n+{\n+    int rc;\n+    const struct sensor_itf * itf;\n+    itf = SENSOR_GET_ITF(&bma2xx->sensor);\n+\n+    if (itf->si_type == SENSOR_ITF_SPI) {\n+        rc = spi_readlen(itf, addr, data, size);\n+    } else if (itf->si_type == SENSOR_ITF_I2C){\n+        rc = i2c_readlen(itf, addr, data, size);\n+    } else {\n+        rc = SYS_EINVAL;\n+    }\n+\n+    return rc;\n+}\n+\n+static int\n+set_register(const struct bma2xx * bma2xx,\n+             uint8_t addr,\n+             uint8_t data)\n+{\n+    int rc;\n+    const struct sensor_itf * itf;\n+\n+    itf = SENSOR_GET_ITF(&bma2xx->sensor);\n+\n+    if (itf->si_type == SENSOR_ITF_SPI) {\n+        rc = spi_writereg(itf, addr, data, 1);\n+    } else if (itf->si_type == SENSOR_ITF_I2C){\n+        rc = i2c_writereg(itf, addr, data);\n+    } else {\n+        rc = SYS_EINVAL;\n+    }\n+\n+    switch (bma2xx->power) {\n+    case BMA2XX_POWER_MODE_SUSPEND:\n+    case BMA2XX_POWER_MODE_LPM_1:\n+        delay_msec(1);\n+        break;\n+    default:\n+        break;\n+    }\n+\n+    return rc;\n+}\n+\n+int\n+bma2xx_get_chip_id(const struct bma2xx * bma2xx,\n+                   uint8_t * chip_id)\n+{\n+    return get_register(bma2xx, REG_ADDR_BGW_CHIPID, chip_id);\n+}\n+\n+static void\n+compute_accel_data(struct accel_data * accel_data,\n+                   enum bma2xx_model model,\n+                   const uint8_t * raw_data,\n+                   float accel_scale)\n+{\n+    int16_t raw_accel;\n+    uint8_t model_shift = 0;\n+\n+    switch (model) {\n+        case BMA2XX_BMA280:\n+            model_shift = BMA280_ACCEL_BIT_SHIFT;\n+            break;\n+        case BMA2XX_BMA253:\n+            model_shift = BMA253_ACCEL_BIT_SHIFT;\n+            break;\n+        default:\n+            break;\n+    }\n+\n+    raw_accel = (int16_t)(raw_data[0] & 0xFC) | (int16_t)(raw_data[1] << 8);\n+    raw_accel >>= model_shift;\n+\n+    accel_data->accel_g = (float)raw_accel * accel_scale;\n+    accel_data->new_data = raw_data[0] & 0x01;\n+}\n+\n+static int get_accel_scale(enum bma2xx_model model,\n+                            enum bma2xx_g_range g_range,\n+                            float *accel_scale)\n+{\n+    switch (g_range) {\n+        case BMA2XX_G_RANGE_2:\n+            switch(model){","path":"hw/drivers/sensors/bma2xx/src/bma2xx.c","position":432,"original_position":432,"commit_id":"7e8fec44b1b3c71a5bf9a923dc506e7d293b69aa","original_commit_id":"7e8fec44b1b3c71a5bf9a923dc506e7d293b69aa","user":{"login":"joshgrob","id":4121114,"avatar_url":"https://avatars2.githubusercontent.com/u/4121114?v=4","gravatar_id":"","url":"https://api.github.com/users/joshgrob","html_url":"https://github.com/joshgrob","followers_url":"https://api.github.com/users/joshgrob/followers","following_url":"https://api.github.com/users/joshgrob/following{/other_user}","gists_url":"https://api.github.com/users/joshgrob/gists{/gist_id}","starred_url":"https://api.github.com/users/joshgrob/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joshgrob/subscriptions","organizations_url":"https://api.github.com/users/joshgrob/orgs","repos_url":"https://api.github.com/users/joshgrob/repos","events_url":"https://api.github.com/users/joshgrob/events{/privacy}","received_events_url":"https://api.github.com/users/joshgrob/received_events","type":"User","site_admin":false},"body":"Yeah, I was having second thoughts about this implementation, and reviewed with @vrahane and @wes3.  Given the limited number of models (7) we agreed it was okay to use this switch.  Is it okay if we keep this as is for now?","created_at":"2018-03-22T14:57:41Z","updated_at":"2018-03-22T14:57:41Z","html_url":"https://github.com/apache/mynewt-core/pull/699#discussion_r176451534","pull_request_url":"https://api.github.com/repos/apache/mynewt-core/pulls/699","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/apache/mynewt-core/pulls/comments/176451534"},"html":{"href":"https://github.com/apache/mynewt-core/pull/699#discussion_r176451534"},"pull_request":{"href":"https://api.github.com/repos/apache/mynewt-core/pulls/699"}},"in_reply_to_id":159202047},"pull_request":{"url":"https://api.github.com/repos/apache/mynewt-core/pulls/699","id":158177071,"html_url":"https://github.com/apache/mynewt-core/pull/699","diff_url":"https://github.com/apache/mynewt-core/pull/699.diff","patch_url":"https://github.com/apache/mynewt-core/pull/699.patch","issue_url":"https://api.github.com/repos/apache/mynewt-core/issues/699","number":699,"state":"open","locked":false,"title":"Sensors/BMA2XX - New PR based on PR #697 changes","user":{"login":"joshgrob","id":4121114,"avatar_url":"https://avatars2.githubusercontent.com/u/4121114?v=4","gravatar_id":"","url":"https://api.github.com/users/joshgrob","html_url":"https://github.com/joshgrob","followers_url":"https://api.github.com/users/joshgrob/followers","following_url":"https://api.github.com/users/joshgrob/following{/other_user}","gists_url":"https://api.github.com/users/joshgrob/gists{/gist_id}","starred_url":"https://api.github.com/users/joshgrob/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joshgrob/subscriptions","organizations_url":"https://api.github.com/users/joshgrob/orgs","repos_url":"https://api.github.com/users/joshgrob/repos","events_url":"https://api.github.com/users/joshgrob/events{/privacy}","received_events_url":"https://api.github.com/users/joshgrob/received_events","type":"User","site_admin":false},"body":"@rymanluk @vrahane - I figured it was easier to make a new pull request with the complete changes and cleaner history.  The old PR is at https://github.com/apache/mynewt-core/pull/697, and I should have incorporated the comments.  Lastly, I kept in the change to the sensor.h file (adding <string.h>), because it was breaking the my test application even though sensor_test app works because of dependency differences.  I would like to get this change sooner rather than later.  Thank you for the time and help!","created_at":"2017-12-13T19:02:35Z","updated_at":"2018-03-22T14:57:41Z","closed_at":null,"merged_at":null,"merge_commit_sha":"cc3a62c5fcd85d3f07c642521293fd16637b75ed","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/apache/mynewt-core/pulls/699/commits","review_comments_url":"https://api.github.com/repos/apache/mynewt-core/pulls/699/comments","review_comment_url":"https://api.github.com/repos/apache/mynewt-core/pulls/comments{/number}","comments_url":"https://api.github.com/repos/apache/mynewt-core/issues/699/comments","statuses_url":"https://api.github.com/repos/apache/mynewt-core/statuses/7e8fec44b1b3c71a5bf9a923dc506e7d293b69aa","head":{"label":"joshgrob:master","ref":"master","sha":"7e8fec44b1b3c71a5bf9a923dc506e7d293b69aa","user":{"login":"joshgrob","id":4121114,"avatar_url":"https://avatars2.githubusercontent.com/u/4121114?v=4","gravatar_id":"","url":"https://api.github.com/users/joshgrob","html_url":"https://github.com/joshgrob","followers_url":"https://api.github.com/users/joshgrob/followers","following_url":"https://api.github.com/users/joshgrob/following{/other_user}","gists_url":"https://api.github.com/users/joshgrob/gists{/gist_id}","starred_url":"https://api.github.com/users/joshgrob/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joshgrob/subscriptions","organizations_url":"https://api.github.com/users/joshgrob/orgs","repos_url":"https://api.github.com/users/joshgrob/repos","events_url":"https://api.github.com/users/joshgrob/events{/privacy}","received_events_url":"https://api.github.com/users/joshgrob/received_events","type":"User","site_admin":false},"repo":{"id":108168059,"name":"mynewt-core","full_name":"joshgrob/mynewt-core","owner":{"login":"joshgrob","id":4121114,"avatar_url":"https://avatars2.githubusercontent.com/u/4121114?v=4","gravatar_id":"","url":"https://api.github.com/users/joshgrob","html_url":"https://github.com/joshgrob","followers_url":"https://api.github.com/users/joshgrob/followers","following_url":"https://api.github.com/users/joshgrob/following{/other_user}","gists_url":"https://api.github.com/users/joshgrob/gists{/gist_id}","starred_url":"https://api.github.com/users/joshgrob/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joshgrob/subscriptions","organizations_url":"https://api.github.com/users/joshgrob/orgs","repos_url":"https://api.github.com/users/joshgrob/repos","events_url":"https://api.github.com/users/joshgrob/events{/privacy}","received_events_url":"https://api.github.com/users/joshgrob/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/joshgrob/mynewt-core","description":null,"fork":true,"url":"https://api.github.com/repos/joshgrob/mynewt-core","forks_url":"https://api.github.com/repos/joshgrob/mynewt-core/forks","keys_url":"https://api.github.com/repos/joshgrob/mynewt-core/keys{/key_id}","collaborators_url":"https://api.github.com/repos/joshgrob/mynewt-core/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/joshgrob/mynewt-core/teams","hooks_url":"https://api.github.com/repos/joshgrob/mynewt-core/hooks","issue_events_url":"https://api.github.com/repos/joshgrob/mynewt-core/issues/events{/number}","events_url":"https://api.github.com/repos/joshgrob/mynewt-core/events","assignees_url":"https://api.github.com/repos/joshgrob/mynewt-core/assignees{/user}","branches_url":"https://api.github.com/repos/joshgrob/mynewt-core/branches{/branch}","tags_url":"https://api.github.com/repos/joshgrob/mynewt-core/tags","blobs_url":"https://api.github.com/repos/joshgrob/mynewt-core/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/joshgrob/mynewt-core/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/joshgrob/mynewt-core/git/refs{/sha}","trees_url":"https://api.github.com/repos/joshgrob/mynewt-core/git/trees{/sha}","statuses_url":"https://api.github.com/repos/joshgrob/mynewt-core/statuses/{sha}","languages_url":"https://api.github.com/repos/joshgrob/mynewt-core/languages","stargazers_url":"https://api.github.com/repos/joshgrob/mynewt-core/stargazers","contributors_url":"https://api.github.com/repos/joshgrob/mynewt-core/contributors","subscribers_url":"https://api.github.com/repos/joshgrob/mynewt-core/subscribers","subscription_url":"https://api.github.com/repos/joshgrob/mynewt-core/subscription","commits_url":"https://api.github.com/repos/joshgrob/mynewt-core/commits{/sha}","git_commits_url":"https://api.github.com/repos/joshgrob/mynewt-core/git/commits{/sha}","comments_url":"https://api.github.com/repos/joshgrob/mynewt-core/comments{/number}","issue_comment_url":"https://api.github.com/repos/joshgrob/mynewt-core/issues/comments{/number}","contents_url":"https://api.github.com/repos/joshgrob/mynewt-core/contents/{+path}","compare_url":"https://api.github.com/repos/joshgrob/mynewt-core/compare/{base}...{head}","merges_url":"https://api.github.com/repos/joshgrob/mynewt-core/merges","archive_url":"https://api.github.com/repos/joshgrob/mynewt-core/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/joshgrob/mynewt-core/downloads","issues_url":"https://api.github.com/repos/joshgrob/mynewt-core/issues{/number}","pulls_url":"https://api.github.com/repos/joshgrob/mynewt-core/pulls{/number}","milestones_url":"https://api.github.com/repos/joshgrob/mynewt-core/milestones{/number}","notifications_url":"https://api.github.com/repos/joshgrob/mynewt-core/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/joshgrob/mynewt-core/labels{/name}","releases_url":"https://api.github.com/repos/joshgrob/mynewt-core/releases{/id}","deployments_url":"https://api.github.com/repos/joshgrob/mynewt-core/deployments","created_at":"2017-10-24T18:36:47Z","updated_at":"2017-10-24T18:37:12Z","pushed_at":"2017-12-18T20:12:13Z","git_url":"git://github.com/joshgrob/mynewt-core.git","ssh_url":"git@github.com:joshgrob/mynewt-core.git","clone_url":"https://github.com/joshgrob/mynewt-core.git","svn_url":"https://github.com/joshgrob/mynewt-core","homepage":"","size":85853,"stargazers_count":0,"watchers_count":0,"language":"C","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"apache:master","ref":"master","sha":"6f0756f7c8d11404e39fdd3a722529c1a0a2dabb","user":{"login":"apache","id":47359,"avatar_url":"https://avatars0.githubusercontent.com/u/47359?v=4","gravatar_id":"","url":"https://api.github.com/users/apache","html_url":"https://github.com/apache","followers_url":"https://api.github.com/users/apache/followers","following_url":"https://api.github.com/users/apache/following{/other_user}","gists_url":"https://api.github.com/users/apache/gists{/gist_id}","starred_url":"https://api.github.com/users/apache/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apache/subscriptions","organizations_url":"https://api.github.com/users/apache/orgs","repos_url":"https://api.github.com/users/apache/repos","events_url":"https://api.github.com/users/apache/events{/privacy}","received_events_url":"https://api.github.com/users/apache/received_events","type":"Organization","site_admin":false},"repo":{"id":45165993,"name":"mynewt-core","full_name":"apache/mynewt-core","owner":{"login":"apache","id":47359,"avatar_url":"https://avatars0.githubusercontent.com/u/47359?v=4","gravatar_id":"","url":"https://api.github.com/users/apache","html_url":"https://github.com/apache","followers_url":"https://api.github.com/users/apache/followers","following_url":"https://api.github.com/users/apache/following{/other_user}","gists_url":"https://api.github.com/users/apache/gists{/gist_id}","starred_url":"https://api.github.com/users/apache/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apache/subscriptions","organizations_url":"https://api.github.com/users/apache/orgs","repos_url":"https://api.github.com/users/apache/repos","events_url":"https://api.github.com/users/apache/events{/privacy}","received_events_url":"https://api.github.com/users/apache/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/apache/mynewt-core","description":"An OS to build, deploy and securely manage billions of devices","fork":false,"url":"https://api.github.com/repos/apache/mynewt-core","forks_url":"https://api.github.com/repos/apache/mynewt-core/forks","keys_url":"https://api.github.com/repos/apache/mynewt-core/keys{/key_id}","collaborators_url":"https://api.github.com/repos/apache/mynewt-core/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/apache/mynewt-core/teams","hooks_url":"https://api.github.com/repos/apache/mynewt-core/hooks","issue_events_url":"https://api.github.com/repos/apache/mynewt-core/issues/events{/number}","events_url":"https://api.github.com/repos/apache/mynewt-core/events","assignees_url":"https://api.github.com/repos/apache/mynewt-core/assignees{/user}","branches_url":"https://api.github.com/repos/apache/mynewt-core/branches{/branch}","tags_url":"https://api.github.com/repos/apache/mynewt-core/tags","blobs_url":"https://api.github.com/repos/apache/mynewt-core/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/apache/mynewt-core/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/apache/mynewt-core/git/refs{/sha}","trees_url":"https://api.github.com/repos/apache/mynewt-core/git/trees{/sha}","statuses_url":"https://api.github.com/repos/apache/mynewt-core/statuses/{sha}","languages_url":"https://api.github.com/repos/apache/mynewt-core/languages","stargazers_url":"https://api.github.com/repos/apache/mynewt-core/stargazers","contributors_url":"https://api.github.com/repos/apache/mynewt-core/contributors","subscribers_url":"https://api.github.com/repos/apache/mynewt-core/subscribers","subscription_url":"https://api.github.com/repos/apache/mynewt-core/subscription","commits_url":"https://api.github.com/repos/apache/mynewt-core/commits{/sha}","git_commits_url":"https://api.github.com/repos/apache/mynewt-core/git/commits{/sha}","comments_url":"https://api.github.com/repos/apache/mynewt-core/comments{/number}","issue_comment_url":"https://api.github.com/repos/apache/mynewt-core/issues/comments{/number}","contents_url":"https://api.github.com/repos/apache/mynewt-core/contents/{+path}","compare_url":"https://api.github.com/repos/apache/mynewt-core/compare/{base}...{head}","merges_url":"https://api.github.com/repos/apache/mynewt-core/merges","archive_url":"https://api.github.com/repos/apache/mynewt-core/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/apache/mynewt-core/downloads","issues_url":"https://api.github.com/repos/apache/mynewt-core/issues{/number}","pulls_url":"https://api.github.com/repos/apache/mynewt-core/pulls{/number}","milestones_url":"https://api.github.com/repos/apache/mynewt-core/milestones{/number}","notifications_url":"https://api.github.com/repos/apache/mynewt-core/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/apache/mynewt-core/labels{/name}","releases_url":"https://api.github.com/repos/apache/mynewt-core/releases{/id}","deployments_url":"https://api.github.com/repos/apache/mynewt-core/deployments","created_at":"2015-10-29T07:00:07Z","updated_at":"2018-03-22T05:11:58Z","pushed_at":"2018-03-22T12:17:35Z","git_url":"git://github.com/apache/mynewt-core.git","ssh_url":"git@github.com:apache/mynewt-core.git","clone_url":"https://github.com/apache/mynewt-core.git","svn_url":"https://github.com/apache/mynewt-core","homepage":"https://mynewt.apache.org/","size":150522,"stargazers_count":321,"watchers_count":321,"language":"C","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":160,"mirror_url":null,"archived":false,"open_issues_count":36,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":160,"open_issues":36,"watchers":321,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/apache/mynewt-core/pulls/699"},"html":{"href":"https://github.com/apache/mynewt-core/pull/699"},"issue":{"href":"https://api.github.com/repos/apache/mynewt-core/issues/699"},"comments":{"href":"https://api.github.com/repos/apache/mynewt-core/issues/699/comments"},"review_comments":{"href":"https://api.github.com/repos/apache/mynewt-core/pulls/699/comments"},"review_comment":{"href":"https://api.github.com/repos/apache/mynewt-core/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/apache/mynewt-core/pulls/699/commits"},"statuses":{"href":"https://api.github.com/repos/apache/mynewt-core/statuses/7e8fec44b1b3c71a5bf9a923dc506e7d293b69aa"}},"author_association":"NONE"}}
{"actor":{"display_login":"joshgrob"}}