mirror of
https://github.com/oliverschmidt/contiki.git
synced 2024-10-20 06:24:39 +00:00
Code style fixes: sensinode
This commit is contained in:
parent
e38b419e84
commit
b4bb51e811
@ -59,14 +59,14 @@ HWCONF_PORT_0_IRQ(BUTTON_2, 7)
|
|||||||
#endif /* MODEL_N711 */
|
#endif /* MODEL_N711 */
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------*/
|
||||||
static
|
static int
|
||||||
int value_b1(int type)
|
value_b1(int type)
|
||||||
{
|
{
|
||||||
return BUTTON_1_READ() || !timer_expired(&debouncetimer[0]);
|
return BUTTON_1_READ() || !timer_expired(&debouncetimer[0]);
|
||||||
}
|
}
|
||||||
/*---------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------*/
|
||||||
static
|
static int
|
||||||
int status_b1(int type)
|
status_b1(int type)
|
||||||
{
|
{
|
||||||
switch(type) {
|
switch(type) {
|
||||||
case SENSORS_ACTIVE:
|
case SENSORS_ACTIVE:
|
||||||
@ -76,8 +76,8 @@ int status_b1(int type)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
/*---------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------*/
|
||||||
static
|
static int
|
||||||
int configure_b1(int type, int value)
|
configure_b1(int type, int value)
|
||||||
{
|
{
|
||||||
switch(type) {
|
switch(type) {
|
||||||
case SENSORS_HW_INIT:
|
case SENSORS_HW_INIT:
|
||||||
@ -101,14 +101,14 @@ int configure_b1(int type, int value)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
/*---------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------*/
|
||||||
static
|
static int
|
||||||
int value_b2(int type)
|
value_b2(int type)
|
||||||
{
|
{
|
||||||
return BUTTON_2_READ() || !timer_expired(&debouncetimer[1]);
|
return BUTTON_2_READ() || !timer_expired(&debouncetimer[1]);
|
||||||
}
|
}
|
||||||
/*---------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------*/
|
||||||
static
|
static int
|
||||||
int status_b2(int type)
|
status_b2(int type)
|
||||||
{
|
{
|
||||||
switch(type) {
|
switch(type) {
|
||||||
case SENSORS_ACTIVE:
|
case SENSORS_ACTIVE:
|
||||||
@ -118,8 +118,8 @@ int status_b2(int type)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
/*---------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------*/
|
||||||
static
|
static int
|
||||||
int configure_b2(int type, int value)
|
configure_b2(int type, int value)
|
||||||
{
|
{
|
||||||
switch(type) {
|
switch(type) {
|
||||||
case SENSORS_HW_INIT:
|
case SENSORS_HW_INIT:
|
||||||
|
@ -281,7 +281,8 @@ m25p16_dp()
|
|||||||
* Release Deep Power Down. We do NOT read the Electronic Signature
|
* Release Deep Power Down. We do NOT read the Electronic Signature
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
m25p16_res() {
|
m25p16_res()
|
||||||
|
{
|
||||||
select();
|
select();
|
||||||
bit_bang_write(M25P16_I_RES);
|
bit_bang_write(M25P16_I_RES);
|
||||||
deselect();
|
deselect();
|
||||||
@ -296,7 +297,8 @@ m25p16_res() {
|
|||||||
* \return The old style Electronic Signature. This must be 0x14
|
* \return The old style Electronic Signature. This must be 0x14
|
||||||
*/
|
*/
|
||||||
uint8_t
|
uint8_t
|
||||||
m25p16_res_res() {
|
m25p16_res_res()
|
||||||
|
{
|
||||||
uint8_t rv;
|
uint8_t rv;
|
||||||
|
|
||||||
select();
|
select();
|
||||||
|
@ -213,7 +213,8 @@ cmd_init() CC_NON_BANKED
|
|||||||
static uint8_t
|
static uint8_t
|
||||||
cmd_write() CC_NON_BANKED
|
cmd_write() CC_NON_BANKED
|
||||||
{
|
{
|
||||||
PRINTF("Disco: Write 0x%02x%02x%02x\n", req->addr[0], req->addr[1], req->addr[2]);
|
PRINTF("Disco: Write 0x%02x%02x%02x\n", req->addr[0], req->addr[1],
|
||||||
|
req->addr[2]);
|
||||||
if(uip_datalen() != DISCO_LEN_WRITE) {
|
if(uip_datalen() != DISCO_LEN_WRITE) {
|
||||||
resp.status = DISCO_ERR_BAD_LEN;
|
resp.status = DISCO_ERR_BAD_LEN;
|
||||||
return DISCO_RESP_LEN_ERR;
|
return DISCO_RESP_LEN_ERR;
|
||||||
|
Loading…
Reference in New Issue
Block a user