Guest User

Untitled

a guest
Mar 1st, 2021
42
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2. import pinutils;
  3.  
  4. info = {
  5.  'name' : "Espruino",
  6.  'default_console' : "EV_BLUETOOTH",
  7.  'variables' : 2500, # How many variables are allocated for Espruino to use. RAM will be overflowed if this number is too high and code won't compile.
  8.  #'bootloader' : 1,
  9.  'binary_name' : 'Espruino_module.hex',
  10.  'build' : {
  11.    'optimizeflags' : '-Os',
  12.    'libraries' : [
  13.      'BLUETOOTH',
  14.      'FILESYSTEM'
  15.    ],
  16.    'makefile' : [
  17.      'DEFINES+=-DBLUETOOTH_NAME_PREFIX=\'"Espruino nrf52832"\'',
  18.    ]
  19.  }
  20. };
  21.  
  22. chip = {
  23.   'part' : "NRF52832",
  24.   'family' : "NRF52",
  25.   'package' : "QFN48",
  26.   'ram' : 64,
  27.   'flash' : 512,
  28.   'speed' : 64,
  29.   'usart' : 1,
  30.   'spi' : 1,
  31.   'i2c' : 1,
  32.   'adc' : 1,
  33.   'dac' : 0,
  34.   'saved_code' : {
  35.     'address' : ((118 - 10) * 4096), # Bootloader takes pages 120-127, FS takes 118-119
  36.     'page_size' : 4096,
  37.     'pages' : 10,
  38.     'flash_available' : 512 - ((31 + 8 + 2 + 10)*4) # Softdevice uses 31 pages of flash, bootloader 8, FS 2, code 10. Each page is 4 kb.
  39.   },
  40. };
  41.  
  42. devices = {};
  43.  
  44.  
  45. def get_pins():
  46.   pins = pinutils.generate_pins(0,31) # 32 General Purpose I/O Pins.
  47.   # everything is non-5v tolerant
  48.   for pin in pins:
  49.     pin["functions"]["3.3"]=0;
  50.  
  51.   #The boot/reset button will function as a reset button in normal operation. Pin reset on PD21 needs to be enabled on the nRF52832 device for this to work.
  52.   return pins
  53.  
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×