code stringlengths 1 1.05M | repo_name stringlengths 6 83 | path stringlengths 3 242 | language stringclasses 222
values | license stringclasses 20
values | size int64 1 1.05M |
|---|---|---|---|---|---|
#ifndef __INET_PTON_H
#define __INET_PTON_H
int inet_pton(int, const char *, void *);
#endif /* __INET_PTON_H */
| YifuLiu/AliOS-Things | components/py_engine/engine/drivers/cc3000/inc/inet_pton.h | C | apache-2.0 | 113 |
/*****************************************************************************
*
* netapp.h - CC3000 Host Driver Implementation.
* Copyright (C) 2011 Texas Instruments Incorporated - http://www.ti.com/
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided tha... | YifuLiu/AliOS-Things | components/py_engine/engine/drivers/cc3000/inc/netapp.h | C | apache-2.0 | 13,872 |
/*****************************************************************************
*
* nvmem.h - CC3000 Host Driver Implementation.
* Copyright (C) 2011 Texas Instruments Incorporated - http://www.ti.com/
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that... | YifuLiu/AliOS-Things | components/py_engine/engine/drivers/cc3000/inc/nvmem.h | C | apache-2.0 | 9,621 |
#ifndef __CC3000_PATCH_PROG_H__
#define __CC3000_PATCH_PROG_H__
extern unsigned short fw_length;
extern const unsigned char fw_patch[];
extern unsigned short drv_length;
extern const unsigned char wlan_drv_patch[];
extern const unsigned char cRMdefaultParams[128];
void patch_prog_start();
#endif //__CC3000_PATCH_PROG... | YifuLiu/AliOS-Things | components/py_engine/engine/drivers/cc3000/inc/patch_prog.h | C | apache-2.0 | 325 |
/*****************************************************************************
*
* security.h - CC3000 Host Driver Implementation.
* Copyright (C) 2011 Texas Instruments Incorporated - http://www.ti.com/
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided t... | YifuLiu/AliOS-Things | components/py_engine/engine/drivers/cc3000/inc/security.h | C | apache-2.0 | 4,537 |
/*****************************************************************************
*
* socket.h - CC3000 Host Driver Implementation.
* Copyright (C) 2011 Texas Instruments Incorporated - http://www.ti.com/
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided tha... | YifuLiu/AliOS-Things | components/py_engine/engine/drivers/cc3000/inc/socket.h | C | apache-2.0 | 30,376 |
/*****************************************************************************
*
* wlan.h - CC3000 Host Driver Implementation.
* Copyright (C) 2011 Texas Instruments Incorporated - http://www.ti.com/
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that ... | YifuLiu/AliOS-Things | components/py_engine/engine/drivers/cc3000/inc/wlan.h | C | apache-2.0 | 22,251 |
/*****************************************************************************
*
* cc3000_common.c.c - CC3000 Host Driver Implementation.
* Copyright (C) 2011 Texas Instruments Incorporated - http://www.ti.com/
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted pro... | YifuLiu/AliOS-Things | components/py_engine/engine/drivers/cc3000/src/cc3000_common.c | C | apache-2.0 | 5,584 |
/*****************************************************************************
*
* spi.c - CC3000 Host Driver Implementation.
* Copyright (C) 2011 Texas Instruments Incorporated - http://www.ti.com/
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided t... | YifuLiu/AliOS-Things | components/py_engine/engine/drivers/cc3000/src/ccspi.c | C | apache-2.0 | 15,441 |
/*****************************************************************************
*
* evnt_handler.c - CC3000 Host Driver Implementation.
* Copyright (C) 2011 Texas Instruments Incorporated - http://www.ti.com/
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provid... | YifuLiu/AliOS-Things | components/py_engine/engine/drivers/cc3000/src/evnt_handler.c | C | apache-2.0 | 26,765 |
/*****************************************************************************
*
* hci.c - CC3000 Host Driver Implementation.
* Copyright (C) 2011 Texas Instruments Incorporated - http://www.ti.com/
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that t... | YifuLiu/AliOS-Things | components/py_engine/engine/drivers/cc3000/src/hci.c | C | apache-2.0 | 7,648 |
/*
* Copyright (C) 1996-2001 Internet Software Consortium.
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" A... | YifuLiu/AliOS-Things | components/py_engine/engine/drivers/cc3000/src/inet_ntop.c | C | apache-2.0 | 5,512 |
/* This is from the BIND 4.9.4 release, modified to compile by itself */
/* Copyright (c) 1996 by Internet Software Consortium.
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission n... | YifuLiu/AliOS-Things | components/py_engine/engine/drivers/cc3000/src/inet_pton.c | C | apache-2.0 | 5,871 |
/*****************************************************************************
*
* netapp.c - CC3000 Host Driver Implementation.
* Copyright (C) 2011 Texas Instruments Incorporated - http://www.ti.com/
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided tha... | YifuLiu/AliOS-Things | components/py_engine/engine/drivers/cc3000/src/netapp.c | C | apache-2.0 | 16,006 |
/*****************************************************************************
*
* nvmem.c - CC3000 Host Driver Implementation.
* Copyright (C) 2011 Texas Instruments Incorporated - http://www.ti.com/
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that... | YifuLiu/AliOS-Things | components/py_engine/engine/drivers/cc3000/src/nvmem.c | C | apache-2.0 | 11,307 |
/*****************************************************************************
*
* {PatchProgrammer_DR_Patch.c}
*
* Burn Patches to EEPROM
*
* Copyright (C) 2013 Texas Instruments Incorporated - http://www.ti.com/
* ALL RIGHTS RESERVED
*
*************************************************************************... | YifuLiu/AliOS-Things | components/py_engine/engine/drivers/cc3000/src/patch.c | C | apache-2.0 | 83,956 |
#include <stdio.h>
#include <string.h>
#include "cc3000_common.h"
#include "nvmem.h"
#include "ccspi.h"
#include "hci.h"
#include "wlan.h"
#include "patch_prog.h"
#define BIT0 0x1
#define BIT1 0x2
#define BIT2 0x4
#define BIT3 0x8
#define BIT4 0x10
#define BIT5 0x20
#define BIT6 0x40
#define BIT7 ... | YifuLiu/AliOS-Things | components/py_engine/engine/drivers/cc3000/src/patch_prog.c | C | apache-2.0 | 12,527 |
/*****************************************************************************
*
* security.c - CC3000 Host Driver Implementation.
* Copyright (C) 2011 Texas Instruments Incorporated - http://www.ti.com/
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided t... | YifuLiu/AliOS-Things | components/py_engine/engine/drivers/cc3000/src/security.c | C | apache-2.0 | 23,149 |
/*****************************************************************************
*
* socket.c - CC3000 Host Driver Implementation.
* Copyright (C) 2011 Texas Instruments Incorporated - http://www.ti.com/
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided tha... | YifuLiu/AliOS-Things | components/py_engine/engine/drivers/cc3000/src/socket.c | C | apache-2.0 | 41,907 |
/*****************************************************************************
*
* wlan.c - CC3000 Host Driver Implementation.
* Copyright (C) 2011 Texas Instruments Incorporated - http://www.ti.com/
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that ... | YifuLiu/AliOS-Things | components/py_engine/engine/drivers/cc3000/src/wlan.c | C | apache-2.0 | 39,511 |
/*
* device.h - CC31xx/CC32xx Host Driver Implementation
*
* Copyright (C) 2014 Texas Instruments Incorporated - http://www.ti.com/
*
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* Redistribu... | YifuLiu/AliOS-Things | components/py_engine/engine/drivers/cc3100/inc/device.h | C | apache-2.0 | 27,197 |
/*
* driver.h - CC31xx/CC32xx Host Driver Implementation
*
* Copyright (C) 2014 Texas Instruments Incorporated - http://www.ti.com/
*
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* Redistribu... | YifuLiu/AliOS-Things | components/py_engine/engine/drivers/cc3100/inc/driver.h | C | apache-2.0 | 8,250 |
/*
* flowcont.h - CC31xx/CC32xx Host Driver Implementation
*
* Copyright (C) 2014 Texas Instruments Incorporated - http://www.ti.com/
*
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* Redistri... | YifuLiu/AliOS-Things | components/py_engine/engine/drivers/cc3100/inc/flowcont.h | C | apache-2.0 | 2,462 |
/*
* fs.h - CC31xx/CC32xx Host Driver Implementation
*
* Copyright (C) 2014 Texas Instruments Incorporated - http://www.ti.com/
*
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* Redistribution... | YifuLiu/AliOS-Things | components/py_engine/engine/drivers/cc3100/inc/fs.h | C | apache-2.0 | 18,016 |
/*
* netcfg.h - CC31xx/CC32xx Host Driver Implementation
*
* Copyright (C) 2014 Texas Instruments Incorporated - http://www.ti.com/
*
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* Redistribu... | YifuLiu/AliOS-Things | components/py_engine/engine/drivers/cc3100/inc/netcfg.h | C | apache-2.0 | 11,303 |
/*
* nonos.h - CC31xx/CC32xx Host Driver Implementation
*
* Copyright (C) 2014 Texas Instruments Incorporated - http://www.ti.com/
*
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* Redistribut... | YifuLiu/AliOS-Things | components/py_engine/engine/drivers/cc3100/inc/nonos.h | C | apache-2.0 | 11,095 |
/*
* objInclusion.h - CC31xx/CC32xx Host Driver Implementation
*
* Copyright (C) 2014 Texas Instruments Incorporated - http://www.ti.com/
*
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* Redi... | YifuLiu/AliOS-Things | components/py_engine/engine/drivers/cc3100/inc/objInclusion.h | C | apache-2.0 | 8,237 |
/*
* protocol.h - CC31xx/CC32xx Host Driver Implementation
*
* Copyright (C) 2014 Texas Instruments Incorporated - http://www.ti.com/
*
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* Redistri... | YifuLiu/AliOS-Things | components/py_engine/engine/drivers/cc3100/inc/protocol.h | C | apache-2.0 | 36,630 |
/*
* simplelink.h - CC31xx/CC32xx Host Driver Implementation
*
* Copyright (C) 2014 Texas Instruments Incorporated - http://www.ti.com/
*
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* Redist... | YifuLiu/AliOS-Things | components/py_engine/engine/drivers/cc3100/inc/simplelink.h | C | apache-2.0 | 35,470 |
/*
* socket.h - CC31xx/CC32xx Host Driver Implementation
*
* Copyright (C) 2014 Texas Instruments Incorporated - http://www.ti.com/
*
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* Redistribu... | YifuLiu/AliOS-Things | components/py_engine/engine/drivers/cc3100/inc/socket.h | C | apache-2.0 | 78,777 |
/*
* spawn.h - CC31xx/CC32xx Host Driver Implementation
*
* Copyright (C) 2014 Texas Instruments Incorporated - http://www.ti.com/
*
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* Redistribut... | YifuLiu/AliOS-Things | components/py_engine/engine/drivers/cc3100/inc/spawn.h | C | apache-2.0 | 2,277 |
/*
* trace.h - CC31xx/CC32xx Host Driver Implementation
*
* Copyright (C) 2014 Texas Instruments Incorporated - http://www.ti.com/
*
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* Redistribut... | YifuLiu/AliOS-Things | components/py_engine/engine/drivers/cc3100/inc/trace.h | C | apache-2.0 | 7,084 |
/*
* wlan.h - CC31xx/CC32xx Host Driver Implementation
*
* Copyright (C) 2014 Texas Instruments Incorporated - http://www.ti.com/
*
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* Redistributi... | YifuLiu/AliOS-Things | components/py_engine/engine/drivers/cc3100/inc/wlan.h | C | apache-2.0 | 65,927 |
/*
* wlan_rx_filters.h - CC31xx/CC32xx Host Driver Implementation
*
* Copyright (C) 2014 Texas Instruments Incorporated - http://www.ti.com/
*
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* R... | YifuLiu/AliOS-Things | components/py_engine/engine/drivers/cc3100/inc/wlan_rx_filters.h | C | apache-2.0 | 35,001 |
/*
* device.c - CC31xx/CC32xx Host Driver Implementation
*
* Copyright (C) 2014 Texas Instruments Incorporated - http://www.ti.com/
*
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* Redistributions of s... | YifuLiu/AliOS-Things | components/py_engine/engine/drivers/cc3100/src/device.c | C | apache-2.0 | 15,497 |
/*
* driver.c - CC31xx/CC32xx Host Driver Implementation
*
* Copyright (C) 2014 Texas Instruments Incorporated - http://www.ti.com/
*
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* Redistributions of s... | YifuLiu/AliOS-Things | components/py_engine/engine/drivers/cc3100/src/driver.c | C | apache-2.0 | 63,937 |
/*
* flowcont.c - CC31xx/CC32xx Host Driver Implementation
*
* Copyright (C) 2014 Texas Instruments Incorporated - http://www.ti.com/
*
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* Redistri... | YifuLiu/AliOS-Things | components/py_engine/engine/drivers/cc3100/src/flowcont.c | C | apache-2.0 | 2,885 |
/*
* fs.c - CC31xx/CC32xx Host Driver Implementation
*
* Copyright (C) 2014 Texas Instruments Incorporated - http://www.ti.com/
*
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* Redistribution... | YifuLiu/AliOS-Things | components/py_engine/engine/drivers/cc3100/src/fs.c | C | apache-2.0 | 13,147 |
/*
* netapp.c - CC31xx/CC32xx Host Driver Implementation
*
* Copyright (C) 2014 Texas Instruments Incorporated - http://www.ti.com/
*
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* Redistribu... | YifuLiu/AliOS-Things | components/py_engine/engine/drivers/cc3100/src/netapp.c | C | apache-2.0 | 42,224 |
/*
* netcfg.c - CC31xx/CC32xx Host Driver Implementation
*
* Copyright (C) 2014 Texas Instruments Incorporated - http://www.ti.com/
*
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* Redistributions of s... | YifuLiu/AliOS-Things | components/py_engine/engine/drivers/cc3100/src/netcfg.c | C | apache-2.0 | 4,520 |
/*
* nonos.c - CC31xx/CC32xx Host Driver Implementation
*
* Copyright (C) 2014 Texas Instruments Incorporated - http://www.ti.com/
*
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* Redistributions of so... | YifuLiu/AliOS-Things | components/py_engine/engine/drivers/cc3100/src/nonos.c | C | apache-2.0 | 4,447 |
/*
* socket.c - CC31xx/CC32xx Host Driver Implementation
*
* Copyright (C) 2014 Texas Instruments Incorporated - http://www.ti.com/
*
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* Redistribu... | YifuLiu/AliOS-Things | components/py_engine/engine/drivers/cc3100/src/socket.c | C | apache-2.0 | 32,856 |
/*
* spawn.c - CC31xx/CC32xx Host Driver Implementation
*
* Copyright (C) 2014 Texas Instruments Incorporated - http://www.ti.com/
*
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* Redistribut... | YifuLiu/AliOS-Things | components/py_engine/engine/drivers/cc3100/src/spawn.c | C | apache-2.0 | 6,604 |
/*
* wlan.c - CC31xx/CC32xx Host Driver Implementation
*
* Copyright (C) 2014 Texas Instruments Incorporated - http://www.ti.com/
*
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* Redistributions of sou... | YifuLiu/AliOS-Things | components/py_engine/engine/drivers/cc3100/src/wlan.c | C | apache-2.0 | 29,940 |
/*
* This file is part of the MicroPython project, http://micropython.org/
*
* The MIT License (MIT)
*
* Copyright (c) 2018-2019 Damien P. George
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in... | YifuLiu/AliOS-Things | components/py_engine/engine/drivers/cyw43/cyw43.h | C | apache-2.0 | 4,790 |
/*
* This file is part of the MicroPython project, http://micropython.org/
*
* The MIT License (MIT)
*
* Copyright (c) 2018-2019 Damien P. George
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in... | YifuLiu/AliOS-Things | components/py_engine/engine/drivers/cyw43/cyw43_ctrl.c | C | apache-2.0 | 17,795 |
/*
* This file is part of the MicroPython project, http://micropython.org/
*
* The MIT License (MIT)
*
* Copyright (c) 2018-2019 Damien P. George
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in... | YifuLiu/AliOS-Things | components/py_engine/engine/drivers/cyw43/cyw43_ll.h | C | apache-2.0 | 5,163 |
/*
* This file is part of the MicroPython project, http://micropython.org/
*
* The MIT License (MIT)
*
* Copyright (c) 2018-2019 Damien P. George
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in... | YifuLiu/AliOS-Things | components/py_engine/engine/drivers/cyw43/cyw43_lwip.c | C | apache-2.0 | 6,840 |
/*
* This file is part of the MicroPython project, http://micropython.org/
*
* The MIT License (MIT)
*
* Copyright (c) 2019-2020 Damien P. George
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in... | YifuLiu/AliOS-Things | components/py_engine/engine/drivers/cyw43/cywbt.c | C | apache-2.0 | 8,477 |
/*
* This file is part of the MicroPython project, http://micropython.org/
*
* The MIT License (MIT)
*
* Copyright (c) 2016 Damien P. George
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the ... | YifuLiu/AliOS-Things | components/py_engine/engine/drivers/dht/dht.c | C | apache-2.0 | 3,077 |
#ifndef MICROPY_INCLUDED_DRIVERS_DHT_DHT_H
#define MICROPY_INCLUDED_DRIVERS_DHT_DHT_H
#include "py/obj.h"
MP_DECLARE_CONST_FUN_OBJ_2(dht_readinto_obj);
#endif // MICROPY_INCLUDED_DRIVERS_DHT_DHT_H
| YifuLiu/AliOS-Things | components/py_engine/engine/drivers/dht/dht.h | C | apache-2.0 | 200 |
# DHT11/DHT22 driver for MicroPython on ESP8266
# MIT license; Copyright (c) 2016 Damien P. George
try:
from esp import dht_readinto
except:
from pyb import dht_readinto
class DHTBase:
def __init__(self, pin):
self.pin = pin
self.buf = bytearray(5)
def measure(self):
buf = se... | YifuLiu/AliOS-Things | components/py_engine/engine/drivers/dht/dht.py | Python | apache-2.0 | 861 |
# Driver for official MicroPython LCD160CR display
# MIT license; Copyright (c) 2017 Damien P. George
from micropython import const
from utime import sleep_ms
from ustruct import calcsize, pack_into
import uerrno, machine
# for set_orient
PORTRAIT = const(0)
LANDSCAPE = const(1)
PORTRAIT_UPSIDEDOWN = const(2)
LANDSCA... | YifuLiu/AliOS-Things | components/py_engine/engine/drivers/display/lcd160cr.py | Python | apache-2.0 | 14,498 |
# Driver test for official MicroPython LCD160CR display
# MIT license; Copyright (c) 2017 Damien P. George
import time, math, framebuf, lcd160cr
def get_lcd(lcd):
if type(lcd) is str:
lcd = lcd160cr.LCD160CR(lcd)
return lcd
def show_adc(lcd, adc):
data = [adc.read_core_temp(), adc.read_core_vba... | YifuLiu/AliOS-Things | components/py_engine/engine/drivers/display/lcd160cr_test.py | Python | apache-2.0 | 5,178 |
# MicroPython SSD1306 OLED driver, I2C and SPI interfaces
from micropython import const
import framebuf
# register definitions
SET_CONTRAST = const(0x81)
SET_ENTIRE_ON = const(0xA4)
SET_NORM_INV = const(0xA6)
SET_DISP = const(0xAE)
SET_MEM_ADDR = const(0x20)
SET_COL_ADDR = const(0x21)
SET_PAGE_ADDR = const(0x22)
SET... | YifuLiu/AliOS-Things | components/py_engine/engine/drivers/display/ssd1306.py | Python | apache-2.0 | 4,921 |
/*
* This file is part of the MicroPython project, http://micropython.org/
*
* The MIT License (MIT)
*
* Copyright (c) 2016-2018 Damien P. George
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in... | YifuLiu/AliOS-Things | components/py_engine/engine/drivers/memory/spiflash.c | C | apache-2.0 | 16,256 |
/*
* This file is part of the MicroPython project, http://micropython.org/
*
* The MIT License (MIT)
*
* Copyright (c) 2016-2018 Damien P. George
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in... | YifuLiu/AliOS-Things | components/py_engine/engine/drivers/memory/spiflash.h | C | apache-2.0 | 3,408 |
freeze(
".",
"neopixel.py",
opt=3,
)
| YifuLiu/AliOS-Things | components/py_engine/engine/drivers/neopixel/manifest.py | Python | apache-2.0 | 49 |
# NeoPixel driver for MicroPython
# MIT license; Copyright (c) 2016 Damien P. George, 2021 Jim Mussared
from machine import bitstream
class NeoPixel:
# G R B W
ORDER = (1, 0, 2, 3)
def __init__(self, pin, n, bpp=3, timing=1):
self.pin = pin
self.n = n
self.bpp = bpp
self.... | YifuLiu/AliOS-Things | components/py_engine/engine/drivers/neopixel/neopixel.py | Python | apache-2.0 | 1,333 |
"""NRF24L01 driver for MicroPython
"""
from micropython import const
import utime
# nRF24L01+ registers
CONFIG = const(0x00)
EN_RXADDR = const(0x02)
SETUP_AW = const(0x03)
SETUP_RETR = const(0x04)
RF_CH = const(0x05)
RF_SETUP = const(0x06)
STATUS = const(0x07)
RX_ADDR_P0 = const(0x0A)
TX_ADDR = const(0x10)
RX_PW_P0 =... | YifuLiu/AliOS-Things | components/py_engine/engine/drivers/nrf24l01/nrf24l01.py | Python | apache-2.0 | 7,549 |
"""Test for nrf24l01 module. Portable between MicroPython targets."""
import usys
import ustruct as struct
import utime
from machine import Pin, SPI
from nrf24l01 import NRF24L01
from micropython import const
# Slave pause between receiving data and checking for further packets.
_RX_POLL_DELAY = const(15)
# Slave pa... | YifuLiu/AliOS-Things | components/py_engine/engine/drivers/nrf24l01/nrf24l01test.py | Python | apache-2.0 | 4,836 |
# DS18x20 temperature sensor driver for MicroPython.
# MIT license; Copyright (c) 2016 Damien P. George
from micropython import const
_CONVERT = const(0x44)
_RD_SCRATCH = const(0xBE)
_WR_SCRATCH = const(0x4E)
class DS18X20:
def __init__(self, onewire):
self.ow = onewire
self.buf = bytearray(9)
... | YifuLiu/AliOS-Things | components/py_engine/engine/drivers/onewire/ds18x20.py | Python | apache-2.0 | 1,453 |
# 1-Wire driver for MicroPython
# MIT license; Copyright (c) 2016 Damien P. George
import _onewire as _ow
class OneWireError(Exception):
pass
class OneWire:
SEARCH_ROM = 0xF0
MATCH_ROM = 0x55
SKIP_ROM = 0xCC
def __init__(self, pin):
self.pin = pin
self.pin.init(pin.OPEN_DRAIN, ... | YifuLiu/AliOS-Things | components/py_engine/engine/drivers/onewire/onewire.py | Python | apache-2.0 | 2,395 |
"""
MicroPython driver for SD cards using SPI bus.
Requires an SPI bus and a CS pin. Provides readblocks and writeblocks
methods so the device can be mounted as a filesystem.
Example usage on pyboard:
import pyb, sdcard, os
sd = sdcard.SDCard(pyb.SPI(1), pyb.Pin.board.X5)
pyb.mount(sd, '/sd2')
os.li... | YifuLiu/AliOS-Things | components/py_engine/engine/drivers/sdcard/sdcard.py | Python | apache-2.0 | 8,663 |
# Test for sdcard block protocol
# Peter hinch 30th Jan 2016
import os, sdcard, machine
def sdtest():
spi = machine.SPI(1)
spi.init() # Ensure right baudrate
sd = sdcard.SDCard(spi, machine.Pin.board.X21) # Compatible with PCB
vfs = os.VfsFat(sd)
os.mount(vfs, "/fc")
print("Filesystem check"... | YifuLiu/AliOS-Things | components/py_engine/engine/drivers/sdcard/sdtest.py | Python | apache-2.0 | 1,555 |
//*****************************************************************************
//
//! \file socket.c
//! \brief SOCKET APIs Implements file.
//! \details SOCKET APIs like as Berkeley Socket APIs.
//! \version 1.0.3
//! \date 2013/10/21
//! \par Revision history
//! <2014/05/01> V1.0.3. Refer to M20140501
//! ... | YifuLiu/AliOS-Things | components/py_engine/engine/drivers/wiznet5k/ethernet/socket.c | C | apache-2.0 | 21,369 |
//*****************************************************************************
//
//! \file socket.h
//! \brief SOCKET APIs Header file.
//! \details SOCKET APIs like as berkeley socket api.
//! \version 1.0.2
//! \date 2013/10/21
//! \par Revision history
//! <2014/05/01> V1.0.2. Refer to M20140501
//! ... | YifuLiu/AliOS-Things | components/py_engine/engine/drivers/wiznet5k/ethernet/socket.h | C | apache-2.0 | 27,325 |
// dpgeorge: this file taken from w5500/w5500.c and adapted to W5200
//*****************************************************************************
//
//! \file w5500.c
//! \brief W5500 HAL Interface.
//! \version 1.0.1
//! \date 2013/10/21
//! \par Revision history
//! <2014/05/01> V1.0.2
//! 1. Impli... | YifuLiu/AliOS-Things | components/py_engine/engine/drivers/wiznet5k/ethernet/w5200/w5200.c | C | apache-2.0 | 6,824 |
// dpgeorge: this file taken from w5500/w5500.h and adapted to W5200
//*****************************************************************************
//
//! \file w5500.h
//! \brief W5500 HAL Header File.
//! \version 1.0.0
//! \date 2013/10/21
//! \par Revision history
//! <2013/10/21> 1st Release
//! \author M... | YifuLiu/AliOS-Things | components/py_engine/engine/drivers/wiznet5k/ethernet/w5200/w5200.h | C | apache-2.0 | 77,235 |
//*****************************************************************************
//
//! \file w5500.c
//! \brief W5500 HAL Interface.
//! \version 1.0.1
//! \date 2013/10/21
//! \par Revision history
//! <2014/05/01> V1.0.2
//! 1. Implicit type casting -> Explicit type casting. Refer to M20140501
//! ... | YifuLiu/AliOS-Things | components/py_engine/engine/drivers/wiznet5k/ethernet/w5500/w5500.c | C | apache-2.0 | 7,933 |
//*****************************************************************************
//
//! \file w5500.h
//! \brief W5500 HAL Header File.
//! \version 1.0.0
//! \date 2013/10/21
//! \par Revision history
//! <2013/10/21> 1st Release
//! \author MidnightCow
//! \copyright
//!
//! Copyright (c) 2013, WIZnet Co., LTD... | YifuLiu/AliOS-Things | components/py_engine/engine/drivers/wiznet5k/ethernet/w5500/w5500.h | C | apache-2.0 | 78,826 |
//****************************************************************************/
//!
//! \file wizchip_conf.c
//! \brief WIZCHIP Config Header File.
//! \version 1.0.1
//! \date 2013/10/21
//! \par Revision history
//! <2014/05/01> V1.0.1 Refer to M20140501
//! 1. Explicit type casting in wizchip_bus_rea... | YifuLiu/AliOS-Things | components/py_engine/engine/drivers/wiznet5k/ethernet/wizchip_conf.c | C | apache-2.0 | 17,658 |
//*****************************************************************************
//
//! \file wizchip_conf.h
//! \brief WIZCHIP Config Header File.
//! \version 1.0.0
//! \date 2013/10/21
//! \par Revision history
//! <2013/10/21> 1st Release
//! \author MidnightCow
//! \copyright
//!
//! Copyright (c) 2013, WIZ... | YifuLiu/AliOS-Things | components/py_engine/engine/drivers/wiznet5k/ethernet/wizchip_conf.h | C | apache-2.0 | 21,011 |
//*****************************************************************************
//
//! \file dhcp.c
//! \brief DHCP APIs implement file.
//! \details Processig DHCP protocol as DISCOVER, OFFER, REQUEST, ACK, NACK and DECLINE.
//! \version 1.1.0
//! \date 2013/11/18
//! \par Revision history
//! <2013/11/18> 1st ... | YifuLiu/AliOS-Things | components/py_engine/engine/drivers/wiznet5k/internet/dhcp/dhcp.c | C | apache-2.0 | 28,806 |
//*****************************************************************************
//
//! \file dhcp.h
//! \brief DHCP APIs Header file.
//! \details Processig DHCP protocol as DISCOVER, OFFER, REQUEST, ACK, NACK and DECLINE.
//! \version 1.1.0
//! \date 2013/11/18
//! \par Revision history
//! <2013/11/18> 1st Rel... | YifuLiu/AliOS-Things | components/py_engine/engine/drivers/wiznet5k/internet/dhcp/dhcp.h | C | apache-2.0 | 5,226 |
//*****************************************************************************
//
//! \file dns.c
//! \brief DNS APIs Implement file.
//! \details Send DNS query & Receive DNS reponse. \n
//! It depends on stdlib.h & string.h in ansi-c library
//! \version 1.1.0
//! \date 2013/11/18
//! \par Revision histor... | YifuLiu/AliOS-Things | components/py_engine/engine/drivers/wiznet5k/internet/dns/dns.c | C | apache-2.0 | 14,601 |
//*****************************************************************************
//
//! \file dns.h
//! \brief DNS APIs Header file.
//! \details Send DNS query & Receive DNS reponse.
//! \version 1.1.0
//! \date 2013/11/18
//! \par Revision history
//! <2013/10/21> 1st Release
//! <2013/12/20> V1.1.0
//! ... | YifuLiu/AliOS-Things | components/py_engine/engine/drivers/wiznet5k/internet/dns/dns.h | C | apache-2.0 | 4,017 |
/*
* This file is part of the MicroPython project, http://micropython.org/
*
* The MIT License (MIT)
*
* Copyright (c) 2021 Damien P. George
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the ... | YifuLiu/AliOS-Things | components/py_engine/engine/extmod/axtls-include/axtls_os_port.h | C | apache-2.0 | 2,169 |
#define AXTLS_VERSION "(no version)"
| YifuLiu/AliOS-Things | components/py_engine/engine/extmod/axtls-include/version.h | C | apache-2.0 | 40 |
# Makefile directives for BlueKitchen BTstack
ifeq ($(MICROPY_BLUETOOTH_BTSTACK),1)
MICROPY_BLUETOOTH_BTSTACK_USB ?= 0
BTSTACK_EXTMOD_DIR = extmod/btstack
EXTMOD_SRC_C += extmod/btstack/modbluetooth_btstack.c
INC += -I$(TOP)/$(BTSTACK_EXTMOD_DIR)
CFLAGS_MOD += -DMICROPY_BLUETOOTH_BTSTACK=1
CFLAGS_MOD += -DMICROPY... | YifuLiu/AliOS-Things | components/py_engine/engine/extmod/btstack/btstack.mk | Makefile | apache-2.0 | 2,239 |
#ifndef MICROPY_INCLUDED_EXTMOD_BTSTACK_BTSTACK_CONFIG_H
#define MICROPY_INCLUDED_EXTMOD_BTSTACK_BTSTACK_CONFIG_H
// BTstack features that can be enabled
#define ENABLE_BLE
#define ENABLE_LE_PERIPHERAL
#define ENABLE_LE_CENTRAL
// #define ENABLE_CLASSIC
#define ENABLE_LE_DATA_CHANNELS
// #define ENABLE_LOG_INFO
// #de... | YifuLiu/AliOS-Things | components/py_engine/engine/extmod/btstack/btstack_config.h | C | apache-2.0 | 1,529 |
/*
* This file is part of the MicroPython project, http://micropython.org/
*
* The MIT License (MIT)
*
* Copyright (c) 2020 Damien P. George
* Copyright (c) 2020 Jim Mussared
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (... | YifuLiu/AliOS-Things | components/py_engine/engine/extmod/btstack/btstack_hci_uart.c | C | apache-2.0 | 5,967 |
/*
* This file is part of the MicroPython project, http://micropython.org/
*
* The MIT License (MIT)
*
* Copyright (c) 2020 Damien P. George
* Copyright (c) 2020 Jim Mussared
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (... | YifuLiu/AliOS-Things | components/py_engine/engine/extmod/btstack/btstack_hci_uart.h | C | apache-2.0 | 1,750 |
/*
* This file is part of the MicroPython project, http://micropython.org/
*
* The MIT License (MIT)
*
* Copyright (c) 2020 Damien P. George
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the ... | YifuLiu/AliOS-Things | components/py_engine/engine/extmod/btstack/modbluetooth_btstack.c | C | apache-2.0 | 67,211 |
/*
* This file is part of the MicroPython project, http://micropython.org/
*
* The MIT License (MIT)
*
* Copyright (c) 2020 Damien P. George
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the ... | YifuLiu/AliOS-Things | components/py_engine/engine/extmod/btstack/modbluetooth_btstack.h | C | apache-2.0 | 2,609 |
# CMake fragment for MicroPython extmod component
set(MICROPY_EXTMOD_DIR "${MICROPY_DIR}/extmod")
set(MICROPY_OOFATFS_DIR "${MICROPY_DIR}/lib/oofatfs")
set(MICROPY_SOURCE_EXTMOD
${MICROPY_DIR}/shared/libc/abort_.c
${MICROPY_DIR}/shared/libc/printf.c
${MICROPY_EXTMOD_DIR}/machine_bitstream.c
${MICROPY_... | YifuLiu/AliOS-Things | components/py_engine/engine/extmod/extmod.cmake | CMake | apache-2.0 | 3,419 |
# This makefile fragment provides rules to build 3rd-party components for extmod modules
################################################################################
# VFS FAT FS
OOFATFS_DIR = lib/oofatfs
# this sets the config file for FatFs
CFLAGS_MOD += -DFFCONF_H=\"$(OOFATFS_DIR)/ffconf.h\"
ifeq ($(MICROPY_... | YifuLiu/AliOS-Things | components/py_engine/engine/extmod/extmod.mk | Makefile | apache-2.0 | 5,255 |
/*
* This file is part of the MicroPython project, http://micropython.org/
*
* The MIT License (MIT)
*
* Copyright (c) 2013, 2014 Damien P. George
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* i... | YifuLiu/AliOS-Things | components/py_engine/engine/extmod/font_petme128_8x8.h | C | apache-2.0 | 7,223 |
#ifndef MICROPY_INCLUDED_EXTMOD_LWIP_INCLUDE_ARCH_CC_H
#define MICROPY_INCLUDED_EXTMOD_LWIP_INCLUDE_ARCH_CC_H
#include <stdint.h>
// Generate lwip's internal types from stdint
typedef uint8_t u8_t;
typedef int8_t s8_t;
typedef uint16_t u16_t;
typedef int16_t s16_t;
typedef uint32_t u32_t;
typedef int32_t s32_t;
typ... | YifuLiu/AliOS-Things | components/py_engine/engine/extmod/lwip-include/arch/cc.h | C | apache-2.0 | 907 |
#ifndef MICROPY_INCLUDED_EXTMOD_LWIP_INCLUDE_ARCH_PERF_H
#define MICROPY_INCLUDED_EXTMOD_LWIP_INCLUDE_ARCH_PERF_H
#define PERF_START /* null definition */
#define PERF_STOP(x) /* null definition */
#endif // MICROPY_INCLUDED_EXTMOD_LWIP_INCLUDE_ARCH_PERF_H
| YifuLiu/AliOS-Things | components/py_engine/engine/extmod/lwip-include/arch/perf.h | C | apache-2.0 | 263 |
#ifndef MICROPY_INCLUDED_EXTMOD_LWIP_INCLUDE_LWIPOPTS_H
#define MICROPY_INCLUDED_EXTMOD_LWIP_INCLUDE_LWIPOPTS_H
#include <py/mpconfig.h>
#include <py/misc.h>
#include <py/mphal.h>
// We're running without an OS for this port. We don't provide any services except light protection.
#define NO_SYS 1
#define SYS_LIGHTWE... | YifuLiu/AliOS-Things | components/py_engine/engine/extmod/lwip-include/lwipopts.h | C | apache-2.0 | 995 |
/*
* This file is part of the MicroPython project, http://micropython.org/
*
* The MIT License (MIT)
*
* Copyright (c) 2021 Jim Mussared
* Copyright (c) 2021 Damien P. George
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (... | YifuLiu/AliOS-Things | components/py_engine/engine/extmod/machine_bitstream.c | C | apache-2.0 | 2,531 |
/*
* This file is part of the MicroPython project, http://micropython.org/
*
* The MIT License (MIT)
*
* Copyright (c) 2021 Jim Mussared
* Copyright (c) 2021 Damien P. George
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (... | YifuLiu/AliOS-Things | components/py_engine/engine/extmod/machine_bitstream.h | C | apache-2.0 | 1,633 |
/*
* This file is part of the MicroPython project, http://micropython.org/
*
* The MIT License (MIT)
*
* Copyright (c) 2016 Damien P. George
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the ... | YifuLiu/AliOS-Things | components/py_engine/engine/extmod/machine_i2c.c | C | apache-2.0 | 26,221 |
/*
* This file is part of the MicroPython project, http://micropython.org/
*
* The MIT License (MIT)
*
* Copyright (c) 2016 Damien P. George
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the ... | YifuLiu/AliOS-Things | components/py_engine/engine/extmod/machine_i2c.h | C | apache-2.0 | 3,664 |
/*
* This file is part of the MicroPython project, http://micropython.org/
*
* The MIT License (MIT)
*
* Copyright (c) 2013, 2014 Damien P. George
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* i... | YifuLiu/AliOS-Things | components/py_engine/engine/extmod/machine_mem.c | C | apache-2.0 | 4,394 |
/*
* This file is part of the MicroPython project, http://micropython.org/
*
* The MIT License (MIT)
*
* Copyright (c) 2015 Damien P. George
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the ... | YifuLiu/AliOS-Things | components/py_engine/engine/extmod/machine_mem.h | C | apache-2.0 | 1,960 |
/*
* This file is part of the MicroPython project, http://micropython.org/
*
* The MIT License (MIT)
*
* Copyright (c) 2016 Paul Sokolovsky
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the S... | YifuLiu/AliOS-Things | components/py_engine/engine/extmod/machine_pinbase.c | C | apache-2.0 | 2,927 |
/*
* This file is part of the MicroPython project, http://micropython.org/
*
* The MIT License (MIT)
*
* Copyright (c) 2016 Paul Sokolovsky
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the S... | YifuLiu/AliOS-Things | components/py_engine/engine/extmod/machine_pinbase.h | C | apache-2.0 | 1,448 |
/*
* This file is part of the MicroPython project, http://micropython.org/
*
* The MIT License (MIT)
*
* Copyright (c) 2016 Damien P. George
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the ... | YifuLiu/AliOS-Things | components/py_engine/engine/extmod/machine_pulse.c | C | apache-2.0 | 2,461 |